/* al-Qawafi – all styles. Change the colours in :root to rebrand the app. */
:root {
  --brand: #8a5a2b;
  --brand-dark: #2a1a0c;
  --bg: #f8f3ec;
  --card: #ffffff;
  --text: #2a1a0c;
  --muted: #7a6a5a;
  --line: #eadfce;
  --font-arabic: "Geeza Pro", "Noto Naskh Arabic", "Traditional Arabic", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-arabic); font-size: 18px; line-height: 1.7; -webkit-text-size-adjust: 100%; }

.topbar { padding: calc(env(safe-area-inset-top) + 14px) 16px 14px; text-align: center; color: #fff; background: linear-gradient(135deg, var(--brand-dark), var(--brand)); }
.topbar h1 { margin: 0; font-size: 34px; }
.topbar p { margin: 0; opacity: .85; font-size: 15px; }

.content { max-width: 760px; margin: 0 auto; padding: 12px 12px calc(env(safe-area-inset-bottom) + 24px); }
.card { background: var(--card); border-radius: 16px; padding: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.field-label { display: block; font-weight: bold; margin-bottom: 8px; }

/* Letter picker */
.letters { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.letters button { font: inherit; font-size: 22px; padding: 4px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); }
.letters button.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: bold; }

/* Filter switches */
.filters { margin: 12px 0 4px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 2px; border-top: 1px solid var(--line); font-size: 16px; }
.switch-row input { position: absolute; opacity: 0; }
.switch-row i { position: relative; width: 50px; height: 30px; border-radius: 15px; background: #d9d0c4; transition: background .2s; flex: none; }
.switch-row i::after { content: ""; position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: right .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch-row input:checked + i { background: var(--brand); }
.switch-row input:checked + i::after { right: 23px; }
.switch-row input:disabled + i { opacity: .4; }

.filter-input { width: 100%; margin-top: 8px; font: inherit; font-size: 16px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }

/* Results */
.summary { color: var(--muted); font-size: 15px; margin: 14px 4px 8px; }
.words { display: flex; flex-wrap: wrap; gap: 6px; }
.word { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 2px 10px; font-size: 19px; }
