/* Amiri (SIL Open Font License, fonts/OFL.txt): Latin letters in the style of Arabic naskh, for the passage on the home page */
@font-face { font-family: "Amiri"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/amiri-400-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Amiri"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/amiri-400-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Amiri"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/amiri-700-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Amiri"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/amiri-700-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Kitab-ı Mübin • Hatim: the app's colours, dark by default, light when the device is light. */
:root {
  --bg: #121815; --card: #1c2420; --inner: #26302b; --stroke: #34413a;
  --text: #ecefe9; --text2: #a9b3ad; --gold: #6cc59a; --header: #212121; --goldline: #d8b86a;
  --empty: #ffffff; --taken: #64b5f6; --read: #66bb6a; --ink: #1b1b1b;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f3ea; --card: #ffffff; --inner: #f1ede2; --stroke: #ddd5c1;
    --text: #1f2421; --text2: #66706a; --gold: #2f8a5c; --header: #212121; --goldline: #a9853d;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--gold); text-decoration: none; cursor: pointer; }
.top { display: flex; align-items: center; justify-content: space-between; background: var(--header); padding: 10px 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 18px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.langs a { color: #cfd8dc; margin-left: 12px; font-size: 14px; font-weight: 600; }
.langs a.on { color: var(--gold); }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
.foot { text-align: center; color: var(--text2); padding: 24px 16px 40px; font-size: 14px; }
h1 { font-size: 24px; margin: 8px 0 4px; }
h2 { font-size: 18px; margin: 0 0 8px; }
.muted { color: var(--text2); font-size: 14px; }
.small { font-size: 12px; }
.card { background: var(--card); border: 1px solid var(--stroke); border-radius: 14px; padding: 14px; margin: 12px 0; }
.card.gold { border: 1.5px solid var(--gold); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; }
.btn { display: inline-block; border: 1px solid var(--stroke); background: var(--inner); color: var(--text); border-radius: 18px;
  padding: 8px 14px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn.on, .btn.primary { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn:disabled { opacity: .5; cursor: default; }
.opt { display: block; width: 100%; text-align: left; border: 1px solid var(--stroke); background: var(--inner); color: var(--text);
  border-radius: 12px; padding: 12px; margin: 8px 0; cursor: pointer; }
.opt b { display: block; font-size: 16px; }
.opt.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 15%, var(--inner)); }
.opt.on b { color: var(--gold); }
label { display: block; font-size: 13px; color: var(--text2); margin: 10px 0 4px; }
input, select { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--stroke); background: var(--inner);
  color: var(--text); font-size: 16px; }
input:focus { outline: 2px solid var(--gold); border-color: transparent; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bar { position: relative; height: 10px; background: var(--inner); border-radius: 5px; overflow: hidden; margin: 8px 0 6px; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; }
.bar .t { background: var(--taken); } .bar .r { background: var(--read); }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(6, 1fr); } }
.cell { background: var(--card); border: 1px solid var(--stroke); border-radius: 10px; padding: 3px; cursor: pointer; text-align: center; }
.cell.mine { border: 2px solid var(--gold); }
.cell .box { position: relative; height: 54px; border-radius: 7px; display: flex; align-items: center; justify-content: center; }
.cell .num { position: relative; color: var(--ink); font-weight: 800; font-size: 20px; }
.cell .strips { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 2px; }
.cell .strips i { flex: 1; border-radius: 4px; }
.cell .who { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; color: var(--text); }
.cell .who.empty { color: var(--text2); }
.e { background: var(--empty); } .tk { background: var(--taken); } .rd { background: var(--read); }
.legend { display: flex; justify-content: space-around; margin: 10px 0; font-size: 13px; color: var(--text2); }
.dot { display: inline-block; width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--stroke); vertical-align: -2px; margin-right: 6px; }
.daynav { display: flex; align-items: center; justify-content: space-between; }
.daynav button { background: none; border: none; color: var(--gold); font-size: 32px; font-weight: 700; cursor: pointer; padding: 0 14px; }
.daynav button:disabled { color: var(--stroke); }
.entry { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--stroke); cursor: pointer; }
.entry:last-child { border-bottom: none; }
.entry .n { flex: 1; } .entry .c { color: var(--gold); font-weight: 700; }
.link { display: flex; gap: 8px; align-items: center; }
.link input { font-size: 13px; }
.dialog { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
.dialog[hidden] { display: none; }
.dialog .box { background: var(--card); border: 1.5px solid var(--gold); border-radius: 16px; padding: 18px; width: 100%; max-width: 420px; max-height: 90vh; overflow: auto; }
.step { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.step span { flex: 1; } .step b { width: 48px; text-align: center; color: var(--gold); font-size: 18px; }
.step button { width: 40px; height: 34px; border-radius: 8px; border: 1px solid var(--stroke); background: var(--inner); color: var(--text); font-size: 18px; cursor: pointer; }
.warn { color: var(--gold); font-weight: 600; }
.stat { text-align: center; } .stat b { display: block; font-size: 28px; color: var(--gold); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.hero { text-align: center; padding: 20px 0 6px; }
.hero .ar { font-size: 44px; color: var(--gold); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--header); color: #fff; padding: 10px 16px; border-radius: 20px; font-size: 14px; z-index: 20; }
.sections { display: flex; flex-direction: column; border: 1px solid var(--stroke); border-radius: 12px; overflow: hidden; background: var(--inner); }
.sec { text-align: left; background: none; border: none; border-bottom: 1px solid var(--stroke); color: var(--text); font: inherit; font-size: 15px; padding: 10px 14px; cursor: pointer; }
.sec:last-child { border-bottom: none; }
.sec.on { color: var(--gold); font-weight: 700; background: color-mix(in srgb, var(--gold) 18%, var(--inner)); }
.rowbox { border-bottom: 1px solid var(--stroke); padding-bottom: 8px; margin-bottom: 6px; }
.entry .pg { display: block; font-size: 12px; }
.entry.on .n { color: var(--gold); font-weight: 700; }
.entry .x { background: none; border: none; color: var(--text2); font-size: 16px; padding: 4px 10px; cursor: pointer; }

/* The passage under "Hatim": a framed levha (outer line, inner gold line), large green first letter, source in gold */
.levha { position: relative; margin: 6px 0 16px; background: var(--card); border: 1px solid var(--stroke); border-radius: 6px; padding: 24px 20px 20px; text-align: center; }
.levha::before { content: ""; position: absolute; inset: 6px; border: 1px solid color-mix(in srgb, var(--goldline) 55%, transparent); border-radius: 3px; pointer-events: none; }
.levha blockquote { margin: 0; font-family: "Amiri", Georgia, serif; font-size: 19.5px; line-height: 1.85; text-wrap: pretty; }
.levha blockquote::first-letter { font-size: 1.6em; color: var(--gold); font-weight: 700; }
.levha figcaption { margin-top: 10px; font-family: "Amiri", Georgia, serif; font-size: 16px; font-weight: 700; color: var(--goldline); letter-spacing: .02em; }
