/* Qurb app styles (ported from the mockup v0.2.1). One look for every screen. Colors carry meaning: green = action and done, gold = today and next, blue = the path. Never red.
   Fonts are bundled (fonts/, SIL OFL 1.1), never loaded from a third party. */
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-wght.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-wght-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Amiri Quran"; src: url("fonts/amiri-quran-arabic-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Amiri Quran"; src: url("fonts/amiri-quran-latin-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --bg: #f5f0e6; --glow: #ede3cd; --card: #fffdf8; --ink: #1f2a27; --ink2: #4a5751; --hair: #e2d9c7;
  --green: #1f5a4a; --green-t: #e1ede7; --on-green: #ffffff;
  --gold: #7a5a10; --gold-t: #f3e8cf;
  --blue: #3b5b84; --blue-t: #e4ebf4;
  --shadow: 0 1px 2px rgba(31, 42, 39, .05), 0 8px 22px rgba(31, 42, 39, .07);
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ar: "Amiri Quran", "Amiri", "Scheherazade New", "Geeza Pro", "Noto Naskh Arabic", serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121819; --glow: #1b2926; --card: #1a2224; --ink: #ece8dd; --ink2: #b4beb8; --hair: #2e3a3c;
  --green: #86cfb1; --green-t: #1e3a31; --on-green: #0c1f19;
  --gold: #e3c277; --gold-t: #33291a;
  --blue: #9cbbe6; --blue-t: #1d2b3d;
  --shadow: none;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font: 400 16.5px/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
