/* LEKANDO design system — single source of tokens. Logical properties for RTL/LTR. */
:root {
  --bg: #FFFFFF; --surface: #F4F7F8; --surface-2: #EAF0F1; --text: #10272C; --muted: #4A5F64;
  --primary: #0C3B40; --primary-hover: #082C30; --on-primary: #FFFFFF;
  --accent: #087F86; --accent-text: #066970; --gold: #B78A44; --gold-text: #7C5A22;
  --border: #D9E2E5; --focus: #087F86;
  --ok: #1B6E3A; --ok-bg: #E4F4EA; --warn: #7A4B00; --warn-bg: #FFF1D6; --err: #A12626; --err-bg: #FDE8E8; --info-bg: #E3F2F3;
  --radius: 16px; --radius-sm: 10px; --shadow: 0 2px 8px rgba(12, 59, 64, .08);
  --font: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --maxw: 1180px; --gutter: clamp(16px, 4vw, 32px);
  --t-fast: 150ms; --t-med: 210ms;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #09171C; --surface: #10262D; --surface-2: #163239; --text: #EDF5F5; --muted: #A9BFC2;
  --primary: #3FC1C8; --primary-hover: #66D3D8; --on-primary: #06181C;
  --accent: #3FC1C8; --accent-text: #6FD6DB; --gold: #D6B06F; --gold-text: #E2C48F;
  --border: #25444B; --focus: #6FD6DB;
  --ok: #7BD89A; --ok-bg: #12301F; --warn: #F2C46B; --warn-bg: #332709; --err: #F59C9C; --err-bg: #3A1515; --info-bg: #123036;
  --shadow: 0 2px 10px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09171C; --surface: #10262D; --surface-2: #163239; --text: #EDF5F5; --muted: #A9BFC2;
    --primary: #3FC1C8; --primary-hover: #66D3D8; --on-primary: #06181C;
    --accent: #3FC1C8; --accent-text: #6FD6DB; --gold: #D6B06F; --gold-text: #E2C48F;
    --border: #25444B; --focus: #6FD6DB;
    --ok: #7BD89A; --ok-bg: #12301F; --warn: #F2C46B; --warn-bg: #332709; --err: #F59C9C; --err-bg: #3A1515; --info-bg: #123036;
    --shadow: 0 2px 10px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); overflow-wrap: anywhere; }
