/* WajdQuran standalone app — shared shell styles. Own green/gold theme, no
   academy chrome. Mobile-first with a bottom tab bar.
   Author: WAJD AI */
:root {
  --green: #0f3d2e; --green2: #16553f; --gold: #c8861f; --gold2: #f5c24a;
  --cream: #fbf7ee; --sand: #f3ecdc; --ink: #2b2b2b; --ink-mid: #555; --ink-light: #8a8270;
  --line: #ece3cf; --tabh: 64px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; max-width: 100%; overflow-x: hidden; }
body {
  font-family: 'Nunito', system-ui, sans-serif; background: var(--cream); color: var(--ink);
  -webkit-font-smoothing: antialiased; padding-bottom: calc(var(--tabh) + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }
.amiri { font-family: 'Amiri', serif; }

/* App header */
.app-bar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px;
  background: linear-gradient(160deg, var(--green), var(--green2)); color: #fff;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
}
.app-bar img { width: 30px; height: 30px; border-radius: 8px; }
.app-bar .ttl { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.15rem; }
.app-bar .sub { margin-left: auto; font-size: .82rem; color: rgba(255,255,255,.8); }

.wrap { max-width: 760px; margin: 0 auto; padding: 18px 16px 30px; }
.h1 { font-family: 'Poppins', sans-serif; color: var(--green); font-size: 1.4rem; margin: 4px 0 2px; }
.sub { color: var(--ink-mid); line-height: 1.55; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: 0 8px 22px rgba(15,61,46,.06); }
.muted { color: var(--ink-light); font-size: .86rem; }
.btn { border: none; border-radius: 24px; padding: 12px 22px; font-family: inherit; font-weight: 800; cursor: pointer; }
.btn-gold { background: var(--gold); color: #241500; }
.btn-green { background: var(--green); color: #fff; }
.btn-ghost { background: #fff; border: 1.5px solid #ddd2b8; color: var(--green); }
.field { width: 100%; padding: 13px 16px; border: 1.5px solid #ddd2b8; border-radius: 12px; font-family: inherit; font-size: 1.02rem; background: #fff; }
.rtl { direction: rtl; text-align: right; }
[hidden] { display: none !important; }

/* Bottom tab bar (built by app.js) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: calc(var(--tabh) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(15,61,46,.06);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-light); font-size: .68rem; font-weight: 800;
}
.tabbar a svg { width: 23px; height: 23px; }
.tabbar a.on { color: var(--green); }
.tabbar a.on svg { stroke: var(--green); }

/* Shared verse styling reused by recite + read */
.ar-verse { font-family: 'Amiri', serif; font-size: 1.9rem; color: var(--green); direction: rtl; text-align: right; line-height: 2.1; }
.ar-verse .w { cursor: pointer; border-radius: 8px; padding: 0 2px; transition: background .15s; }
.ar-verse .w.lit { background: var(--gold); color: #241500; }
.ar-verse .w.open { background: var(--green); color: #fff; }
.translit { color: var(--ink-light); font-style: italic; margin-top: 10px; line-height: 1.6; }
.trans { color: var(--ink-mid); margin-top: 8px; line-height: 1.7; }
.spin { width: 22px; height: 22px; border: 3px solid #e3d8bd; border-top-color: var(--green); border-radius: 50%; animation: sp .8s linear infinite; margin: 14px auto; }
@keyframes sp { to { transform: rotate(360deg); } }