#stage { min-height: 100vh; display: flex; justify-content: center; align-items: flex-start; gap: 24px; }
.phone { position: relative; width: 100%; max-width: 430px; height: 100vh; height: 100dvh; background: radial-gradient(130% 50% at 50% -8%, var(--glow), var(--bg)); overflow: hidden; display: flex; flex-direction: column; }
@media (min-width: 700px) {
  #stage { padding: 24px; }
  .phone { height: min(880px, calc(100vh - 48px)); border: 1px solid var(--hair); border-radius: 30px; box-shadow: var(--shadow); }
}
.scroll { flex: 1; overflow-y: auto; padding: 20px 18px 36px; -webkit-overflow-scrolling: touch; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.012em; color: var(--ink); }
h1.brand { font-size: 44px; line-height: 1.1; margin: 6px 0 8px; font-weight: 450; }
.brandar { font-size: 42px; vertical-align: -3px; margin-left: 6px; display: inline; line-height: 1; }
h2 { font-size: 31px; line-height: 1.15; margin: 2px 0 14px; font-weight: 480; }
h3 { font-size: 21px; line-height: 1.25; margin: 0 0 8px; }
.lead { font-family: var(--serif); font-size: 21px; line-height: 1.4; margin: 0 0 18px; color: var(--ink2); }
.lab { font-size: 13px; letter-spacing: .01em; color: var(--blue); font-weight: 600; margin-bottom: 4px; }
.lab.gold { color: var(--gold); }
.small { font-size: 14.5px; color: var(--ink2); }
p { margin: 0 0 12px; }
.card { background: var(--card); border: 1px solid var(--hair); border-radius: 22px; padding: 18px; margin: 0 0 14px; box-shadow: var(--shadow); }
.card.tint { background: var(--green-t); border-color: transparent; box-shadow: none; }
.card.flat { box-shadow: none; }
.quote .ar, .ar { font-family: var(--ar); font-size: 32px; line-height: 2.2; direction: rtl; text-align: right; margin: 0 0 8px; color: var(--ink); font-weight: 400; }
.en { font-family: var(--serif); font-size: 19.5px; line-height: 1.45; margin: 0 0 8px; }
.ref { font-size: 13px; color: var(--ink2); margin-bottom: 8px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--gold); background: var(--gold-t); border-radius: 999px; padding: 3px 10px; margin-right: 4px; }
.srcbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 3px 6px; font: inherit; font-size: 13.5px; color: var(--blue); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; padding: 12px 18px; margin-top: 10px; border: 0; border-radius: 18px; background: var(--green); color: var(--on-green); font: 600 16.5px var(--sans); cursor: pointer; transition: transform .08s ease; }
.btn:active { transform: scale(.985); }
.btn:disabled { background: var(--hair); color: var(--ink2); cursor: default; }
.btn.done { background: var(--green-t); color: var(--green); }
.btn.ghost { background: transparent; color: var(--green); border: 1.5px solid var(--green); }
.btn.small { width: auto; flex: 1; min-height: 46px; margin-top: 12px; font-size: 15px; padding: 8px 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.chip { min-height: 48px; padding: 8px 16px; border-radius: 16px; border: 1px solid var(--hair); background: var(--card); color: var(--ink); font: 500 15.5px var(--sans); text-align: left; cursor: pointer; }
.chip.sel { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.add { color: var(--blue); border-style: dashed; }
.ta, .inp { width: 100%; min-height: 48px; padding: 10px 14px; margin: 8px 0 4px; border-radius: 14px; border: 1px solid var(--hair); background: var(--card); color: var(--ink); font: 16.5px var(--sans); }
.ta { min-height: 80px; resize: vertical; }
.inp:focus, .ta:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.nextl { background: var(--gold-t); color: var(--ink); border-radius: 16px; padding: 12px 16px; margin: 0 0 16px; font-size: 15.5px; }
.nextl b { color: var(--gold); }
.rows { display: flex; flex-direction: column; gap: 10px; margin: 0 0 14px; }
.row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 66px; padding: 10px 14px; border-radius: 18px; border: 1px solid var(--hair); background: var(--card); color: var(--ink); text-align: left; font: inherit; cursor: pointer; box-shadow: var(--shadow); }
.row .ic, .row .n { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 14px; background: var(--blue-t); color: var(--blue); }
.row .ic svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.row.done .ic, .row.done .n { background: var(--green-t); color: var(--green); }
.row.next { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.row.next .ic { background: var(--gold-t); color: var(--gold); }
.row .t { flex: 1; min-width: 0; }
.row .t b { font-weight: 600; display: block; line-height: 1.3; }
.row .t span { font-size: 14px; color: var(--ink2); }
.row .m { font-size: 13px; color: var(--ink2); white-space: nowrap; }
.row.done .m { color: var(--green); font-weight: 600; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 4px 2px; margin-bottom: 6px; background: none; border: 0; color: var(--blue); font: 500 15.5px var(--sans); cursor: pointer; }
.kind { font-family: var(--serif); font-style: italic; font-size: 18px; background: var(--green-t); color: var(--ink); border-radius: 18px; padding: 14px 16px; margin: 0 0 14px; }
.right { border-top: 1px solid var(--hair); padding-top: 14px; margin-top: 14px; }
.right:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.divider { display: flex; align-items: center; gap: 12px; margin: 6px 4px 18px; color: var(--hair); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.divider svg { width: 16px; height: 16px; fill: var(--hair); stroke: none; }
.bitecard { display: block; width: 100%; text-align: left; font: inherit; color: var(--ink); cursor: pointer; background: linear-gradient(160deg, var(--gold-t), var(--card) 70%); border-color: var(--gold); }
.bitecard h3 { font-size: 24px; }
.bitecard .more { color: var(--green); font-weight: 600; }
.pdots { display: flex; gap: 8px; justify-content: center; margin: 22px 0 6px; }
.pdots i { width: 8px; height: 8px; border-radius: 50%; background: var(--hair); }
.pdots i.on { background: var(--green); width: 22px; border-radius: 8px; }
.tabs { flex: none; display: flex; border-top: 1px solid var(--hair); background: var(--card); padding-bottom: env(safe-area-inset-bottom); }
.tab { flex: 1; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: none; border: 0; color: var(--ink2); font: 500 12px var(--sans); cursor: pointer; }
.tab svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tab.on { color: var(--green); font-weight: 650; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 10px 0 16px; }
.step { min-height: 58px; padding: 6px 2px; border-radius: 16px; border: 1px solid var(--hair); background: var(--card); color: var(--ink2); font: 500 13px var(--sans); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.step i { font-style: normal; font-size: 12px; opacity: .85; }
.step.on { background: var(--blue); color: var(--bg); border-color: var(--blue); }
.step.past { color: var(--green); border-color: var(--green); }
.toggle { flex: none; width: 72px; height: 44px; border-radius: 999px; border: 1px solid var(--hair); background: var(--hair); position: relative; cursor: pointer; }
.toggle::after { content: ""; position: absolute; top: 5px; left: 5px; width: 32px; height: 32px; border-radius: 50%; background: var(--card); transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.toggle.on { background: var(--green); border-color: var(--green); }
.toggle.on::after { left: 35px; }
.line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--hair); }
.line:first-child { border-top: 0; }
/* R0: the time zone line in Me is a button that opens the picker */
button.line.lnkline { width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
button.line.lnkline:first-child { border-top: 0; }
.sheetbg { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); display: flex; align-items: flex-end; z-index: 5; }
.sheet { width: 100%; max-height: 82%; overflow-y: auto; background: var(--card); border-radius: 26px 26px 0 0; padding: 20px; }
.sheet dt { font-size: 13px; color: var(--ink2); margin-top: 12px; }
.sheet dd { margin: 0; }
.sheet .quote.in { margin: 6px 0 4px; padding: 12px 14px; background: var(--bg); border-radius: 16px; }
.lnk { color: var(--blue); word-break: break-all; font-size: 14px; }
.hint { color: var(--ink2); font-size: 14px; margin: 6px 2px 0; }
.time { width: 168px; min-height: 44px; }
.closing { text-align: center; padding: 36px 8px 20px; }
.tour { position: absolute; inset: 0; z-index: 8; }
.spot { position: absolute; border-radius: 18px; box-shadow: 0 0 0 9999px rgba(10, 16, 15, .66); outline: 2px solid var(--gold); pointer-events: none; transition: all .18s ease; }
.tip { position: absolute; left: 14px; right: 14px; background: var(--card); color: var(--ink); border-radius: 22px; padding: 16px 16px 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
.tip h3 { margin-bottom: 4px; }
.tip p { margin-bottom: 4px; }
.tipbtns { display: flex; gap: 8px; }
@media (prefers-reduced-motion: reduce) { .toggle::after, .spot, .btn { transition: none; } }

button.nextl { display: block; width: 100%; text-align: left; border: 0; font: inherit; font-size: 15.5px; min-height: 48px; cursor: pointer; }
.fold { margin: 0 0 14px; }
.fold summary { min-height: 48px; display: flex; align-items: center; padding: 8px 4px; color: var(--blue); font-weight: 500; cursor: pointer; list-style: none; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::before { content: "\203A"; display: inline-block; margin-right: 8px; transition: transform .12s; }
.fold[open] summary::before { transform: rotate(90deg); }
.fold .quote { background: var(--card); border: 1px solid var(--hair); border-radius: 18px; padding: 14px; }
.skipw { display: flex; margin: 2px auto 0; justify-content: center; }

@font-face { font-family: "Qurb Pinyon"; src: url("fonts/pinyon-script-latin-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Qurb Ruqaa"; src: url("fonts/aref-ruqaa-arabic-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
.lg-t { fill: currentColor; } .lg-lat { font-family: "Qurb Pinyon", cursive; } .lg-ar { font-family: "Qurb Ruqaa", serif; font-weight: 700; }
.lg-s { stroke: var(--gold); } .lg-s2 { opacity: .7; } .lg-d { fill: var(--gold); }
/* ---- added for the real app: classes replace every style= attribute (CSP forbids them) ---- */
.mt12 { margin-top: 12px; } .mt14 { margin-top: 14px; } .mb8 { margin-bottom: 8px; } .tl { text-align: left; }
.hidden { display: none !important; }
.brandmark { display: block; width: 168px; height: auto; margin: 0 0 6px; color: var(--ink); }
.brandmark.sm { width: 104px; margin: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.err { color: var(--ink); background: var(--gold-t); border-radius: 14px; padding: 10px 14px; margin: 8px 0; font-size: 15px; }
.ok { color: var(--green); background: var(--green-t); border-radius: 14px; padding: 10px 14px; margin: 8px 0; font-size: 15px; }
.fieldlab { display: block; font-size: 13.5px; color: var(--ink2); margin: 12px 0 0; }
select.inp { appearance: none; }
.checkline { display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 10px 0 2px; font-size: 15.5px; }
.checkline input { width: 24px; height: 24px; accent-color: var(--green); }
.linkbox { word-break: break-all; font: 14px/1.4 ui-monospace, Menlo, monospace; background: var(--bg); border: 1px dashed var(--hair); border-radius: 12px; padding: 10px 12px; margin: 8px 0; user-select: all; }
.person { padding: 12px 0; border-top: 1px solid var(--hair); }
.person:first-of-type { border-top: 0; }
.person .inp { margin: 6px 0 0; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; color: var(--blue); background: var(--blue-t); border-radius: 999px; padding: 3px 10px; margin-right: 4px; }
.pill.off { color: var(--ink2); background: var(--hair); }
.qhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.empty { text-align: center; padding: 24px 8px; color: var(--ink2); }

/* ---- voice guide player (the card of the tour) ---- */
.tip { max-height: 78%; overflow-y: auto; }
.tip .cap { font: 17px/1.5 var(--serif); margin: 4px 0 8px; }
.tiplinks { justify-content: space-between; margin-top: 0; }
.tip .cap span { color: var(--ink2); transition: background .15s; }
.tip .cap span.now { color: var(--ink); background: var(--gold-t); border-radius: 6px; padding: 0 2px; }
.tipbtns { margin-top: 8px; flex-wrap: wrap; }
.tip .btn.small { min-height: 48px; }
.gstep { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border: 1px solid var(--hair); border-radius: 16px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; margin-bottom: 8px; }
.gstep .n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-t); color: var(--blue); font-size: 13px; font-weight: 600; }
.gstep .m { margin-left: auto; font-size: 13px; color: var(--ink2); white-space: nowrap; }
@media (min-width: 700px) { body { background: var(--bg); } #stage { padding: 24px; } }