img, svg, canvas, video { max-width: 100%; height: auto; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--primary); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.8rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--primary); color: var(--on-primary); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.stack > * + * { margin-top: 1rem; }
[hidden] { display: none !important; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.hdr { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 1; min-width: 0; }
.brand img { height: 34px; width: auto; flex-shrink: 0; }
.brand .brand-name { font-weight: 700; letter-spacing: .02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-inline-start: 12px; }
.nav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--text); transition: background var(--t-fast); }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface); }
.hdr-tools { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; flex-shrink: 0; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 12px; cursor: pointer; text-decoration: none; font: inherit; }
.icon-btn:hover { background: var(--surface); }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .nav { display: none; position: absolute; inset-inline: 0; top: 100%; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px var(--gutter) 16px; margin: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .menu-btn { display: inline-flex; }
  .hdr-tools .hide-sm { display: none; }
}
.ticker { background: var(--primary); color: var(--on-primary); font-size: .9rem; overflow: hidden; white-space: nowrap; }
.ticker a { color: inherit; }
.ticker-track { display: inline-block; padding: 6px 0; animation: ticker 40s linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker-track span { margin-inline: 24px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
[dir="rtl"] .ticker-track { animation-name: ticker-rtl; }
@keyframes ticker-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; border: 1px solid transparent; font: 600 1rem/1.2 var(--font); cursor: pointer; text-decoration: none; transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn-secondary { background: var(--bg); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--text); }
.btn-danger { background: var(--err); color: #fff; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .9rem; border-radius: 10px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.btn .spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(40px, 7vw, 88px) clamp(28px, 5vw, 56px); background:
  radial-gradient(1200px 400px at 85% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
  linear-gradient(180deg, var(--surface), var(--bg)); }
.hero-bg { position: absolute; inset: 0; opacity: .5; pointer-events: none; background-image:
  linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%); }
.hero .container { position: relative; }
.hero h1 { max-width: 18ch; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.hero-mark { width: 72px; height: 72px; margin-bottom: 16px; }
.hero-mark.shine { animation: shine 1.2s ease-out 1; }
@keyframes shine { from { filter: drop-shadow(0 0 0 transparent); opacity: .6; } 50% { filter: drop-shadow(0 0 14px color-mix(in srgb, var(--gold) 70%, transparent)); } to { filter: none; opacity: 1; } }

/* Choice hub: 6 options around a center on desktop, 2x3 grid on mobile */
.hub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.hub a { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform var(--t-med), border-color var(--t-med); }
.hub a:hover { transform: translateY(-2px); border-color: var(--accent); }
.hub .hub-ico { width: 36px; height: 36px; color: var(--accent-text); }
.hub strong { font-size: 1.05rem; }
@media (max-width: 720px) { .hub { grid-template-columns: repeat(2, 1fr); } .hub a { padding: 14px; } }

/* Sections, cards, grids */
.section { padding-block: clamp(32px, 5vw, 64px); }
.section-alt { background: var(--surface); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-2 { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.card h3 { margin: 0; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card.linked { position: relative; transition: border-color var(--t-med), transform var(--t-med); }
.card.linked:hover { border-color: var(--accent); transform: translateY(-2px); }
.card .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; }
.price { font-weight: 700; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.err { background: var(--err-bg); color: var(--err); border-color: transparent; }
.badge.info { background: var(--info-bg); color: var(--accent-text); border-color: transparent; }
.badge.gold { color: var(--gold-text); border-color: var(--gold); background: transparent; }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: s; padding: 16px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); }
.steps li::before { content: counter(s); display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center; background: var(--primary); color: var(--on-primary); font-weight: 700; margin-inline-end: 8px; }
.breadcrumbs { font-size: .9rem; margin-block: 16px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: "/"; margin-inline-end: 6px; color: var(--muted); }
.page-head { padding-block: 24px 8px; }
.notice { border-radius: var(--radius-sm); padding: 12px 14px; border: 1px solid var(--border); background: var(--surface); margin-block: 12px; }
.notice.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.notice.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.notice.err { background: var(--err-bg); color: var(--err); border-color: transparent; }
.notice.info { background: var(--info-bg); border-color: transparent; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
details.faq { border-bottom: 1px solid var(--border); padding-block: 10px; }
details.faq summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.prose { max-width: 72ch; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.two-col { display: grid; gap: 32px; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.sticky-aside { position: sticky; top: 84px; }
@media (max-width: 900px) { .sticky-aside { position: static; } }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
label, .label { font-weight: 600; }
.hint { font-size: .875rem; color: var(--muted); }
input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="url"], input[type="number"], input[type="date"], input[type="datetime-local"], input[type="search"], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent); outline-offset: 0; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--err); }
.field-error { color: var(--err); font-size: .9rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex-shrink: 0; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; margin: 0 0 16px; }
legend { font-weight: 700; padding-inline: 6px; }
.dropzone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 28px; text-align: center; background: var(--surface); }
.dropzone.drag { border-color: var(--accent); background: var(--info-bg); }
.progress { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); width: 0; transition: width var(--t-med); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: end; font-variant-numeric: tabular-nums; }

/* Footer */
.site-footer { margin-top: 48px; border-top: 1px solid var(--border); background: var(--surface); padding-block: 36px 24px; font-size: .95rem; }
.footer-cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.footer-cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-cols a { color: var(--text); text-decoration: none; }
.footer-cols a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: var(--muted); }

/* Consent banner */
.consent { position: fixed; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60; max-width: 560px; margin-inline: auto; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 30px rgba(0, 0, 0, .18); padding: 16px; }

/* App shells (admin / account / studio / family) */
.app { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.app-side { background: var(--surface); border-inline-end: 1px solid var(--border); padding: 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.app-side nav a { display: block; padding: 9px 12px; border-radius: 10px; color: var(--text); text-decoration: none; }
.app-side nav a:hover, .app-side nav a[aria-current="page"] { background: var(--surface-2); }
.app-side .group { margin-top: 14px; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-inline: 12px; }
.app-main { padding: 20px var(--gutter) 48px; min-width: 0; }
.app-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .app-side { position: static; height: auto; border-inline-end: 0; border-bottom: 1px solid var(--border); }
  .app-side nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .app-side .group { width: 100%; }
}
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.stat { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.stat .v { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: .85rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--text); border-bottom: 3px solid transparent; }
.tabs a[aria-current="page"] { border-bottom-color: var(--accent); font-weight: 700; }
.timeline { list-style: none; padding: 0; margin: 0; border-inline-start: 2px solid var(--border); }
.timeline li { padding: 4px 0 12px 0; padding-inline-start: 14px; position: relative; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: -7px; top: 10px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }

/* DJ theme */
.theme-dj { --primary: #1D1240; --primary-hover: #120A2B; --accent: #8A5CF6; --accent-text: #5B34C9; --gold: #C79A3F; }
:root[data-theme="dark"] .theme-dj { --primary: #B69CFF; --on-primary: #120A2B; --accent-text: #C8B4FF; }
.dj-hero { background: radial-gradient(600px 240px at 20% 0%, rgba(138, 92, 246, .25), transparent 70%), radial-gradient(500px 200px at 90% 20%, rgba(199, 154, 63, .18), transparent 70%), linear-gradient(180deg, #120A2B, #1D1240); color: #fff; padding-block: 48px 40px; }
.dj-hero h1, .dj-hero p { color: #fff; }
.dj-hero .eq { display: flex; gap: 4px; align-items: flex-end; height: 28px; margin-bottom: 14px; }
.dj-hero .eq span { width: 6px; background: #C79A3F; border-radius: 3px; animation: eq 1.4s ease-in-out infinite; }
.dj-hero .eq span:nth-child(2) { animation-delay: .2s; } .dj-hero .eq span:nth-child(3) { animation-delay: .4s; } .dj-hero .eq span:nth-child(4) { animation-delay: .6s; } .dj-hero .eq span:nth-child(5) { animation-delay: .8s; }
@keyframes eq { 0%, 100% { height: 8px; } 50% { height: 26px; } }
.btn-call { background: #1B6E3A; color: #fff; } .btn-call:hover { background: #145a2f; color: #fff; }
.btn-wa { background: #0B6B3E; color: #fff; } .btn-wa:hover { background: #075231; color: #fff; }
.contact-bar { display: none; }
@media (max-width: 720px) {
  .contact-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; inset-inline: 0; bottom: 0; z-index: 50; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--border); }
  .contact-bar .btn { min-height: 52px; }
  body.has-contact-bar { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* Soso theme: cheerful, calm, big targets */
.theme-soso { --primary: #6A2C91; --primary-hover: #52206F; --accent: #D0457C; --accent-text: #A8285C; --surface: #FFF6FB; --border: #F1D5E5; }
:root[data-theme="dark"] .theme-soso { --primary: #E4B3FF; --on-primary: #2A0E3A; --accent-text: #FF9CC4; --surface: #2A1830; --border: #4A2C52; }
.theme-soso .btn { min-height: 56px; font-size: 1.1rem; border-radius: 18px; }
.theme-soso body, .theme-soso { font-size: 18px; }

/* Islam reading */
.theme-calm { --accent: #2F6F5E; --accent-text: #245A4C; }
.quran { font-family: "Amiri Quran", "KFGQPC Uthmanic Script HAFS", "Scheherazade New", "Traditional Arabic", serif; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 2.3; text-align: justify; }
.ayah-num { display: inline-flex; align-items: center; justify-content: center; min-width: 1.8em; height: 1.8em; margin-inline: .2em; border: 1px solid var(--gold); border-radius: 50%; font: 600 .55em/1 var(--font); color: var(--gold-text); vertical-align: middle; }
.dhikr { font-size: 1.3rem; line-height: 2.1; }
.counter-btn { min-width: 120px; min-height: 56px; font-size: 1.2rem; }

/* Tools */
.tool-area { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; background: var(--bg); }
.file-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.file-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.file-list li .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-canvas { background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--bg) 0 50%) 0 0 / 16px 16px; border: 1px solid var(--border); border-radius: 10px; max-height: 60vh; }
pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }
pre { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; overflow-x: auto; white-space: pre-wrap; }
.invoice { background: #fff; color: #10272C; max-width: 820px; margin: 0 auto; padding: 32px; border: 1px solid #D9E2E5; font-family: Arial, sans-serif; }
.invoice table th { background: #F4F7F8; }
.qr { width: 132px; height: 132px; }
@media print {
  .site-header, .site-footer, .no-print, .consent, .contact-bar { display: none !important; }
  body { background: #fff; color: #000; }
  .invoice { border: 0; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .ticker-track { animation: none !important; white-space: normal; }
}

/* Theme-aware brand images */
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: inline; }
}
.icon-btn { white-space: nowrap; }
@media (max-width: 480px) {
  .brand img { height: 28px; }
  .hdr { gap: 6px; }
  .hdr-tools { gap: 4px; }
  .icon-btn { min-width: 40px; padding: 0 8px; }
}
.narrow { max-width: 640px; }
.grow { flex: 1; min-width: 220px; }
.demo-frame { border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.qibla-dial { width: 180px; height: 180px; margin: 12px auto; border-radius: 50%; border: 3px solid var(--border); position: relative; background: var(--surface); }
.qibla-dial .needle { position: absolute; left: 50%; top: 10px; width: 6px; height: 80px; margin-left: -3px; background: var(--gold); border-radius: 3px; transform-origin: 50% 80px; transition: transform var(--t-fast); }
li.done { opacity: .7; }
li.done .counter-btn { background: var(--ok); }

/* ---------- Soso components ---------- */
.soso-hero h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.soso-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: var(--s3, 12px); margin-block: var(--s4, 16px); }
.soso-tiles.small-tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.soso-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 20px; background: var(--surface); border: 2px solid var(--border); color: var(--text); text-decoration: none; min-height: 56px; }
.soso-tile:hover, .soso-tile:focus-visible { border-color: var(--primary); }
.soso-ico { font-size: 2.2rem; line-height: 1; }
.soso-list li { padding-block: 4px; }
.soso-score { font-weight: 700; font-size: 1.2rem; }
.flash { display: grid; gap: 12px; justify-items: center; }
.flash-card { margin: 0; width: min(100%, 420px); aspect-ratio: 4 / 3; display: grid; place-content: center; text-align: center; border-radius: 28px; background: var(--surface); border: 3px solid var(--border); }
.flash-big { font-size: clamp(3rem, 16vw, 7rem); font-weight: 800; line-height: 1.1; color: var(--primary); margin: 0; text-align: center; }
.flash-emoji { font-size: 1.6rem; }
.flash-count { font-weight: 700; min-width: 5ch; text-align: center; }
.quiz-q .btn.is-right { background: var(--ok-bg, #E6F4EA); border-color: var(--ok, #1E7A3C); color: var(--ok, #1E7A3C); }
.quiz-q .btn.is-wrong { background: var(--err-bg, #FDECEC); border-color: var(--err, #B3261E); color: var(--err, #B3261E); }
.hifz { list-style: none; padding: 0; display: grid; gap: 12px; }
.hifz-ayah.is-done { border-color: var(--ok, #1E7A3C); }
.quran-line { font-family: "Amiri Quran", "KFGQPC Uthmanic Script HAFS", "Scheherazade New", "Traditional Arabic", serif; font-size: 1.7rem; line-height: 2.2; margin: 0; }
.hide-text .hifz-ayah [data-text] { filter: blur(8px); user-select: none; }
.hide-text .hifz-ayah.peek [data-text] { filter: none; }
.hifz-bar { height: 12px; border-radius: 99px; background: var(--border); overflow: hidden; }
.hifz-bar span { display: block; height: 100%; width: 0; background: var(--primary); transition: width .3s; }
.pulse { animation: soso-pulse .5s; }
@keyframes soso-pulse { 50% { transform: scale(1.02); } }
.memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 360px; margin-block: 12px; }
.mem-card { aspect-ratio: 1; font-size: 2rem; border-radius: 14px; border: 2px solid var(--border); background: var(--primary); color: var(--on-primary, #fff); cursor: pointer; }
.mem-card.open, .mem-card:disabled { background: var(--surface); color: inherit; }
.ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 300px; margin-block: 12px; }
.ttt-cell { aspect-ratio: 1; font-size: 2.2rem; border-radius: 14px; border: 2px solid var(--border); background: var(--surface); cursor: pointer; }
.ttt-cell.win { border-color: var(--accent); background: var(--accent); }
.soso-counter { font-size: 3rem; min-width: 160px; min-height: 120px; }
.uae-flag { display: grid; grid-template-columns: 1fr 3fr; grid-template-rows: repeat(3, 1fr); width: min(100%, 300px); aspect-ratio: 2 / 1; border: 1px solid var(--border); margin-block: 8px; }
.uae-flag .r { grid-row: 1 / 4; background: #EF3340; }
.uae-flag .g { background: #009739; } .uae-flag .w { background: #FFFFFF; } .uae-flag .b { background: #000000; }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } .hifz-bar span { transition: none; } }
