:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --text: #1a2e24;
  --muted: #5a6f64;
  --primary: #0d6b4c;
  --primary-dark: #095239;
  --primary-soft: #e6f4ee;
  --accent: #c9a227;
  --danger: #b42318;
  --warn: #b54708;
  --info: #175cd3;
  --success: #027a48;
  --border: #d8e3dc;
  --shadow: 0 8px 24px rgba(13, 107, 76, 0.08);
  --radius: 14px;
  --font: "Segoe UI", "Tahoma", "Arial", sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: var(--font);
  background: linear-gradient(180deg, #eef6f1 0%, var(--bg) 220px);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px;
  background: linear-gradient(180deg, #0d6b4c, #084833);
  color: #fff;
  padding: 1.25rem 1rem 2rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}
.brand {
  display: flex; align-items: center; gap: .75rem;
  padding: .5rem .75rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
  margin-bottom: 1rem;
}
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255,255,255,.15);
  display: grid; place-items: center;
  font-weight: 700; font-size: 1.2rem;
}
.brand h1 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.brand small { opacity: .8; font-size: .75rem; display: block; }
.nav a {
  display: flex; align-items: center; gap: .6rem;
  color: rgba(255,255,255,.92);
  padding: .7rem .85rem;
  border-radius: 10px;
  margin-bottom: .25rem;
  text-decoration: none;
  font-weight: 500;
}
.nav a:hover, .nav a.active {
  background: rgba(255,255,255,.14);
  text-decoration: none;
}
.nav .nav-section {
  margin: 1rem .85rem .4rem;
  font-size: .72rem;
  letter-spacing: .04em;
  opacity: .65;
  text-transform: uppercase;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 1rem 1.5rem; background: rgba(255,255,255,.8);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.topbar-title { margin: 0; font-size: 1.25rem; }
.topbar-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.user-chip {
  background: var(--primary-soft); color: var(--primary-dark);
  padding: .35rem .75rem; border-radius: 999px; font-size: .9rem; font-weight: 600;
}
.badge-count {
  background: #f04438; color: #fff; border-radius: 999px;
  padding: 0 .45rem; font-size: .75rem; margin-inline-start: .25rem;
}
.content { padding: 1.25rem 1.5rem 2.5rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 .35rem; font-size: .9rem; color: var(--muted); font-weight: 600; }
.card .value { font-size: 1.8rem; font-weight: 800; color: var(--primary-dark); }
.card.stat-present .value { color: var(--success); }
.card.stat-absent .value { color: var(--danger); }
.card.stat-late .value { color: var(--warn); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.panel-header {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: #fafcfb;
}
.panel-header h2 { margin: 0; font-size: 1.05rem; }
.panel-body { padding: 1.1rem 1.2rem; }

.table-wrap { overflow-x: auto; }
table.data {
  width: 100%; border-collapse: collapse; font-size: .95rem;
}
table.data th, table.data td {
  padding: .75rem .85rem; text-align: right;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.data th {
  background: #f3f8f5; color: var(--muted); font-weight: 700; font-size: .85rem;
}
table.data tr:hover td { background: #f8fbf9; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  border: none; border-radius: 10px; padding: .55rem 1rem;
  font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: .15s ease;
}
.btn:hover { text-decoration: none; filter: brightness(.96); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: #e8efeB; color: var(--text); }
.btn-danger { background: #fef3f2; color: var(--danger); border: 1px solid #fecdca; }
.btn-sm { padding: .35rem .7rem; font-size: .85rem; border-radius: 8px; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-group.full { grid-column: 1 / -1; }
label { font-weight: 600; font-size: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input[type=tel], select, textarea {
  width: 100%; padding: .65rem .75rem; border: 1px solid var(--border);
  border-radius: 10px; font: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(13,107,76,.25); border-color: var(--primary);
}
textarea { min-height: 90px; resize: vertical; }
.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.help { color: var(--muted); font-size: .85rem; }

.alert {
  padding: .85rem 1rem; border-radius: 12px; margin-bottom: 1rem;
  font-weight: 600;
}
.alert-success { background: #ecfdf3; color: var(--success); border: 1px solid #abefc6; }
.alert-error { background: #fef3f2; color: var(--danger); border: 1px solid #fecdca; }
.alert-info { background: #eff8ff; color: var(--info); border: 1px solid #b2ddff; }

.badge {
  display: inline-block; padding: .2rem .55rem; border-radius: 999px;
  font-size: .8rem; font-weight: 700; background: #eef2f0; color: var(--muted);
}
.badge-success { background: #ecfdf3; color: var(--success); }
.badge-danger { background: #fef3f2; color: var(--danger); }
.badge-warn { background: #fffaeb; color: var(--warn); }
.badge-info { background: #eff8ff; color: var(--info); }

.empty {
  text-align: center; color: var(--muted); padding: 2rem 1rem;
}

/* Auth / guest */
.guest-body {
  min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
  background:
    radial-gradient(circle at top right, rgba(201,162,39,.18), transparent 40%),
    radial-gradient(circle at bottom left, rgba(13,107,76,.18), transparent 45%),
    var(--bg);
}
.login-card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
}
.login-card .logo {
  text-align: center; margin-bottom: 1.5rem;
}
.login-card .logo .mark {
  width: 64px; height: 64px; margin: 0 auto .75rem;
  border-radius: 18px; background: var(--primary); color: #fff;
  display: grid; place-items: center; font-size: 1.6rem; font-weight: 800;
}
.login-card h1 { margin: 0; font-size: 1.4rem; }
.login-card p.sub { margin: .35rem 0 0; color: var(--muted); }

.filters {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: end;
  margin-bottom: 1rem;
}
.filters .form-group { min-width: 160px; }
.radio-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.radio-pill {
  border: 1px solid var(--border); border-radius: 999px; padding: .35rem .7rem;
  background: #fff; cursor: pointer; font-size: .85rem;
}
.radio-pill input { margin-left: .35rem; }
.notif-item {
  padding: 1rem 0; border-bottom: 1px solid var(--border);
}
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: #f6fbf8; margin: 0 -1.2rem; padding: 1rem 1.2rem; }
.notif-item h3 { margin: 0 0 .25rem; font-size: 1rem; }
.notif-item p { margin: 0; color: var(--muted); }
.notif-meta { font-size: .8rem; color: var(--muted); margin-top: .35rem; }

.mobile-toggle {
  display: none; border: none; background: var(--primary); color: #fff;
  border-radius: 10px; padding: .5rem .8rem; font: inherit; font-weight: 700;
}

/* ===== Mobile / tablet (off-canvas sidebar, RTL) ===== */
@media (max-width: 992px) {
  html, body { overflow-x: hidden; }
  .app-shell { display: block; }
  .main { width: 100%; min-width: 0; }
  /* v1.7: no side drawer on phones/tablets — navigation = bottom bar + "المزيد" sheet */
  .sidebar, .sidebar-backdrop, .mobile-toggle { display: none !important; }

  .topbar { padding: .6rem 1rem; gap: .5rem; flex-wrap: wrap; }
  .topbar > div:first-child { min-width: 0; flex: 1 1 auto; }
  .topbar-title { font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .topbar-actions { gap: .5rem; flex-wrap: nowrap; min-width: 0; }
  .user-chip { font-size: .8rem; padding: .3rem .6rem; max-width: 52vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .content { padding: 1rem 1rem 2rem; }

  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .panel-body .cards { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
  .card { padding: .85rem .9rem; min-width: 0; }
  .card .value { font-size: 1.5rem; overflow-wrap: anywhere; }
  .panel-header { padding: .85rem 1rem; }
  .panel-body { padding: 1rem; }
  .notif-item.unread { margin: 0 -1rem; padding: 1rem; }

  .table-wrap { -webkit-overflow-scrolling: touch; max-width: 100%; }
  table.data { font-size: .88rem; }
  table.data th, table.data td { padding: .6rem .65rem; }
  table.data th, table.data td { white-space: nowrap; } /* scroll inside .table-wrap instead of squashing columns */

  table.data td input[type=text], table.data td select { min-width: 130px; }
  .form-grid { grid-template-columns: 1fr; }
  .filters .form-group { min-width: 0; flex: 1 1 140px; }
  .filters .btn { flex: 0 0 auto; }
  img, video, iframe { max-width: 100%; height: auto; }
}
@media (max-width: 420px) {
  .topbar-title { font-size: 1rem; }
  .user-chip { max-width: 46vw; }
  .card h3 { font-size: .82rem; }
  .login-card { padding: 1.5rem 1.1rem; }
  .guest-body { padding: 1rem; }
}

/* Public landing */
.public-nav {
  background: linear-gradient(90deg, #0d6b4c, #084833);
  color: #fff; padding: .85rem 1.25rem;
}
.public-nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.public-brand { color: #fff; text-decoration: none; display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.public-brand .brand-mark {
  width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.15);
  display: grid; place-items: center;
}
.public-brand small { opacity: .8; font-weight: 500; }
.public-nav nav { display: flex; gap: .85rem; flex-wrap: wrap; }
.public-nav nav a { color: #fff; text-decoration: none; font-weight: 600; opacity: .92; }
.public-nav nav a:hover { text-decoration: underline; }
.public-main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.25rem 2.5rem; }
.public-footer { text-align: center; color: var(--muted); padding: 1.5rem; font-size: .9rem; }

.hero { margin-bottom: 1.25rem; }
.hero-card {
  background: linear-gradient(135deg, #0d6b4c, #147a58 55%, #c9a227);
  color: #fff; border-radius: 22px; padding: 2rem 1.5rem; box-shadow: var(--shadow);
}
.hero .eyebrow { opacity: .85; margin: 0 0 .35rem; font-weight: 700; }
.hero h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.hero-mosque { opacity: .9; margin: .35rem 0 0; }
.hero-intro { max-width: 40rem; margin: 1rem 0 1.25rem; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.hero-actions .btn-secondary { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.hero-actions .btn-primary { background: #fff; color: #0d6b4c; }

.progress-card {
  border: 1px solid var(--border); border-radius: 14px; padding: 1rem;
  margin-bottom: .85rem; background: #fafcfb;
}
.progress-card-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.progress-card h3 { margin: 0; font-size: 1.05rem; }
.att-ring {
  background: var(--primary-soft); color: var(--primary-dark);
  border-radius: 14px; padding: .5rem .85rem; text-align: center; min-width: 90px;
}
.att-ring strong { display: block; font-size: 1.3rem; }
.att-ring span { font-size: .75rem; }
.badge-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.award-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  background: #fff8e8; border: 1px solid #ecd28a; color: #7a5a00;
  border-radius: 999px; padding: .35rem .75rem; font-weight: 700; font-size: .88rem;
  text-decoration: none;
}
.award-chip:hover { filter: brightness(.97); text-decoration: none; }

/* ===== v1.2 — Hizb map (60 ahzab × 8 athman) ===== */
.hizb-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-bottom: .6rem; }
.hizb-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-inline-end: .25rem; }
.lg-done { background: var(--success); } .lg-partial { background: #f5b83d; } .lg-none { background: #e3ebe6; border: 1px solid var(--border); }
.hizb-map { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: .4rem; }
.hizb-cell {
  border: 1px solid var(--border); border-radius: 10px; padding: .35rem .3rem .3rem;
  background: #f6f9f7; display: flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 0;
}
.hizb-cell .hz-no { font-weight: 800; font-size: .95rem; line-height: 1.1; }
.hizb-cell .hz-surah { font-size: .62rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hizb-cell .hz-bar { display: grid; grid-template-columns: repeat(8, 1fr); gap: 1px; width: 100%; height: 6px; }
.hizb-cell .hz-bar i { background: #dfe8e2; border-radius: 1px; }
.hizb-cell .hz-bar i.m { background: var(--success); }
.hizb-cell .hz-bar i.p { background: #f5b83d; }
.hizb-cell.st-done { background: #e3f6ec; border-color: #9fdcbc; }
.hizb-cell.st-done .hz-no { color: var(--success); }
.hizb-cell.st-partial { background: #fff7e6; border-color: #f3d38c; }
.hizb-cell.st-partial .hz-no { color: var(--warn); }
.hizb-map.compact { grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 3px; }
.hizb-map.compact .hizb-cell { padding: .15rem 0 .2rem; border-radius: 6px; }
.hizb-map.compact .hz-no { font-size: .7rem; }
.hizb-map.compact .hz-bar { height: 4px; }

/* Lawh form */
fieldset.lawh-mode { border: 1px solid var(--border); border-radius: 12px; padding: .75rem 1rem 1rem; margin: 1rem 0 0; }
fieldset.lawh-mode legend { font-weight: 700; padding: 0 .4rem; color: var(--primary-dark); }
.range-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.range-box { background: #fafcfb; border: 1px dashed var(--border); border-radius: 10px; padding: .6rem .75rem; min-width: 0; }
.range-title { font-weight: 800; color: var(--primary); display: block; margin-bottom: .35rem; }
.range-selects { display: flex; gap: .6rem; flex-wrap: wrap; }
.range-selects label { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; flex: 1 1 90px; }
.radio-pill.status-ok:has(input:checked) { background: #ecfdf3; border-color: #75e0a7; color: var(--success); font-weight: 700; }
.radio-pill.status-retry:has(input:checked) { background: #fffaeb; border-color: #fec84b; color: var(--warn); font-weight: 700; }
.radio-pill:has(input:checked) { border-color: var(--primary); }

@media (max-width: 992px) {
  .hizb-map { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .hizb-map.compact { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .range-row { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .hizb-map { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .3rem; }
  .hizb-cell .hz-surah { font-size: .58rem; }
}

/* ===== v1.3 — Fees / payments ===== */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tabs a { padding: .45rem .9rem; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-weight: 600; font-size: .9rem; color: var(--text); }
.tabs a.active, .tabs a:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }
.month-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem; }
.month-chip { display: flex; flex-direction: column; gap: .1rem; border: 1px solid var(--border); border-radius: 10px; padding: .45rem .6rem; background: #fff; font-size: .85rem; position: relative; }
label.month-chip { cursor: pointer; padding-inline-start: 2rem; }
label.month-chip input { position: absolute; inset-inline-start: .6rem; top: .7rem; width: 1rem; height: 1rem; }
.month-chip .mc-month { font-weight: 700; }
.month-chip .mc-status { color: var(--muted); font-size: .78rem; }
.month-chip.st-paid { background: #ecfdf3; border-color: #abefc6; } .month-chip.st-paid .mc-status { color: var(--success); }
.month-chip.st-unpaid { background: #fef3f2; border-color: #fecdca; } .month-chip.st-unpaid .mc-status { color: var(--danger); }
.month-chip.st-exempt { background: #eff8ff; border-color: #b2ddff; } .month-chip.st-exempt .mc-status { color: var(--info); }
.month-chip.is-disabled { opacity: .75; cursor: default; }
label.month-chip:has(input:checked) { outline: 2px solid var(--primary); background: var(--primary-soft); }
tr.row-void td { opacity: .55; text-decoration: line-through; }
tr.row-void td:first-child, tr.row-void td:last-child { text-decoration: none; }
.void-box summary { list-style: none; cursor: pointer; }
.void-box summary::-webkit-details-marker { display: none; }
.void-box form { display: flex; gap: .35rem; margin-top: .35rem; min-width: 220px; }
.void-box input { padding: .35rem .5rem; }
@media (max-width: 992px) {
  .month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.month-chip.st-upcoming .mc-status { color: var(--muted); }

/* ===== v1.4: seasons, student file, exports, WhatsApp, PWA ===== */
.season-chip {
  display: inline-block; margin-top: .3rem; padding: .05rem .55rem;
  border-radius: 999px; background: rgba(255,255,255,.14); font-size: .72rem;
}
fieldset.fs {
  border: 1px solid var(--border); border-radius: 12px;
  padding: .75rem 1rem 1rem; margin: 0 0 1rem; min-width: 0;
}
fieldset.fs legend { padding: 0 .4rem; font-weight: 700; color: var(--primary); max-width: 100%; white-space: normal; }
.check-list { display: flex; flex-direction: column; gap: .5rem; }
.check-list label { display: flex; align-items: flex-start; gap: .5rem; font-weight: 500; line-height: 1.5; cursor: pointer; }
.check-list input[type=checkbox] { margin-top: .3rem; flex: 0 0 auto; width: 1.1rem; height: 1.1rem; }
.info-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .6rem 1rem; margin: 0;
}
.info-grid > div { min-width: 0; }
.info-grid dt { font-size: .78rem; color: var(--muted); }
.info-grid dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 1.25rem; }
.two-col > .panel { min-width: 0; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: .3rem 0; border-bottom: 1px dashed var(--border); overflow-wrap: anywhere; }
.plain-list li:last-child { border-bottom: 0; }
.plain-list.small li { padding: .1rem 0; border: 0; }
.small, small.small { font-size: .8rem; }
.inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.inline-actions select, .inline-actions input[type=text] { width: auto; min-width: 0; max-width: 100%; padding: .3rem .5rem; font-size: .85rem; }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #1ebe5b; color: #fff; }
.export-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .85rem; }
.export-card {
  display: flex; flex-direction: column; gap: .3rem; padding: 1rem;
  border: 1px solid var(--border); border-radius: 12px; background: var(--primary-soft); color: var(--text);
}
.export-card:hover { text-decoration: none; border-color: var(--primary); }
.export-card span { font-size: .85rem; color: var(--muted); }
.promote-block { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 1rem; overflow: hidden; }
.promote-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .6rem .85rem; background: var(--primary-soft);
}
.promote-head select { width: auto; max-width: 100%; }
.panel-alert { border: 1px solid #fecdca; background: #fffbfa; }
.panel-alert .panel-header h2 { color: var(--danger); }
.pager { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; align-items: center; }
td.wrap { white-space: normal; min-width: 160px; max-width: 320px; overflow-wrap: anywhere; }
@media (max-width: 420px) {
  fieldset.fs { padding: .6rem .7rem .8rem; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  td.wrap { min-width: 130px; }
}
@media (max-width: 600px) {
  .promote-block table.data tr { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--border); }
  .promote-block table.data td { border: 0; white-space: normal; padding: .4rem .6rem; }
  .promote-block table.data td:last-child { flex: 1 1 100%; padding-top: 0; }
  .promote-block table.data td select { width: 100%; }
}

/* ===== v1.5: timetable, tests, reports ===== */
.tt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .85rem; }
.tt-day { background: var(--primary-soft); border-radius: 12px; padding: .6rem; min-width: 0; }
.tt-day h3 { margin: 0 0 .5rem; font-size: 1rem; color: var(--primary); }
.tt-slot { display: flex; flex-direction: column; gap: .1rem; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: .5rem .6rem; margin-bottom: .45rem; color: var(--text); }
.tt-slot:hover { text-decoration: none; border-color: var(--primary); }
.tt-time { font-weight: 700; color: var(--primary); font-size: .85rem; align-self: flex-start; }
@media print {
  .sidebar, .topbar, .mobile-toggle, .sidebar-backdrop, .no-print, .btn, .alert { display: none !important; }
  .content { padding: 0 !important; }
  .panel { box-shadow: none !important; border: 1px solid #ccc; break-inside: avoid; }
  body { background: #fff !important; }
  .main, .layout { margin: 0 !important; }
}
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .4rem .9rem; }
.score-table input.score { width: 4.6rem; padding: .35rem .4rem; text-align: center; }
details.panel > summary { cursor: pointer; list-style: none; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary h2::before { content: '▸ '; }
details.panel[open] > summary h2::before { content: '▾ '; }
.print-only { display: none; }
@media print { .print-only { display: block; } }
/* ===== v1.6: finance, teachers, achievements ===== */
tr.voided td { text-decoration: line-through; color: var(--muted); }
tr.voided td:last-child { text-decoration: none; }
details.void-box > summary { list-style: none; display: inline-flex; }
details.void-box > summary::-webkit-details-marker { display: none; }
.stars { color: var(--accent); letter-spacing: 1px; white-space: nowrap; }
.rating-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; padding: .35rem 0; border-bottom: 1px dashed var(--border); }
.rating-row select { width: auto; }

/* ===================== v1.7 — mobile-first UX ===================== */
.ico { display: block; flex: 0 0 auto; }
.topbar-start { display: flex; align-items: center; gap: .75rem; min-width: 0; flex: 1 1 auto; }
.topbar-logout { display: inline; margin: 0; }
.topbar-bell { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--primary-dark); background: var(--primary-soft); }
.dot-count { position: absolute; top: -4px; inset-inline-end: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #e5352b; color: #fff; font-size: .68rem; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.dot-count.dot-only { min-width: 10px; width: 10px; height: 10px; padding: 0; top: -1px; inset-inline-end: -2px; }

/* Bottom navigation (phones/tablets only) */
.bottom-nav {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 50;
  display: flex; align-items: stretch; justify-content: space-around;
  background: #fff; border-top: 1px solid var(--border);
  box-shadow: 0 -6px 20px rgba(13, 107, 76, .08);
  padding: 4px max(6px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
}
.bn-item {
  flex: 1 1 0; min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: #5a6f64; background: none; border: 0; font: inherit; font-size: .74rem; font-weight: 700; cursor: pointer; text-decoration: none; border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
}
.bn-item:hover { text-decoration: none; }
.bn-ico { position: relative; display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; transition: background .15s; }
.bn-item.active { color: var(--primary-dark); }
.bn-item.active .bn-ico { background: var(--primary-soft); color: var(--primary); }
.bn-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* "المزيد" full-screen sheet */
.more-sheet {
  position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top); animation: msIn .18s ease-out;
}
@keyframes msIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.ms-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 1rem; background: linear-gradient(90deg, #0d6b4c, #084833); color: #fff; }
.ms-brand { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.ms-brand .brand-mark { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.15); display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
.ms-brand small { display: block; opacity: .85; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-close { width: 44px; height: 44px; border-radius: 12px; border: 0; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
.ms-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: .5rem 1rem calc(1.5rem + env(safe-area-inset-bottom)); }
.ms-section h3 { margin: 1rem .25rem .5rem; font-size: .8rem; color: var(--muted); font-weight: 800; }
.ms-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.ms-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; text-align: center;
  min-height: 84px; padding: .6rem .35rem; border-radius: 14px; background: #fff; border: 1px solid var(--border); color: var(--text);
  font-size: .82rem; font-weight: 700; line-height: 1.3; text-decoration: none;
}
.ms-tile:hover { text-decoration: none; border-color: var(--primary); }
.ms-tile.active { border-color: var(--primary); background: var(--primary-soft); }
.ms-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.ms-tile .badge-count { position: absolute; top: 6px; inset-inline-end: 6px; margin: 0; }
.ms-logout { margin-top: 1.25rem; }
.ms-logout .btn { width: 100%; min-height: 48px; }
body.sheet-open { overflow: hidden; }

@media (max-width: 992px) {
  .content { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .topbar { padding: .5rem 1rem; padding-top: max(.5rem, env(safe-area-inset-top)); flex-wrap: nowrap; }
  .topbar .user-chip, .topbar .topbar-logout { display: none; }
  .topbar-title { font-size: 1.1rem; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; }
}

/* Generic: section tabs (parent child page) */
.seg-tabs { display: flex; gap: .4rem; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: .25rem .1rem .6rem; margin-bottom: .5rem; position: sticky; top: 61px; z-index: 15; background: linear-gradient(180deg, var(--bg) 85%, rgba(244,247,245,0)); }
.seg-tabs::-webkit-scrollbar { display: none; }
.seg-tabs a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--text); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.seg-tabs a:hover { text-decoration: none; }
.seg-tabs a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.js .tab-panel { display: none; }
.js .tab-panel.active { display: block; }

/* Parent "today" card */
.today-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 1rem; overflow: hidden; }
.tc-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem 1rem .5rem; }
.tc-head h3 { margin: 0; font-size: 1.1rem; }
.tc-head h3 a { color: var(--text); }
.tc-head small { color: var(--muted); display: block; font-size: .8rem; }
.tc-ring { flex: 0 0 auto; text-align: center; line-height: 1.2; }
.tc-ring small { display: block; font-size: .72rem; color: var(--muted); }
.tc-status { display: flex; align-items: center; gap: .5rem; padding: .2rem 1rem .6rem; font-weight: 800; font-size: 1.05rem; }
.tc-status .st-dot { width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center; color: #fff; font-size: .9rem; flex: 0 0 auto; }
.st-present .st-dot { background: var(--success); } .st-present { color: var(--success); }
.st-absent .st-dot { background: var(--danger); } .st-absent { color: var(--danger); }
.st-late .st-dot { background: #dc8a0e; } .st-late { color: var(--warn); }
.st-excused .st-dot { background: var(--info); } .st-excused { color: var(--info); }
.st-none .st-dot { background: #9aa9a1; } .st-none { color: var(--muted); }
.tc-body { padding: 0 1rem .75rem; display: grid; gap: .5rem; }
.tc-row { display: flex; gap: .6rem; align-items: flex-start; background: #f6faf8; border-radius: 12px; padding: .6rem .75rem; }
.tc-row .tc-k { flex: 0 0 auto; font-size: .78rem; color: var(--muted); font-weight: 700; min-width: 4.2rem; padding-top: .1rem; }
.tc-row .tc-v { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.tc-row .tc-v .badge { margin-inline-start: .25rem; }
.tc-strip { display: flex; gap: .35rem; justify-content: space-between; padding: .5rem 1rem .75rem; }
.tc-day { flex: 1 1 0; text-align: center; font-size: .7rem; color: var(--muted); min-width: 0; }
.tc-day i { display: grid; place-items: center; width: 30px; height: 30px; margin: 0 auto .15rem; border-radius: 999px; font-style: normal; font-weight: 800; color: #fff; font-size: .8rem; }
.tc-day.s-present i { background: var(--success); } .tc-day.s-absent i { background: var(--danger); } .tc-day.s-late i { background: #dc8a0e; } .tc-day.s-excused i { background: var(--info); }
.tc-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; padding: .65rem 1rem; border-top: 1px solid var(--border); background: #fafcfb; }
.tc-foot form { margin: 0; }
.btn-seen { min-height: 44px; padding-inline: 1.25rem; border-radius: 999px; }
.seen-ok { color: var(--success); font-weight: 800; display: inline-flex; align-items: center; gap: .35rem; }
.tc-old { margin: 0 1rem .5rem; padding: .35rem .7rem; border-radius: 10px; background: #fffaeb; color: var(--warn); font-size: .82rem; font-weight: 700; }

/* Attendance — group chips, segmented status, sticky save bar */
.chip-row { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .25rem; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.chip:hover { text-decoration: none; border-color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip .chip-n { font-size: .75rem; opacity: .8; }
.att-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin: .25rem 0 .75rem; }
.att-list { display: grid; gap: .6rem; }
.att-row { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: .7rem .75rem; display: grid; gap: .55rem; }
.att-row-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-width: 0; }
.att-name { font-weight: 800; min-width: 0; overflow-wrap: anywhere; }
.att-meta { display: flex; gap: .3rem; flex-wrap: wrap; align-items: center; }
.seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; background: #eef3f0; border-radius: 12px; padding: 4px; }
.seg-opt { position: relative; margin: 0; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg-opt span { display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 9px; font-weight: 800; font-size: .92rem; color: #4b5d54; transition: background .12s, color .12s; user-select: none; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 1px; }
.seg-present input:checked + span { background: var(--success); color: #fff; }
.seg-absent input:checked + span { background: var(--danger); color: #fff; }
.seg-late input:checked + span { background: #dc8a0e; color: #fff; }
.seg-excused input:checked + span { background: var(--info); color: #fff; }
.att-note summary { cursor: pointer; color: var(--muted); font-size: .82rem; font-weight: 700; list-style: none; display: inline-flex; min-height: 32px; align-items: center; }
.att-note summary::-webkit-details-marker { display: none; }
.att-note input { margin-top: .35rem; }
.sticky-bar {
  position: sticky; bottom: 0; z-index: 30; margin: 1rem -1.2rem -1.1rem; padding: .7rem 1.2rem;
  background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap;
}
.sticky-bar .btn-primary { min-height: 48px; padding-inline: 1.5rem; font-size: 1rem; }
.tally { display: flex; gap: .35rem; flex-wrap: wrap; font-size: .82rem; font-weight: 800; }
.tally span { padding: .15rem .5rem; border-radius: 999px; }
.tally .t-present { background: #ecfdf3; color: var(--success); } .tally .t-absent { background: #fef3f2; color: var(--danger); }
.tally .t-late { background: #fffaeb; color: var(--warn); } .tally .t-excused { background: #eff8ff; color: var(--info); }
@media (max-width: 992px) {
  .sticky-bar { bottom: calc(64px + env(safe-area-inset-bottom)); margin: 1rem -1rem -1rem; padding: .6rem 1rem; }
}
@media (min-width: 993px) {
  .att-list { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
}

/* Heatmaps */
.hm-legend { display: flex; gap: .6rem; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin: .25rem 0 .6rem; }
.hm-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-inline-end: .25rem; }
.hm-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; max-width: 420px; }
.hm-cal .hm-dow { font-size: .68rem; color: var(--muted); text-align: center; font-weight: 700; }
.hm-cell { aspect-ratio: 1 / 1; border-radius: 7px; background: #eef2f0; display: grid; place-items: center; font-size: .72rem; font-weight: 700; color: #6b7c73; min-width: 0; }
.hm-cell.blank { background: transparent; }
.s-present.hm-cell, i.s-present { background: #2fa36b; color: #fff; }
.s-late.hm-cell, i.s-late { background: #f0a92e; color: #fff; }
.s-absent.hm-cell, i.s-absent { background: #e0483d; color: #fff; }
.s-excused.hm-cell, i.s-excused { background: #4f8fe6; color: #fff; }
i.s-none { background: #eef2f0; }
.hm-cell.today { box-shadow: 0 0 0 2px var(--primary-dark) inset; }
.hm-grid-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.hm-grid { border-collapse: separate; border-spacing: 3px; font-size: .8rem; }
table.hm-grid th { font-weight: 700; color: var(--muted); font-size: .7rem; text-align: center; padding: 0 1px; }
table.hm-grid th.hm-name, table.hm-grid td.hm-name { text-align: right; position: sticky; right: 0; background: #fff; z-index: 1; padding-inline-end: .4rem; max-width: 9.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; color: var(--text); }
table.hm-grid td.hm-c { width: 24px; height: 24px; min-width: 24px; border-radius: 6px; background: #eef2f0; text-align: center; color: #fff; font-weight: 800; font-size: .68rem; }
table.hm-grid td.hm-pct { font-weight: 800; color: var(--primary-dark); padding-inline-start: .4rem; white-space: nowrap; }
.month-nav { display: flex; align-items: center; gap: .4rem; }
.month-nav strong { min-width: 7.5rem; text-align: center; }

/* Account page */
.account-head { display: flex; align-items: center; gap: .9rem; }
.avatar { width: 56px; height: 56px; border-radius: 18px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; flex: 0 0 auto; }
.list-links { display: grid; gap: .5rem; }
.list-links a, .list-links button { display: flex; align-items: center; gap: .7rem; min-height: 52px; padding: .5rem .85rem; border: 1px solid var(--border); border-radius: 14px; background: #fff; color: var(--text); font: inherit; font-weight: 700; text-align: start; cursor: pointer; width: 100%; }
.list-links a:hover { text-decoration: none; border-color: var(--primary); }
.list-links .ms-ico { width: 36px; height: 36px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.page-kicker { margin: .25rem 0 .75rem; font-size: 1.15rem; color: var(--primary-dark); }
.progress-hero { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.progress-hero .ring { flex: 0 0 auto; }
.ph-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: .5rem; flex: 1 1 200px; min-width: 0; }
.ph-stats > div { background: #f6faf8; border-radius: 12px; padding: .5rem .6rem; text-align: center; min-width: 0; }
.ph-stats strong { display: block; font-size: 1.25rem; color: var(--primary-dark); overflow-wrap: anywhere; }
.ph-stats span { font-size: .75rem; color: var(--muted); }
.ph-stats .ph-eta { grid-column: 1 / -1; background: #fffaeb; }
.ph-stats .ph-eta strong { color: var(--warn); font-size: 1.05rem; }
details.panel > summary.panel-header { display: flex; }
table.hm-grid td.hm-c.s-present { background: #2fa36b; } table.hm-grid td.hm-c.s-late { background: #f0a92e; }
table.hm-grid td.hm-c.s-absent { background: #e0483d; } table.hm-grid td.hm-c.s-excused { background: #4f8fe6; }
@media (max-width: 480px) {
  .seg-tabs { gap: .3rem; }
  .seg-tabs a { padding: 0 .75rem; font-size: .86rem; }
}
@media print {
  .bottom-nav, .more-sheet, .seg-tabs, .sticky-bar, .topbar-bell { display: none !important; }
  .js .tab-panel { display: block !important; }
}

/* v1.7 — quick recitation */
.rc-list { display: grid; gap: .75rem; }
@media (min-width: 993px) { .rc-list { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); } }
.rc-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: .8rem .85rem; display: grid; gap: .6rem; box-shadow: var(--shadow); scroll-margin-top: 80px; }
.rc-card.is-done { border-color: #9fdcbc; background: linear-gradient(180deg, #f3fbf7, #fff 40%); }
.rc-card.is-absent { opacity: .62; }
.rc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.rc-name { display: block; font-size: 1.05rem; }
.rc-name a { color: var(--text); }
.rc-done-line { font-size: .85rem; font-weight: 700; color: var(--success); background: #ecfdf3; border-radius: 10px; padding: .3rem .6rem; }
.rc-portion { display: flex; align-items: stretch; gap: .5rem; }
.rc-step { flex: 0 0 48px; min-height: 56px; border-radius: 12px; border: 1px solid var(--border); background: #f6faf8; font-size: 1.6rem; font-weight: 800; color: var(--primary-dark); cursor: pointer; }
.rc-plabel { flex: 1 1 auto; min-width: 0; text-align: center; background: var(--primary-soft); border-radius: 12px; padding: .35rem .5rem; display: flex; flex-direction: column; justify-content: center; }
.rc-plabel strong { font-size: 1.02rem; color: var(--primary-dark); }
.rc-tag { font-size: .72rem; font-weight: 800; color: var(--primary); }
.rc-tag.retry { color: var(--warn); }
.rc-hint { font-size: .75rem; color: var(--muted); min-height: 1em; }
.rc-grades .seg-opt span { min-height: 48px; }
.g-excellent input:checked + span { background: var(--success); color: #fff; }
.g-good input:checked + span { background: #1f7ae0; color: #fff; }
.g-acceptable input:checked + span { background: #6b7c73; color: #fff; }
.g-retry input:checked + span { background: #dc8a0e; color: #fff; }
.rc-counters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.ctr { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; }
.ctr-l { flex: 1 1 100%; text-align: center; font-size: .78rem; font-weight: 800; color: var(--muted); }
.ctr-btn { width: 44px; height: 44px; border-radius: 10px; border: 0; background: #fff; box-shadow: 0 1px 0 var(--border), 0 0 0 1px var(--border) inset; font-size: 1.5rem; font-weight: 800; color: var(--primary-dark); cursor: pointer; line-height: 1; }
.ctr input { width: 3.2rem; text-align: center; font-size: 1.25rem; font-weight: 800; padding: .3rem 0; border: 0; background: transparent; -moz-appearance: textfield; }
.ctr input::-webkit-outer-spin-button, .ctr input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ctr.has { background: #fff7e6; border-color: #f3d38c; }
.rc-submit { min-height: 52px; font-size: 1.05rem; width: 100%; }

/* v1.7 — class wall */
.wall { display: grid; gap: 0; }
.wall-row { padding: .65rem .9rem; border-bottom: 1px solid var(--border); display: grid; gap: .4rem; }
.wall-row:last-child { border-bottom: 0; }
.wall-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; }
.wall-who a { font-weight: 800; color: var(--text); }
.wall-pct { font-weight: 800; color: var(--primary); }
.wall-who small { flex-basis: 100%; }
.wall-cells { display: grid; grid-template-columns: repeat(60, minmax(0, 1fr)); gap: 2px; direction: rtl; }
.wall-cells i, .wl-key { display: block; aspect-ratio: 1 / 1.5; background: #e3ebe6; border-radius: 2px; }
.wall-cells i.wl-d, .wl-key.wl-d { background: var(--success); }
.wall-cells i.wl-p, .wl-key.wl-p { background: rgba(232, 160, 18, var(--f, .7)); }
.wall-cells i.wl-tick { box-shadow: -2px 0 0 #fff, -3px 0 0 #b9c9bf; }
.wl-key { display: inline-block; width: 12px; aspect-ratio: auto; height: 14px; vertical-align: middle; }
@media (max-width: 992px) {
  .wall-cells { grid-template-columns: repeat(30, minmax(0, 1fr)); row-gap: 3px; }
  .wall-cells i { aspect-ratio: 1 / 1.4; }
  .wall-cells i.wl-tick { box-shadow: none; }
}

/* v1.7 — dashboard to-do + charts */
.todo-list { list-style: none; margin: 0; padding: .5rem; display: grid; gap: .5rem; }
.todo { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; border-inline-start: 5px solid #8aa597; }
.todo.t-danger { border-inline-start-color: #d64545; }
.todo.t-warn { border-inline-start-color: #e8a012; }
.todo.t-info { border-inline-start-color: #1f7ae0; }
.todo-head { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; min-height: 48px; color: var(--text); font-weight: 800; }
.todo-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-dark); flex: 0 0 36px; }
.t-danger .todo-ico { background: #fdecec; color: #b42323; }
.t-warn .todo-ico { background: #fff4dc; color: #a86b00; }
.t-info .todo-ico { background: #e8f1fd; color: #1557a8; }
.todo-t { flex: 1 1 auto; min-width: 0; }
.todo-n { min-width: 2rem; text-align: center; font-size: 1.15rem; background: #f2f6f4; border-radius: 999px; padding: .1rem .55rem; }
.todo-items { list-style: none; margin: 0; padding: 0 .75rem .55rem; display: grid; gap: .25rem; }
.todo-items li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; font-size: .9rem; padding: .3rem 0; border-top: 1px dashed var(--border); }
.todo-items a { color: var(--primary-dark); font-weight: 700; min-height: 32px; display: inline-flex; align-items: center; }
.todo-ok { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.1rem; font-weight: 800; color: var(--success); }
.chart-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-bottom: 1rem; }
.chart-grid .panel { margin-bottom: 0; }
svg.chart { width: 100%; height: auto; display: block; max-height: 220px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: .35rem .9rem; justify-content: center; font-size: .8rem; color: var(--muted); margin-top: .35rem; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: .3rem; vertical-align: middle; }
@media (max-width: 480px) { .chart-grid { grid-template-columns: minmax(0, 1fr); } }

/* v1.7 — main lists become cards on phones (labels copied from <thead> by app.js; tables stay on desktop) */
@media (max-width: 992px) {
  .js table.data.cards-m, .js table.data.cards-m tbody { display: block; width: 100%; font-size: .92rem; }
  .js table.data.cards-m thead, .js table.data.cards-m tfoot { display: none; }
  .js table.data.cards-m tr { display: block; background: #fff; border: 1px solid var(--border); border-radius: 14px; margin: .6rem; padding: .35rem .8rem; box-shadow: 0 1px 2px rgba(16, 60, 40, .05); }
  .js table.data.cards-m tr:hover td { background: transparent; }
  .js table.data.cards-m td { display: flow-root; white-space: normal; text-align: left; padding: .45rem 0; border: 0; border-bottom: 1px dashed var(--border); min-height: 2.1rem; overflow-wrap: anywhere; }
  .js table.data.cards-m td::before { content: attr(data-label); float: right; margin-left: .75rem; color: var(--muted); font-size: .8rem; font-weight: 700; text-align: right; max-width: 45%; }
  .js table.data.cards-m td:first-child { text-align: right; font-weight: 800; font-size: 1rem; border-bottom: 1px solid var(--border); }
  .js table.data.cards-m td:first-child::before { display: block; float: none; margin: 0 0 .1rem; max-width: none; font-size: .72rem; }
  .js table.data.cards-m td:last-child { border-bottom: 0; }
  .js table.data.cards-m td:empty, .js table.data.cards-m td.is-blank { display: none; }
  .js table.data.cards-m td[data-label=""]::before { display: none; }
  .js table.data.cards-m td[data-label=""] { text-align: right; }
  .js table.data.cards-m td[colspan] { text-align: center; }
  .js table.data.cards-m td[colspan]::before { display: none; }
  .js table.data.cards-m td .btn { min-height: 40px; }
  .js table.data.cards-m td input, .js table.data.cards-m td select { max-width: 100%; }
  .js .table-wrap:has(> table.cards-m) { overflow-x: visible; }
}

/* v1.7 — WhatsApp session report */
.wa-stats { display: flex; flex-wrap: wrap; gap: .4rem; }
.wa-bubble { margin-top: .75rem; background: #dcf8c6; border-radius: 14px 14px 4px 14px; padding: .8rem .95rem; font-size: .93rem; line-height: 1.75; color: #1c2b22; box-shadow: 0 1px 1px rgba(0,0,0,.08); overflow-wrap: anywhere; background-image: linear-gradient(180deg, rgba(255,255,255,.25), rgba(255,255,255,0)); }
.wa-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.wa-actions .btn { min-height: 48px; }
.wa-big { flex: 1 1 100%; justify-content: center; font-size: 1.02rem; display: inline-flex; align-items: center; gap: .45rem; }
@media (min-width: 993px) { .wa-big { flex: 0 0 auto; } }
.wa-list { list-style: none; margin: 0; padding: 0; }
.wa-item { display: grid; gap: .35rem; padding: .7rem .9rem; border-bottom: 1px solid var(--border); }
.wa-item:last-child { border-bottom: 0; }
.wa-who { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.wa-portions { margin: 0; padding-inline-start: 1.1rem; font-size: .88rem; }
.wa-send .btn { min-height: 44px; display: inline-flex; align-items: center; }
.text-warn { color: var(--warn); }

/* v1.8 — tracks, 3-part quick recitation, review, scoring by errors, terms, branch ladder */
.badge-warning { background: #fffaeb; color: var(--warn); }
.rc-part { border: 1px solid var(--border); border-radius: 12px; padding: .5rem .6rem .6rem; margin: 0; display: grid; gap: .45rem; min-width: 0; }
.rc-part legend { padding: 0 .3rem; font-weight: 800; font-size: .9rem; color: var(--primary-dark); display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.rc-part legend small { font-weight: 600; color: var(--muted); font-size: .76rem; }
.rp-n { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--primary); color: #fff; font-size: .75rem; }
.rc-rev { background: #fbfdfc; }
.rv-portion { font-weight: 800; color: var(--text); background: #f1f6f3; border-radius: 10px; padding: .45rem .6rem; text-align: center; font-size: .95rem; }
.rc-grades.sm .seg-opt span { min-height: 42px; font-size: .88rem; }
.rc-frac .seg-opt span { min-height: 40px; }
.rc-frac .seg-opt input:checked + span { background: var(--primary); color: #fff; }
.rc-lines { border: 1px dashed var(--border); border-radius: 10px; padding: .2rem; }
.rc-done-line.rv { color: var(--info); background: #eff8ff; }
.rc-notrack { font-size: .8rem; }
.rc-howto { display: block; width: 100%; }
.wk-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 700; }
.wk-l { color: var(--muted); }
.wk-track { height: 10px; border-radius: 99px; background: #e8efeb; overflow: hidden; }
.wk-track i { display: block; height: 100%; border-radius: 99px; background: var(--primary); min-width: 2px; }
.wk-bar.st-behind .wk-track i { background: #dc8a0e; }
.wk-bar.st-done .wk-track i { background: var(--success); }
.wk-bar.st-behind .wk-v { color: var(--warn); }
.wk-v { white-space: nowrap; }
.track-card { border: 1px solid var(--border); border-radius: 14px; padding: .75rem .85rem; background: #fff; display: grid; gap: .35rem; }
.track-card h3 { margin: 0; font-size: 1rem; }
.track-card .tk-amounts { display: flex; flex-wrap: wrap; gap: .35rem; }
.track-card .tk-amounts span { background: var(--primary-soft); color: var(--primary-dark); border-radius: 99px; padding: .15rem .6rem; font-size: .8rem; font-weight: 700; }
.track-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.track-card.off { opacity: .6; }
.kv-list { display: grid; gap: .3rem; margin: 0; }
.kv-list > div { display: flex; justify-content: space-between; gap: .75rem; border-bottom: 1px dashed var(--border); padding: .3rem 0; }
.kv-list dt { color: var(--muted); font-size: .85rem; }
.kv-list dd { margin: 0; font-weight: 700; text-align: left; }
.assign-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: .5rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--border); }
.assign-row select { width: 100%; }
.settings-nav { display: flex; flex-wrap: wrap; gap: .5rem; }
.num-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.num-grid .form-group { margin: 0; }
.tc-week { padding: 0 1rem .65rem; }

/* v1.8 phase B — error-based grading, branch ladder */
.eg-form [hidden] { display: none !important; }
.cand-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .6rem; }
.eg-top .form-group { margin-bottom: .4rem; }
.eg-rule { margin: 0; }
.eg-q { border: 1px solid var(--border, #e5e7eb); border-radius: 14px; padding: .6rem .7rem .7rem; margin: 0 0 .7rem; background: var(--card, #fff); }
.eg-q legend { font-weight: 700; padding: 0 .3rem; display: flex; align-items: center; gap: .4rem; }
.eg-q .eg-qs { margin-inline-start: .3rem; font-size: .85rem; color: var(--primary, #0f6b4f); background: #ecfdf5; border-radius: 999px; padding: .05rem .5rem; }
.eg-q.zero { border-color: #fca5a5; background: #fff7f7; }
.eg-q.zero .eg-qs { color: #b91c1c; background: #fee2e2; }
.eg-ctrs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.eg-ctrs .ctr { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "l l" "i i" "m p"; gap: .25rem; }
.eg-ctrs .ctr-l { grid-area: l; text-align: center; font-size: .8rem; }
.eg-ctrs .ctr input { grid-area: i; width: 100%; text-align: center; }
.eg-ctrs .ctr-btn[data-d="-1"] { grid-area: m; }
.eg-ctrs .ctr-btn[data-d="1"] { grid-area: p; }
.eg-ctrs .ctr-btn { min-height: 40px; }
.eg-sum { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); z-index: 5; background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 14px; padding: .6rem .7rem; box-shadow: 0 -4px 14px rgba(0,0,0,.06); margin-bottom: .8rem; }
@media (min-width: 900px) { .eg-sum { bottom: .5rem; } }
.eg-sum-row { display: flex; flex-wrap: wrap; gap: .3rem .9rem; justify-content: space-between; font-size: .92rem; }
.eg-sum-row i { font-style: normal; color: var(--muted, #6b7280); }
.eg-verdict { font-weight: 700; margin: .3rem 0; font-size: .92rem; }
.eg-verdict.ok { color: #047857; } .eg-verdict.bad { color: #b91c1c; }
.eg-actions { display: flex; gap: .5rem; } .eg-actions .btn { flex: 1; }
.ladder { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: 0; }
.ladder li { min-width: 3.1rem; text-align: center; border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: .3rem .35rem; font-size: .78rem; line-height: 1.25; background: #fff; }
.ladder li b { display: block; font-size: 1rem; }
.ladder li.done { background: #0f6b4f; color: #fff; border-color: #0f6b4f; }
.ladder li.ready { border-color: #f59e0b; background: #fffbeb; }
.ladder li.next { outline: 2px dashed #0f6b4f; outline-offset: 1px; }
.ladder li.reached:not(.done) { background: #ecfdf5; }
.ladder-sum { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }

/* v1.8 phase C — terms, term grades, teacher productivity */
.term-card > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.term-card > summary::-webkit-details-marker { display: none; }
.term-total { font-weight: 800; border-radius: 999px; padding: .2rem .7rem; font-size: .95rem; white-space: nowrap; }
.term-total.ok { background: #ecfdf5; color: #047857; } .term-total.bad { background: #fef2f2; color: #b91c1c; }
.term-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .7rem; }
.term-grid .form-group { margin: 0; } .term-grid .full { grid-column: 1 / -1; }
.term-grid input { width: 100%; }
@media (min-width: 900px) { .term-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.term-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.term-links { display: flex; flex-wrap: wrap; gap: .4rem; }
.prod-chart { width: 100%; height: auto; display: block; }
.prod-chart text { font-family: inherit; }

/* v1.9 P0 — school identity (logo inside brand marks + settings panel) */
.brand-mark.has-logo, .login-card .logo .mark.has-logo { background: #fff; padding: 3px; overflow: hidden; }
.school-logo-img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; display: block; }
.identity-preview { display: flex; align-items: center; gap: .75rem; background: var(--primary, #0d6b4c); color: #fff; border-radius: 12px; padding: .75rem 1rem; margin: 0 0 1rem; max-width: 420px; }
.identity-preview .brand-mark { flex: 0 0 auto; }
.identity-preview small { display: block; opacity: .85; font-size: .8rem; }
.identity-logo { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: .25rem 0 .6rem; }
.identity-logo img { width: 72px; height: 72px; object-fit: contain; border: 1px solid #e3e9e6; border-radius: 12px; background: #fff; padding: 4px; }
.identity-logo .check { display: flex; align-items: center; gap: .4rem; font-weight: 500; cursor: pointer; }
.identity-form input[type=file] { max-width: 100%; }
.print-logo { width: 64px; height: 64px; object-fit: contain; display: block; margin: 0 auto .4rem; }
.identity-form .form-grid + .form-group, .identity-form .form-group + .form-grid { margin-top: 1rem; }

/* v1.9 P5 — training (التكوين) */
.topbar-actions { gap: .5rem; }
.tr-bar { display: block; height: 10px; border-radius: 999px; background: var(--primary-soft); overflow: hidden; }
.tr-bar > span { display: block; height: 100%; background: var(--primary); border-radius: inherit; min-width: 4px; }
.tr-bar.sm { height: 6px; margin-top: .35rem; max-width: 220px; display: inline-block; width: 100%; vertical-align: middle; }
.tr-list { list-style: none; margin: 0; padding: 0 .75rem .75rem; display: grid; gap: .5rem; }
.tr-item a { display: flex; align-items: center; gap: .75rem; padding: .75rem; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: inherit; text-decoration: none; }
.tr-item a:hover { border-color: var(--primary); }
.tr-num { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--primary-soft); color: var(--primary-dark); }
.tr-done .tr-num, .tr-check li.ok .tr-num { background: var(--primary); color: #fff; }
.tr-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.tr-txt small { color: var(--muted); line-height: 1.5; }
.tr-meta { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: .2rem; color: var(--muted); }
.tr-admin-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.tr-tile { display: flex; align-items: center; gap: .75rem; padding: .9rem; border: 1px solid var(--border); border-radius: 12px; color: var(--primary-dark); text-decoration: none; background: var(--primary-soft); }
.tr-tile span { display: flex; flex-direction: column; color: var(--text); }
.tr-tile small { color: var(--muted); }
.tr-preview > summary { cursor: pointer; list-style: none; }
.tr-preview > summary::-webkit-details-marker { display: none; }
.tr-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.tr-summary { color: var(--muted); margin: 0 0 1rem; }
.tr-steps { list-style: none; margin: 0; padding: 0; }
.tr-step { padding: 1rem; }
.tr-step-body { display: flex; gap: .75rem; align-items: flex-start; }
.tr-step-body p { margin: .2rem 0 .6rem; line-height: 1.9; }
.tr-step-n { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; }
.tr-shot { margin: .75rem auto 0; max-width: 300px; }
.tr-shot img { width: 100%; height: auto; display: block; border-radius: 18px; border: 6px solid #1f2d27; box-shadow: var(--shadow); background: #fff; }
.tr-quiz { margin: 0; padding-inline-start: 1.25rem; display: grid; gap: .85rem; }
.tr-quiz fieldset { border: 0; margin: 0; padding: 0; }
.tr-quiz legend { font-weight: 700; margin-bottom: .35rem; padding: 0; line-height: 1.7; }
.tr-opt { display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 10px; margin: .3rem 0; cursor: pointer; background: #fff; min-height: 44px; }
.tr-opt input { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; }
.tr-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.tr-bad .tr-opt { border-color: #f1c4bf; }
.tr-why { margin: .3rem 0 0; color: var(--danger); font-size: .9rem; }
.tr-why.ok { color: var(--success); }
.tr-ack { display: flex; align-items: center; gap: .55rem; margin-top: 1rem; padding: .75rem; border-radius: 10px; background: #fff8e6; border: 1px solid #f0dca8; font-weight: 700; cursor: pointer; }
.tr-ack input { width: 1.2rem; height: 1.2rem; }
.tr-pager { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin: 0 0 1.25rem; }
.tr-check { list-style: none; margin: 0; padding: 0 .75rem .75rem; display: grid; gap: .5rem; }
.tr-check li { display: flex; align-items: center; gap: .75rem; padding: .75rem; border: 1px solid var(--border); border-radius: 12px; background: #fff; flex-wrap: wrap; }
.tr-check li.ok { background: #f3faf6; }
.tr-check li.skip { opacity: .7; }
.tr-check .tr-txt { flex: 1 1 200px; }
.tr-detail { font-weight: 700; color: var(--primary-dark) !important; }
.tr-check li.todo .tr-detail { color: var(--warn) !important; }
.tr-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.tr-actions form { margin: 0; }
.btn-link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: .3rem .4rem; }
.tr-dots { white-space: normal; }
.tr-dot { display: inline-grid; place-items: center; width: 26px; height: 26px; margin: 2px; border-radius: 7px; font-weight: 800; font-size: .85rem; text-decoration: none; background: #eef2f0; color: var(--muted); }
.tr-dot.tr-done { background: var(--primary); color: #fff; }
.tr-dot.tr-started { background: #fdecc8; color: var(--warn); }
.tr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; text-align: center; }
.tr-stats strong { display: block; font-size: 1.6rem; color: var(--primary-dark); }
.tr-stats small { color: var(--muted); }
.tr-dash { padding: .25rem .75rem; }
.tr-dash-row { display: flex; align-items: center; gap: .75rem; padding: .75rem 0; color: inherit; text-decoration: none; }
.tr-dash-row + .tr-dash-row { border-top: 1px dashed var(--border); }
.tr-dash-ico { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); }

/* v1.11 Phase B — التسميع المنزلي */
#reciteForm [hidden], .rq-audio [hidden] { display: none !important; }
.rq-head { display: block; margin-bottom: .35rem; }
.rq-audio { display: block; margin: .4rem 0 .6rem; }
.rq-audio audio { width: 100%; max-width: 460px; display: block; }
/* v1.12 Phase C — messages + announcements */
.chat { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1rem; }
.chat-row { display: flex; }
.chat-row.mine { justify-content: flex-start; }
.chat-row.theirs { justify-content: flex-end; }
.chat-bubble { max-width: 80%; background: var(--surface-2, #f4f7f4); border-radius: 14px; padding: .55rem .8rem; }
.chat-row.mine .chat-bubble { background: #e7f6ee; }
.chat-form { display: flex; gap: .5rem; align-items: flex-end; }
.chat-form textarea { flex: 1; }
.ann-item { border-top: 1px solid var(--line, #e6eee6); padding: .8rem 0; }
.ann-item h3 { margin: 0 0 .3rem; font-size: 1.02rem; }
.ann-item p { margin: 0 0 .3rem; white-space: pre-line; }
.ann-item.is-expired { opacity: .6; }

/* v1.13 — web push */
.push-nudge:not([hidden]) { display: flex; align-items: center; gap: .65rem; background: #fff; border: 1px solid var(--border, #e5e7eb); border-inline-start: 4px solid var(--primary, #0f766e); border-radius: 12px; padding: .7rem .85rem; margin-bottom: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.push-nudge .ms-ico { flex: 0 0 auto; }
.push-nudge .help { margin: .1rem 0 0; }
.push-x { background: none; border: 0; font-size: 1.4rem; line-height: 1; color: var(--muted, #6b7280); cursor: pointer; padding: .2rem .4rem; }
.push-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.push-msg { margin-bottom: 0; }

/* v1.14 — payment proofs */
.pay-acc { background: var(--primary-soft, #ecfdf5); border-radius: 12px; padding: .75rem .9rem; margin: .5rem 0 1rem; display: grid; gap: .45rem; }
.pay-acc > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem .75rem; align-items: baseline; }
.pay-acc strong { font-size: 1.05rem; letter-spacing: .02em; user-select: all; }
.month-pick { display: flex; flex-wrap: wrap; gap: .4rem; }
.month-pick .radio-pill.is-paid { opacity: .55; }
.proof-preview { display: block; max-width: 100%; max-height: 260px; margin-top: .5rem; border-radius: 10px; border: 1px solid var(--border, #e5e7eb); }
.proof-preview[hidden] { display: none; }
.proof-list { display: grid; gap: .6rem; }
.proof-item { display: flex; flex-wrap: wrap; gap: .5rem .75rem; justify-content: space-between; align-items: center; border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: .6rem .75rem; }
.proof-side { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.proof-cta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding-bottom: 0; }
.proof-grid { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 1rem; align-items: start; }
.proof-photo img { width: 100%; max-height: 460px; object-fit: contain; background: #f8fafc; border: 1px solid var(--border, #e5e7eb); border-radius: 12px; display: block; }
.proof-dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem .75rem; margin: 0 0 1rem; }
.proof-dl dt { color: var(--muted, #6b7280); }
.proof-dl dd { margin: 0; }
.proof-confirm { border-top: 1px solid var(--border, #e5e7eb); padding-top: .75rem; }
.proof-reject { display: flex; gap: .5rem; margin-top: .75rem; }
.proof-reject input { flex: 1; min-width: 0; }
@media (max-width: 760px) { .proof-grid { grid-template-columns: 1fr; } }
#proofForm [hidden] { display: none !important; }

/* v1.15 — recovery codes / security */
.rc-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: .75rem 0; }
.rc-codes code { display: block; text-align: center; font-size: 1.1rem; letter-spacing: .08em; padding: .55rem; border: 1px dashed var(--border, #d1d5db); border-radius: 10px; background: #fff; }
.rc-ways li { margin-bottom: .45rem; }
@media print {
  .no-print, .sidebar, .bottom-nav, .bottom-bar, .topbar, .page-head, .alert, header, nav, .help-fab { display: none !important; }
  .rc-codes code { border-color: #000; }
}

/* v1.16 — registration: siblings, family page, placement, waitlist */
.form-section { font-size: 1rem; margin: 1.1rem 0 .5rem; color: var(--primary-dark, #095239); }
.kid-block { border: 1px solid var(--border); border-radius: 14px; padding: .4rem 1rem 1rem; margin: 0 0 .9rem; background: #fbfdfc; }
.kid-block legend { font-weight: 800; padding: 0 .4rem; display: flex; align-items: center; gap: .6rem; }
.check-inline { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; }
.fam-link { display: grid; gap: .5rem; }
.fam-link-row { display: flex; gap: .4rem; flex-wrap: wrap; }
.fam-link-row input { flex: 1 1 220px; min-width: 0; font-size: .82rem; }
.fam-kid { border: 1px solid var(--border); border-radius: 14px; padding: .8rem 1rem; margin: .9rem 0; }
.fam-kid-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.fam-kid-head h3 { margin: 0; font-size: 1.1rem; }
.fam-pos, .fam-appt { margin: .5rem 0; padding: .55rem .75rem; border-radius: 10px; background: #eef7f2; }
.fam-appt { background: #fff7e0; }
.fam-box { margin-top: .6rem; border-top: 1px dashed var(--border); padding-top: .5rem; }
.fam-box summary { cursor: pointer; font-weight: 700; padding: .3rem 0; }
.doc-list { list-style: none; padding: 0; margin: .4rem 0; display: grid; gap: .5rem; }
.doc-list li { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.doc-list input[type=file] { max-width: 220px; font-size: .8rem; }
.enrol-tools { padding: .8rem 1.2rem 0; flex-wrap: wrap; }
.seat-row { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .6rem 1.2rem 0; }
.seat-chip { border: 1px solid var(--border); border-radius: 999px; padding: .25rem .7rem; font-size: .82rem; background: #fff; }
.seat-chip.free { border-color: #2e9d6a; background: #e9f7ef; font-weight: 700; }
.appt-box { margin-top: .4rem; }
.appt-box summary { cursor: pointer; font-size: .85rem; color: var(--primary); }
.appt-box input[type=text] { max-width: 180px; }
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .9rem; }
.pl-card { border: 1px solid var(--border); border-radius: 14px; padding: .8rem; display: grid; gap: .45rem; background: #fff; }
.pl-card header { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.pl-meta { font-size: .85rem; color: var(--muted, #5b7268); }
.pl-form { display: grid; gap: .35rem; }
.pl-form label { font-size: .8rem; font-weight: 700; }

/* ===== v1.17 — follow-up: streak, weekly report, chart, model audio ===== */
.tc-follow { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .7rem; padding: 0 1rem .7rem; }
.streak-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .7rem; border-radius: 999px; background: #fff7ed; color: #9a3412; font-weight: 800; font-size: .85rem; border: 1px solid #fed7aa; }
.streak-chip.has-badge { background: linear-gradient(90deg, #fff7ed, #fef3c7); }
.streak-badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; background: #fde68a; color: #78350f; font-size: .78rem; font-weight: 800; }
.wk-link { margin-inline-start: auto; font-weight: 800; font-size: .88rem; }
.wk-report .wk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; }
.wk-cell, .follow-cell { display: flex; flex-direction: column; gap: .2rem; padding: .75rem .85rem; border: 1px solid var(--border); border-radius: 14px; background: #fcfcfd; }
.wk-cell.wk-main { grid-column: 1 / -1; background: #f0fdf4; border-color: #bbf7d0; }
.wk-k { font-size: .8rem; color: var(--muted); font-weight: 700; }
.wk-big { font-size: 1.35rem; font-weight: 800; }
.wk-next { margin: .9rem 0; padding: .75rem .9rem; border-radius: 14px; background: #eff8ff; }
.wk-wa textarea.wa-text { width: 100%; font-family: inherit; font-size: .9rem; margin: .4rem 0; }
.wk-wa summary { cursor: pointer; font-weight: 800; }
.follow-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.fchart-wrap { width: 100%; overflow: hidden; }
svg.fchart { width: 100%; height: auto; display: block; }
.fchart .fc-grid { stroke: #eef0f3; stroke-width: 1; }
.fchart .fc-ax { fill: #667085; font-size: 11px; font-family: inherit; }
.fchart .fc-target { fill: none; stroke: #98a2b3; stroke-width: 2; stroke-dasharray: 6 5; }
.fchart .fc-done { fill: none; stroke: var(--primary, #0f766e); stroke-width: 3; stroke-linejoin: round; }
.fchart .fc-area { fill: rgba(15, 118, 110, .10); stroke: none; }
.fchart .fc-dot { fill: #fff; stroke: var(--primary, #0f766e); stroke-width: 2; }
.fchart-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; align-items: center; margin-top: .5rem; font-size: .88rem; }
.fchart-legend i { display: inline-block; width: 18px; height: 0; vertical-align: middle; margin-inline-end: .2rem; }
.fchart-legend .lg-done { border-top: 3px solid var(--primary, #0f766e); }
.fchart-legend .lg-target { border-top: 2px dashed #98a2b3; }
.model-item { padding: .6rem 0; border-bottom: 1px solid var(--border); }
.model-item:last-child { border-bottom: 0; }
.model-head { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin-bottom: .35rem; }
.model-head .inline-form { margin-inline-start: auto; display: inline; }
.model-panel { border-color: #c7d7fe; }
@media print { .wk-wa { display: none; } }
.btn[hidden], [data-rec-stop][hidden] { display: none !important; }

/* v1.18 — autopilot */
.ap-cards .card { text-decoration: none; color: inherit; }
.ap-cards .card.ap-hot { border-color: #fdb022; background: #fffaeb; }
.ap-last { margin: -.3rem 0 1rem; }
.ap-group { font-size: .95rem; margin: 1rem 0 .4rem; color: var(--primary, #0d6b4c); }
.ap-group:first-child { margin-top: 0; }
.ap-rule { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem .2rem; border-bottom: 1px solid #eef2ef; cursor: pointer; }
.ap-rule input { margin-top: .25rem; width: 1.15rem; height: 1.15rem; flex: none; }
.ap-rule-body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.ap-rule-stat { color: #475467; }
.filter-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.filter-row select { width: auto; max-width: 100%; }
.ap-day { font-size: .9rem; color: #475467; margin: .9rem 0 .3rem; border-bottom: 1px dashed #d0d5dd; padding-bottom: .2rem; }
.ap-item { padding: .5rem .6rem; border-radius: 10px; border: 1px solid #eaecf0; margin-bottom: .45rem; background: #fff; }
.ap-item.ap-todo { border-color: #fdb022; background: #fffcf5; }
.ap-item.ap-undone, .ap-item.ap-skipped { opacity: .65; }
.ap-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; }
.ap-time { font-variant-numeric: tabular-nums; color: #667085; font-size: .85rem; }
.ap-summary { margin: .2rem 0 .3rem; font-size: .92rem; overflow-wrap: anywhere; }
.ap-item .inline-actions:empty { display: none; }
.ap-why { display:block; margin-top:.25rem; max-width: 22rem; }
/* v1.33.1 — tappable autopilot tiles + per-tile lists */
.ap-cards .ap-tile { position: relative; cursor: pointer; padding-inline-end: 2.4rem; transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease; -webkit-tap-highlight-color: transparent; }
.ap-tile-go { position: absolute; inset-inline-end: .7rem; top: 50%; transform: translateY(-50%); width: 1.75rem; height: 1.75rem; border-radius: 999px; display: grid; place-items: center; background: var(--primary-soft, #e7f5ee); color: var(--primary-dark, #0b5a40); }
.ap-tile-go svg { width: 16px; height: 16px; }
.ap-cards .ap-tile:hover { border-color: var(--primary, #0d6b4c); box-shadow: 0 4px 14px rgba(16, 60, 40, .10); }
.ap-cards .ap-tile:active { transform: scale(.97); }
.ap-cards .ap-tile:focus-visible { outline: 3px solid var(--primary, #0d6b4c); outline-offset: 2px; }
.ap-cards .ap-tile.is-on { border-color: var(--primary, #0d6b4c); box-shadow: inset 0 0 0 1px var(--primary, #0d6b4c); }
.ap-cards .ap-tile.is-on .ap-tile-go { background: var(--primary, #0d6b4c); color: #fff; }
#log { scroll-margin-top: 72px; }
.ap-view-help { margin: 0 0 .6rem; }
.ap-seg { display: inline-flex; gap: .3rem; padding: .25rem; background: #f2f4f3; border-radius: 999px; margin-bottom: .6rem; }
.ap-seg .seg-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 1rem; border-radius: 999px; color: var(--text, #101828); font-weight: 700; font-size: .9rem; text-decoration: none; }
.ap-seg .seg-btn.is-on { background: #fff; color: var(--primary-dark, #0b5a40); box-shadow: 0 1px 3px rgba(16, 60, 40, .15); }
.ap-subj { display: inline-block; font-size: .75rem; font-weight: 700; color: #475467; background: #f2f4f7; border-radius: 6px; padding: 0 .35rem; }
.ap-wa-text { font-size: .85rem; color: #344054; background: #f0faf4; border: 1px solid #d1eadc; border-radius: 10px; padding: .45rem .6rem; margin: .1rem 0 .4rem; overflow-wrap: anywhere; }
.ap-empty { text-align: center; padding: 1.4rem .8rem; }

/* v1.21 — API keys */
.api-token { display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; background:#f8fafc; border:1px dashed var(--border, #cbd5e1); border-radius:10px; padding:.6rem .8rem; }
.api-token code { font-size:.95rem; word-break:break-all; flex:1 1 18rem; }
.api-new { border:2px solid var(--warn, #b54708); }
.api-scopes { display:grid; grid-template-columns:repeat(auto-fill, minmax(18rem, 1fr)); gap:.35rem .9rem; }
.api-scopes code, .api-log code { font-size:.82rem; }
tr.api-dead { opacity:.55; }

/* ===== v1.22 — المدرسة عن بعد ===== */
.plan-card .pc-title { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .2rem 1rem .4rem; font-weight: 800; }
.pc-task { display: grid; grid-template-columns: 1fr auto; gap: .35rem .6rem; align-items: center; background: #f6faf8; border-radius: 14px; padding: .65rem .75rem; border-inline-start: 4px solid #cbd5e1; }
.pc-task.st-sent { border-color: #f59e0b; background: #fffbeb; }
.pc-task.st-graded { border-color: var(--success); background: #f0fdf4; }
.pc-task.st-redo { border-color: #dc2626; background: #fef2f2; }
.pc-task.is-opt { border-style: dashed; }
.pc-main { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .45rem; min-width: 0; }
.pc-kind { font-size: .78rem; color: var(--muted); font-weight: 800; width: 100%; }
.pc-range { font-weight: 800; overflow-wrap: anywhere; }
.pc-note { width: 100%; color: #991b1b; }
.pc-btn { min-height: 44px; min-width: 88px; font-size: .95rem; }
.pc-model { grid-column: 1 / -1; width: 100%; height: 34px; }
.plan-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.pw-day { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .5rem; min-width: 0; font-size: .85rem; }
.pw-day.is-today { box-shadow: 0 0 0 2px var(--primary, #0d6b4c); }
.pw-day.s-done { background: #f0fdf4; } .pw-day.s-missed { background: #fef2f2; } .pw-day.s-partial { background: #fffbeb; } .pw-day.s-off { background: #f8fafc; color: var(--muted); }
.pw-head { display: flex; align-items: baseline; gap: .3rem; margin-bottom: .3rem; }
.pw-st { margin-inline-start: auto; font-weight: 900; }
.pw-task { display: flex; flex-direction: column; gap: .15rem; padding: .3rem 0; border-top: 1px dashed var(--border); }
.pw-k { font-size: .72rem; color: var(--muted); font-weight: 700; } .pw-r { font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 760px) { .plan-week { grid-template-columns: 1fr; } .pw-task { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .4rem; } }
.task-range { display: flex; flex-direction: column; gap: .2rem; background: #f6faf8; border-radius: 14px; padding: .8rem 1rem; margin-bottom: 1rem; }
.task-range strong { font-size: 1.25rem; }
.rec-big { display: flex; flex-direction: column; align-items: stretch; gap: .5rem; text-align: center; }
.rec-big .btn { min-height: 56px; font-size: 1.1rem; }
/* quick grading */
.qg .panel-body { display: flex; flex-direction: column; gap: .55rem; }
.qg-who strong { font-size: 1.2rem; display: block; }
.qg-task { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: 1.05rem; }
.qg-audio { width: 100%; height: 48px; }
.qg-pre { border-radius: 10px; padding: .45rem .7rem; font-size: .88rem; font-weight: 700; }
.qg-pre.ok { background: #f0fdf4; color: #166534; } .qg-pre.warn { background: #fffbeb; color: #92400e; } .qg-pre.bad { background: #fef2f2; color: #991b1b; }
.qg-note { background: #f1f5f9; border-radius: 10px; padding: .45rem .7rem; }
.qg-more summary { cursor: pointer; color: var(--muted); font-weight: 700; padding: .3rem 0; }
.qg-grades { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.qg-btn { min-height: 64px; border: 0; border-radius: 14px; font: inherit; font-size: 1.15rem; font-weight: 900; color: #fff; cursor: pointer; }
.qg-btn.g-excellent { background: #15803d; } .qg-btn.g-good { background: #0e7490; } .qg-btn.g-acceptable { background: #b45309; } .qg-btn.g-retry { background: #b91c1c; }
.qg-btn:active { transform: scale(.97); }
.glink { max-width: 560px; margin: 0 auto; padding: .8rem; display: flex; flex-direction: column; gap: .6rem; }
.glink-head { text-align: center; padding: .4rem 0; }
.glink input[type=text] { width: 100%; }
/* v1.22.1 — registration stepper */
.rsteps { margin: 0 0 1rem; }
.rsteps-title { margin: 0 0 .6rem; font-size: 1.05rem; }
.rsteps ol { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.rsteps .rs { display: flex; gap: .7rem; position: relative; padding-bottom: .9rem; }
.rsteps .rs:not(:last-child)::before { content: ""; position: absolute; top: 2rem; bottom: 0; inset-inline-start: .95rem; width: 2px; background: var(--border, #dfe6e2); }
.rsteps .rs-dot { flex: 0 0 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .95rem;
  background: #fff; border: 2px solid var(--border, #cfd8d3); color: var(--muted, #5f6f68); z-index: 1; }
.rsteps .rs-body { flex: 1; min-width: 0; }
.rsteps .rs-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; justify-content: space-between; }
.rsteps .rs-time { display: inline-block; font-size: .82rem; background: #eef6f2; color: #1d6b4d; border-radius: 999px; padding: .05rem .55rem; margin: .2rem 0; }
.rsteps .rs-do { margin: .2rem 0 0; font-size: .93rem; }
.rsteps .rs-next { margin: .15rem 0 0; font-size: .86rem; color: var(--muted, #5f6f68); }
.rsteps .rs-at { font-size: .84rem; color: #1d6b4d; margin-top: .15rem; }
.rsteps .rs-note { font-size: .86rem; margin-top: .2rem; }
.rsteps .rs-badge { font-size: .75rem; border-radius: 999px; padding: .05rem .5rem; background: #eef1f0; color: #5f6f68; }
.rsteps .rs-done .rs-dot { background: #1d7a55; border-color: #1d7a55; color: #fff; }
.rsteps .rs-done .rs-badge { background: #e3f4ec; color: #1d6b4d; }
.rsteps .rs-current .rs-dot { background: #f0a500; border-color: #f0a500; color: #fff; box-shadow: 0 0 0 4px rgba(240,165,0,.18); }
.rsteps .rs-current .rs-body { background: #fff8e6; border: 1px solid #f3d58a; border-radius: 12px; padding: .5rem .65rem; }
.rsteps .rs-current .rs-badge { background: #f0a500; color: #fff; }
.rsteps .rs-current .rs-note { font-weight: 600; }
.rsteps .rs-skip { opacity: .6; }
.rsteps .rs-stop .rs-dot { background: #b42318; border-color: #b42318; color: #fff; }
.rsteps-live .rs-next-state .rs-body { opacity: .85; }
.reg-confirm { border: 2px solid #1d7a55; border-radius: 14px; padding: .8rem; background: #f2faf6; margin-bottom: 1rem; }
.reg-confirm .ref { font-size: 1.2rem; font-weight: 800; letter-spacing: .5px; direction: ltr; display: inline-block; }
.reg-now { background: #fff8e6; border: 1px solid #f3d58a; border-radius: 12px; padding: .6rem .75rem; margin: .5rem 0; font-weight: 600; }
.day-card { border: 1px solid #cfe5da; background: #f5fbf8; border-radius: 14px; padding: .8rem .9rem; margin-bottom: 1rem; }
.day-card h3 { margin: 0 0 .4rem; font-size: 1rem; }
.day-card p { margin: 0; white-space: pre-line; line-height: 1.9; }
.reg-steps-box { border: 1px solid var(--border, #dfe6e2); border-radius: 14px; padding: .6rem .8rem; margin-bottom: 1rem; background: #fff; }
.reg-steps-box > summary { cursor: pointer; margin-bottom: .6rem; }

/* ===================== v1.23 — UI refresh (phase 1: type, tokens, nav, week strip, sent confirmation) ===================== */
@font-face {
  font-family: "Cairo"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/cairo-ar.woff2") format("woff2");
}
:root {
  --font: "Cairo", "Segoe UI", "Tahoma", "Arial", sans-serif;
  --gold: #c9a227;          /* fills / icons only — never text, never white on gold (2.4:1) */
  --gold-text: #7a5f0c;     /* gold text on white: 6.3:1 */
  --gold-soft: #fbf4dc;
  --tap: 48px;
}
body { font-size: 1rem; line-height: 1.6; }
.stars { color: #a07d10; }
.ico { flex: 0 0 auto; }
.btn .ico { margin-inline: -.1rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.topbar-bell { width: var(--tap); height: var(--tap); }
.bn-item { min-height: 58px; font-size: .78rem; }
.ms-tile { min-height: 88px; }
.dot-count { min-width: 20px; height: 20px; line-height: 20px; font-size: .7rem; }
.dot-count, .badge-count { direction: ltr; unicode-bidi: isolate; }

/* week strip (online plan card + confirmation) — fills right-to-left like the reading direction */
.wk-strip { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .25rem; margin: 0; padding: .35rem 1rem .6rem; }
.wk-d { display: flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 0; }
.wk-dot { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; background: #eef2f0; color: #fff; border: 2px solid transparent; position: relative; overflow: hidden; }
.wk-n { font-size: .74rem; font-weight: 700; color: var(--muted); line-height: 1.2; }
.wk-done .wk-dot { background: var(--primary); }
.wk-partial .wk-dot { background: #e6f4ee; border-color: var(--primary); }
.wk-half { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: 50%; background: var(--primary); } /* reading-start half filled (right in RTL) */
.wk-missed .wk-dot { background: #e5e7eb; }
.wk-missed .wk-dot::after { content: ""; width: 6px; height: 6px; border-radius: 999px; background: #9ca3af; }
.wk-pending .wk-dot { background: #fff; border-color: var(--primary); border-style: dashed; }
.wk-off .wk-dot { background: #f3f7f4; color: #7c9a8a; }
.wk-future .wk-dot { background: #fff; border-color: #dbe5df; }
.wk-d.is-today .wk-n { color: var(--primary-dark); font-weight: 900; }
.wk-d.is-today .wk-dot { box-shadow: 0 0 0 3px rgba(13, 107, 76, .15); }
.wk-strip.is-big .wk-dot { width: 36px; height: 36px; }
.wk-strip.is-perfect .wk-done .wk-dot { background: var(--gold); }
.wk-perfect { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .7rem; border-radius: 999px; background: var(--gold-soft); color: var(--gold-text); font-weight: 800; font-size: .85rem; border: 1px solid #ecd58a; }
.wk-perfect .ico { color: var(--gold); }
.streak-chip .ico { color: #ea580c; }
.streak-hint { color: var(--muted); font-size: .85rem; }

/* plan card: icon buttons */
.pc-btn { min-height: var(--tap); gap: .3rem; }
.wk-link { display: inline-flex; align-items: center; gap: .25rem; min-height: var(--tap); }

/* sent confirmation (the only place with a celebration; never on Quran pages) */
.sent-done { max-width: 560px; margin: 0 auto; text-align: center; position: relative; }
.sd-card { background: #fff; border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); padding: 1.6rem 1.1rem 1.2rem; }
.sd-badge { width: 96px; height: 96px; margin: 0 auto .8rem; border-radius: 999px; display: grid; place-items: center; background: var(--primary); color: #fff; box-shadow: 0 0 0 10px #e6f4ee; }
.sd-badge.is-star { background: var(--gold); box-shadow: 0 0 0 10px var(--gold-soft); }
.sd-card h2 { margin: .2rem 0 .3rem; font-size: 1.45rem; }
.sd-card p { margin: .2rem 0; color: var(--muted); }
.sd-what { display: inline-block; margin: .5rem 0; padding: .35rem .8rem; border-radius: 12px; background: #f6faf8; font-weight: 700; color: var(--text); }
.sd-actions { display: grid; gap: .6rem; margin-top: 1.1rem; }
.sd-actions .btn { min-height: 52px; font-size: 1.05rem; border-radius: 14px; }
.sd-week { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: .8rem; }
.sd-week .wk-strip { padding-inline: 0; }
.sd-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 70; }
@media (prefers-reduced-motion: no-preference) {
  .sd-badge.pop { animation: sdPop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
  @keyframes sdPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  #confetti { display: none; }
}
.prog-stats { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .6rem; }
.chip-soft { display: inline-flex; align-items: center; gap: .25rem; padding: .3rem .7rem; border-radius: 999px; background: #f1f6f3; color: var(--text); font-weight: 700; font-size: .85rem; }
.chip-soft .ico { color: var(--gold); }
.prog-h { font-size: .95rem; margin: .9rem 0 .45rem; color: var(--primary-dark); }
.prog-kid .panel-header { align-items: center; }
.prog-link { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: var(--tap); padding: .6rem 1rem; border-radius: 14px; background: #fff; border: 1px solid var(--border); font-weight: 800; margin-bottom: 1rem; }
.prog-link > span { display: inline-flex; align-items: center; gap: .4rem; }

/* ===================== v1.23 phase 2 — grading (quick + link) ===================== */
.qg { overflow: visible; }
.qg-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .4rem; }
.qg-count { font-weight: 700; color: var(--muted); }
.qg-count b { font-size: 1.35rem; color: var(--primary-dark); }
.qg-bar { height: 6px; border-radius: 999px; background: #e3ece6; overflow: hidden; margin-bottom: .6rem; }
.qg-bar i { display: block; height: 100%; background: var(--primary); border-radius: 999px; margin-inline-start: 0; transition: width .3s; }
.qg-filters { margin-bottom: .6rem; }
.qg-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.qg-chip-k { font-size: .82rem; font-weight: 800; color: var(--muted); }
.qg-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .6rem; border-radius: 999px; font-size: .82rem; font-weight: 700; background: #f1f5f3; color: var(--text); }
.qg-chip.ok { background: #e7f6ee; color: #14532d; } .qg-chip.warn { background: #fff4d6; color: #7a4a05; } .qg-chip.bad { background: #fde8e7; color: #8f1d14; }
.qg-tools { display: flex; gap: .4rem; flex-wrap: wrap; }
.qg-tool { min-height: var(--tap); min-width: var(--tap); padding: 0 .8rem; border-radius: 12px; border: 1px solid var(--border); background: #fff; font: inherit; font-weight: 800; color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: .25rem; cursor: pointer; }
.qg-tool[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.qg-label { font-weight: 700; font-size: .9rem; margin-top: .3rem; }
.qg-qc { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .15rem; }
.qg-qc::-webkit-scrollbar { display: none; }
.qg-qc-b { flex: 0 0 auto; min-height: 40px; padding: 0 .8rem; border-radius: 999px; border: 1px dashed #b9cbc1; background: #f8fbf9; font: inherit; font-size: .85rem; font-weight: 700; color: var(--primary-dark); cursor: pointer; white-space: nowrap; }
.qg-qc-b.used { border-style: solid; background: var(--primary-soft); }
.qg-voice { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.qg-voice .btn { min-height: var(--tap); }
.qg-skip { align-self: flex-start; }
/* calm grade colours (white text ≥ 4.5:1); «يعاود» is an outline button, never an alarming red block */
.qg-btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 60px; font-size: 1.1rem; font-weight: 800; }
.qg-btn.g-excellent { background: #1f7a4f; } .qg-btn.g-good { background: #22687f; } .qg-btn.g-acceptable { background: #8a5d0b; }
.qg-btn.g-retry { background: #fff; color: #9b2c22; box-shadow: inset 0 0 0 2px #e4b4ae; }
.qg-sticky { position: sticky; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 5; background: rgba(255,255,255,.96); padding: .55rem; margin: .3rem -.55rem 0; border-radius: 16px; box-shadow: 0 -6px 18px rgba(13,107,76,.12); }
.glink .qg-sticky { bottom: env(safe-area-inset-bottom); }
@media (min-width: 993px) { .qg-sticky { bottom: 0; } }

/* ===================== v1.23 phase 2 — big recorder (parent task page) ===================== */
html:not(.js) .rec { display: none; }
.rec { background: linear-gradient(180deg, #f3faf6, #fff); border: 1px solid #d5e8de; border-radius: 22px; padding: 1rem .9rem 1.1rem; text-align: center; display: grid; gap: .6rem; justify-items: center; }
.rec-wave { width: 100%; height: 64px; display: block; }
.rec-time { font-size: 2.3rem; font-weight: 800; letter-spacing: .04em; font-variant-numeric: tabular-nums; direction: ltr; color: var(--primary-dark); line-height: 1.1; }
.rec-controls { display: flex; align-items: center; justify-content: center; gap: 1.1rem; min-height: 96px; }
.rec-main { width: 92px; height: 92px; border-radius: 999px; border: 0; display: grid; place-items: center; cursor: pointer; color: #fff; background: var(--primary); box-shadow: 0 10px 24px rgba(13,107,76,.28), 0 0 0 8px #e6f4ee; }
.rec-main:active { transform: scale(.97); }
.rec-stop { background: #b42318; box-shadow: 0 10px 24px rgba(180,35,24,.25), 0 0 0 8px #fde8e7; }
.rec-ctl { width: 64px; min-height: 64px; border-radius: 18px; border: 1px solid var(--border); background: #fff; color: var(--text); font: inherit; font-size: .72rem; font-weight: 700; display: grid; place-items: center; gap: 2px; padding: .35rem .2rem; cursor: pointer; }
.rec-ctl > span, .rec-pause .rp-p, .rec-pause .rp-r { display: grid; place-items: center; gap: 2px; }
.rec-pause .rp-r { display: none; }
.rec-state { min-height: 1.6em; font-weight: 700; color: var(--text); max-width: 32rem; }
.rec-review { display: none; width: 100%; gap: .6rem; justify-items: center; }
.rec-review audio { width: 100%; }
.rec-prime { display: grid; gap: .6rem; justify-items: center; background: #fff; border: 1px solid #d5e8de; border-radius: 16px; padding: 1rem; max-width: 30rem; }
.rec-prime p { margin: 0; line-height: 1.8; }
.rec-prime-ico { width: 64px; height: 64px; border-radius: 999px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.rec-send { width: 100%; min-height: 56px; font-size: 1.1rem; border-radius: 16px; }
.rec-send:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.rec-upload { margin: .8rem 0 0; }
.rec-upload summary { color: var(--muted); font-weight: 700; cursor: pointer; min-height: var(--tap); display: flex; align-items: center; }
/* modes */
.rec[data-mode="idle"] .rec-stop, .rec[data-mode="idle"] .rec-ctl { display: none; }
.rec[data-mode="idle"] .rec-wave, .rec[data-mode="idle"] .rec-time { opacity: .35; }
.rec[data-mode="recording"] [data-rec-start], .rec[data-mode="paused"] [data-rec-start] { display: none; }
.rec[data-mode="paused"] .rec-pause .rp-p { display: none; }
.rec[data-mode="paused"] .rec-pause .rp-r { display: grid; }
.rec[data-mode="paused"] .rec-time { opacity: .55; }
.rec[data-mode="review"] .rec-controls, .rec[data-mode="review"] .rec-wave { display: none; }
.rec[data-mode="review"] .rec-review { display: grid; }
.rec[data-mode="prime"] > :not(.rec-prime):not(.rec-state) { display: none; }
.rec[data-mode="nomic"] > :not(.rec-state), .rec[data-mode="file"] > :not(.rec-state) { display: none; }
.rec [hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) {
  .rec[data-mode="recording"] .rec-stop { animation: recPulse 1.6s ease-in-out infinite; }
  @keyframes recPulse { 50% { box-shadow: 0 10px 24px rgba(180,35,24,.25), 0 0 0 14px #fde8e7; } }
}

/* ===================== v1.23 phase 2 — parent «اليوم» (online) ===================== */
.kid-switch { margin: -.2rem 0 .7rem; }
.kid-switch .chip { gap: .45rem; padding-inline: .5rem .9rem; }
.kid-av { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); font-weight: 800; }
.kid-switch .chip.active .kid-av { background: rgba(255,255,255,.22); color: #fff; }
.kid-switch .chip-n.is-done { color: inherit; font-weight: 900; }
.kid-cards > article[hidden] { display: none; }
.pc-hero { align-items: flex-start; padding-top: 1rem; }
.pc-hero h3 { font-size: 1.2rem; }
.pc-hero-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.pc-anchor { position: relative; top: -80px; display: block; height: 0; }
.plan-card .pc-title { gap: .35rem; color: var(--primary-dark); }
.pc-sub { margin: .2rem 0 0; font-weight: 800; font-size: .88rem; color: #8f1d14; }
.pc-path { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.pc-step { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: .6rem; align-items: start; }
.pc-step:not(:last-child)::before { content: ""; position: absolute; inset-inline-start: 19px; top: 40px; bottom: -.55rem; width: 2px; background: #d6e4dc; }
.pc-step.st-graded:not(:last-child)::before, .pc-step.st-sent:not(:last-child)::before { background: var(--primary); }
.pc-node { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; background: #fff; border: 2px solid #cfdcd5; color: var(--muted); font-weight: 800; position: relative; z-index: 1; }
.pc-step.st-graded .pc-node { background: var(--primary); border-color: var(--primary); color: #fff; }
.pc-step.st-sent .pc-node { background: #fff7e0; border-color: #e0b44a; color: #7a4a05; }
.pc-step.st-redo .pc-node { background: #fde8e7; border-color: #e4b4ae; color: #8f1d14; }
.pc-step.is-current .pc-node { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 5px var(--primary-soft); }
.pc-step.is-opt .pc-node { border-style: dashed; }
.pc-body { display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem; align-items: center; background: #f6faf8; border-radius: 16px; padding: .65rem .75rem; min-width: 0; }
.pc-step.is-current .pc-body { background: #fff; box-shadow: 0 0 0 2px var(--primary), 0 8px 20px rgba(13,107,76,.12); }
.pc-step.st-sent .pc-body { background: #fffbeb; } .pc-step.st-graded .pc-body { background: #f0fdf4; } .pc-step.st-redo .pc-body { background: #fef2f2; }
.pc-body .pc-kind { grid-column: 1; width: auto; }
.pc-body .pc-range { grid-column: 1; }
.pc-body .pc-badges { grid-column: 1; display: flex; flex-wrap: wrap; gap: .25rem; }
.pc-body .pc-btn { grid-column: 2; grid-row: 1 / span 3; }
.pc-body .pc-note, .pc-body .help, .pc-body .pc-model { grid-column: 1 / -1; }
.pc-step.is-current .pc-btn { min-height: 52px; min-width: 104px; font-size: 1.02rem; }
.pc-model audio { width: 100%; height: 36px; }
.pc-alldone { display: flex; align-items: center; gap: .4rem; margin: .2rem 0 0; font-weight: 800; color: var(--primary-dark); }
.today-cta { position: fixed; inset-inline: 0; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 40; padding: 0 1rem; display: flex; justify-content: center; pointer-events: none; }
.today-cta[hidden] { display: none; }
.today-cta .btn { pointer-events: auto; width: 100%; max-width: 520px; min-height: 56px; border-radius: 999px; font-size: 1.05rem; box-shadow: 0 10px 26px rgba(13,107,76,.35); }
@media (min-width: 993px) { .today-cta { bottom: 1.2rem; inset-inline-start: 260px; } }
body:has(.today-cta:not([hidden])) .content { padding-bottom: 150px; }
.glink { width: 100%; min-width: 0; }
.qg .panel-body > * { min-width: 0; max-width: 100%; }

/* ===================== v1.23 phase 3 — read-along Quran text (riwaya font), journey, onboarding ===================== */
@font-face { font-family: "KFGQPC Warsh"; src: url("../fonts/kfgqpc-warsh.ttf") format("truetype"); font-display: block; }
@font-face { font-family: "Amiri Quran Hafs"; src: url("../fonts/amiri-quran-hafs.woff2") format("woff2"); font-display: block; }
.task-ayat, .pc-ayat, .qg-ayat { display: inline-block; font-size: .86rem; color: var(--gold-text); font-weight: 600; }
.task-range .task-ayat { display: block; margin-top: .15rem; }
.pc-ayat { display: block; }
.qtext-box { border: 1px solid var(--border, #e2e8f0); border-radius: 14px; background: #fffdf6; margin: .2rem 0 1rem; overflow: hidden; }
.qtext-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .55rem .8rem; background: #fbf6e6; flex-wrap: wrap; }
.qtext-title { display: flex; align-items: center; gap: .35rem; font-weight: 700; min-width: 0; flex-wrap: wrap; }
.qtext-range { color: var(--gold-text); font-size: .9rem; }
.qtext-toggle { min-height: 40px; }
.qtext-note { margin: .4rem .8rem 0; font-size: .82rem; }
.qtext { max-height: 58vh; overflow-y: auto; overscroll-behavior: contain; padding: .6rem .9rem .8rem; color: #1b1b1b; animation: none !important; transition: none !important; }
.qtext * { animation: none !important; transition: none !important; }
.qt-surah { text-align: center; font-size: 1rem; margin: .5rem 0 .3rem; padding: .3rem; border-block: 1px solid #e9dfbf; color: var(--gold-text); }
.qt-ayat { margin: 0 0 .5rem; text-align: justify; text-align-last: center; overflow-wrap: anywhere; }
.qt-warsh { font-family: "KFGQPC Warsh", serif; font-size: 1.7rem; line-height: 2.25; }
.qt-hafs { font-family: "Amiri Quran Hafs", "Amiri Quran", serif; font-size: 1.5rem; line-height: 2.35; }
.qt-n { white-space: nowrap; }
.qtext-src { margin: .4rem 0 0; font-size: .75rem; text-align: center; }
@media (min-width: 700px) { .qt-warsh { font-size: 1.9rem; } .qt-hafs { font-size: 1.65rem; } }
/* journey + badge shelf (parent «التقدّم») */
.journey { background: #f7fbf9; border: 1px solid #dcebe4; border-radius: 14px; padding: .7rem .8rem; margin-bottom: .6rem; }
.jr-head { margin-bottom: .45rem; }
.jr-path { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0; }
.jr-node { flex: 1 1 0; display: flex; align-items: center; min-width: 0; }
.jr-node:not(:last-child)::after { content: ""; flex: 1; height: 3px; background: #d5e3dd; margin-inline: 2px; border-radius: 2px; }
.jr-node.jr-m:not(:last-child)::after { background: var(--primary, #0d6b4c); }
.jr-node.jr-chest { flex: 0 0 auto; }
.jr-dot { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; background: #fff; border: 2px solid #c9d8d1; color: #54636b; }
.jr-m .jr-dot { background: var(--primary, #0d6b4c); border-color: var(--primary, #0d6b4c); color: #fff; }
.jr-p .jr-dot { border-color: var(--gold, #c9a227); background: var(--gold-soft, #fbf3d9); color: var(--gold-text, #7a5f0c); }
.jr-node.is-next .jr-dot { box-shadow: 0 0 0 3px rgba(201,162,39,.35); }
.jr-chest .jr-dot { width: 40px; height: 40px; border-radius: 12px; border-color: var(--gold, #c9a227); color: var(--gold-text, #7a5f0c); background: #fffaf0; }
.jr-chest.is-open .jr-dot { background: var(--gold, #c9a227); color: #fff; }
.jr-goal { margin: .55rem 0 .2rem; font-weight: 600; }
.jr-total { margin-top: .6rem; }
.jr-total-top { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; font-size: .92rem; }
.jr-bar { display: flex; gap: 1px; margin-top: .3rem; height: 12px; }
.jr-bar i { flex: 1; background: #e3ebe7; border-radius: 2px; }
.jr-bar i.p { background: #e8d48f; } .jr-bar i.d { background: var(--primary, #0d6b4c); }
.jr-bar i.c { outline: 2px solid var(--gold-text, #7a5f0c); outline-offset: 0; }
.jr-ends { display: flex; justify-content: space-between; font-size: .72rem; }
.jr-next { margin: .3rem 0 0; }
.bshelf { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; }
.bs-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .15rem; padding: .55rem .35rem; border-radius: 12px; border: 1px solid #e6e1cf; background: #fffdf6; min-width: 0; }
.bs-ico { position: relative; font-size: 1.6rem; line-height: 1.2; }
.bs-t { font-size: .8rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.bs-d { font-size: .7rem; color: #5c6670; line-height: 1.3; overflow-wrap: anywhere; }
.bs-item.is-locked { background: #f6f7f8; border-color: #e3e6e9; }
.bs-item.is-locked .bs-ico { filter: grayscale(1); opacity: .45; }
.bs-lock { position: absolute; bottom: -2px; inset-inline-end: -8px; background: #fff; border-radius: 50%; padding: 2px; color: #54636b; filter: none; opacity: 1; display: grid; }
.bs-prog { width: 80%; height: 5px; background: #e3e6e9; border-radius: 3px; overflow: hidden; }
.bs-prog i { display: block; height: 100%; background: var(--gold, #c9a227); }
.prog-map summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
/* empty states, onboarding, «اسمع» */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; padding: 1.6rem 1rem; }
.es-ico { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: #eef6f2; color: var(--primary, #0d6b4c); }
.es-t { font-size: 1.02rem; color: #1f2a30; }
.es-x { color: #56636b; font-size: .9rem; max-width: 34ch; }
.es-a { margin-top: .4rem; }
.onb { border: 1px solid #dcebe4; background: linear-gradient(180deg, #f2faf6, #fff); border-radius: 16px; padding: .9rem; margin-bottom: 1rem; }
.onb-card { display: grid; grid-template-columns: auto 1fr; gap: .4rem .75rem; align-items: start; }
.onb-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--primary, #0d6b4c); color: #fff; }
.onb-txt b { font-size: 1.05rem; } .onb-txt p { margin: .2rem 0 0; color: #3d4a51; }
.onb-tts { grid-column: 2; justify-self: start; min-height: 40px; }
.onb-foot { display: flex; align-items: center; gap: .5rem; margin-top: .7rem; }
.onb-foot [data-onb-skip] { margin-inline-start: auto; min-height: 44px; }
.onb-foot [data-onb-next] { min-height: 44px; }
.onb-dots { display: flex; gap: 5px; } .onb-dots i { width: 8px; height: 8px; border-radius: 50%; background: #c9d8d1; } .onb-dots i.on { background: var(--primary, #0d6b4c); width: 20px; border-radius: 4px; }
.rec-tts { min-height: 44px; margin-top: .2rem; }
@media (prefers-reduced-motion: reduce) { .onb *, .journey *, .bshelf * { transition: none !important; animation: none !important; } }
.onb[hidden], .onb-card[hidden], .qtext[hidden] { display: none !important; }

/* ===== v1.24 P1 — reading comfort (AA), «سمّع لروحك», offline outbox ===== */
.qtext-btns { display: flex; gap: .4rem; align-items: center; }
.qt-aa-btn { min-height: 40px; min-width: 44px; font-weight: 800; font-family: serif; }
.qt-aa-btn small { font-size: .7em; }
.qt-aa { padding: .5rem .8rem .6rem; background: #fbf6e6; border-top: 1px solid #efe3bd; display: grid; gap: .45rem; }
.qt-aa[hidden] { display: none !important; }
.qt-aa-row { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.qt-sz, .qt-opt { min-height: 44px; border: 1px solid var(--border); background: #fff; border-radius: 12px; cursor: pointer; color: var(--text); font: inherit; }
.qt-sz { min-width: 48px; font-family: "KFGQPC Warsh", "Amiri Quran Hafs", serif; line-height: 1; }
.qt-sz1 { font-size: .95rem; } .qt-sz2 { font-size: 1.2rem; } .qt-sz3 { font-size: 1.5rem; } .qt-sz4 { font-size: 1.85rem; }
.qt-opt { padding: 0 .8rem; font-size: .9rem; }
.qt-sz[aria-pressed="true"], .qt-opt[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.qtext-box { --qt-scale: 1; --qt-lh: 1; }
.qtext-box.qt-s1 { --qt-scale: .85; } .qtext-box.qt-s3 { --qt-scale: 1.22; } .qtext-box.qt-s4 { --qt-scale: 1.48; }
.qtext-box.qt-lh { --qt-lh: 1.18; }
.qtext-box .qt-warsh { font-size: calc(1.7rem * var(--qt-scale)); line-height: calc(2.25 * var(--qt-lh)); }
.qtext-box .qt-hafs { font-size: calc(1.5rem * var(--qt-scale)); line-height: calc(2.35 * var(--qt-lh)); }
@media (min-width: 700px) { .qtext-box .qt-warsh { font-size: calc(1.9rem * var(--qt-scale)); } .qtext-box .qt-hafs { font-size: calc(1.65rem * var(--qt-scale)); } }
.qtext-box.qt-s4 .qtext, .qtext-box.qt-s3 .qtext { max-height: 66vh; }
/* night mode: calm brown/black page, warm text (contrast ≈ 12:1), no pure white */
.qtext-box.qt-dark { background: #1e1a14; border-color: #3a3125; }
.qtext-box.qt-dark .qtext { color: #efe4c8; }
.qtext-box.qt-dark .qtext-head, .qtext-box.qt-dark .qt-aa { background: #2a241b; border-color: #3a3125; color: #efe4c8; }
.qtext-box.qt-dark .qtext-range, .qtext-box.qt-dark .qt-surah { color: #e3c46b; border-color: #4a3f2c; }
.qtext-box.qt-dark .help, .qtext-box.qt-dark .qtext-note { color: #c9bc9c; }
.qtext-box.qt-dark .btn-secondary { background: #3a3125; color: #efe4c8; border-color: #4a3f2c; }
.qtext-box.qt-dark .qt-sz, .qtext-box.qt-dark .qt-opt { background: #2f281e; color: #efe4c8; border-color: #4a3f2c; }
.qtext-box.qt-dark .qt-sz[aria-pressed="true"], .qtext-box.qt-dark .qt-opt[aria-pressed="true"] { background: #4a3f2c; border-color: #e3c46b; color: #fff3d4; }
.qtext-box, .qtext-box * { transition: none !important; }

.selfcheck-btn { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 56px; margin: 0 0 .8rem; padding: .55rem .8rem; border: 1px solid var(--border); border-radius: 14px; background: #fff; text-align: start; cursor: pointer; font: inherit; color: var(--text); }
.selfcheck-btn > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.selfcheck-btn small { color: var(--muted); font-size: .8rem; }
.selfcheck-btn .sc-ico { font-size: 1.5rem; }
.selfcheck-btn .sc-sw { width: 44px; height: 26px; border-radius: 13px; background: #cfd9d3; position: relative; flex: none; }
.selfcheck-btn .sc-sw::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.selfcheck-btn[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); }
.selfcheck-btn[aria-pressed="true"] .sc-sw { background: var(--primary); }
.selfcheck-btn[aria-pressed="true"] .sc-sw::after { inset-inline-start: auto; inset-inline-end: 3px; }
.rec-peek { display: none; min-height: 44px; }
.rec[data-self="1"][data-mode="recording"] .rec-peek, .rec[data-self="1"][data-mode="paused"] .rec-peek { display: inline-flex; }
.rec-cmp, .rec-cmp-h, .rec-cmp-l { display: none; }
.rec[data-self="1"] .rec-cmp { display: grid; gap: .3rem; width: 100%; }
.rec[data-self="1"] .rec-cmp-h { display: block; margin: 0; font-size: .9rem; text-align: center; }
.rec[data-self="1"] .rec-cmp-l { display: block; font-size: .85rem; font-weight: 700; color: var(--primary-dark); justify-self: start; }
.rec-cmp audio { width: 100%; }
.rec[data-mode="queued"] > :not(.rec-state) { display: none; }
.rec[data-mode="queued"] .rec-state { font-weight: 700; color: var(--warn); }

.outbox { position: fixed; inset-inline: .6rem; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: grid; gap: .35rem; }
.outbox[hidden] { display: none; }
.ob-row { background: #fff8e6; border: 1px solid #f0d58c; color: #5c4306; border-radius: 12px; padding: .55rem .7rem; box-shadow: var(--shadow); display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.ob-row > span { flex: 1; min-width: 12rem; }
.ob-row.ob-bad { background: #fdecea; border-color: #f3b8b1; color: #7a1d14; }
.ob-row.ob-ok { background: #e7f6ee; border-color: #9fd4b8; color: #0b4d36; }
@media (min-width: 993px) { .outbox { bottom: 1rem; inset-inline-start: auto; inset-inline-end: 1rem; max-width: 520px; } }
.qg-chip.self { background: #eef4ff; color: #1d4ed8; }

/* ===== v1.24.1 (P2) — word mistakes, «اسمع وردّد», تدرّب على 5 كلمات, صوت الآيات ===== */
.qw-bar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: space-between; padding: .45rem .9rem; font-size: .88rem; color: var(--muted); border-bottom: 1px dashed var(--border); }
.qw-count { background: #fdecea; color: #8a1c12; border-radius: 999px; padding: .1rem .6rem; font-size: .82rem; }
.qw { font: inherit; color: inherit; background: none; border: 0; padding: 0 .05em; margin: 0; border-radius: 6px; cursor: pointer; line-height: inherit; -webkit-tap-highlight-color: transparent; }
.qw:hover { background: rgba(13, 107, 76, .08); }
.qw:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.qw.is-cur { background: #fff3c4; }
.qw[data-k] { background: #fde2df; box-shadow: inset 0 -3px 0 #d9534f; }
.qw[data-k="hesitate"] { background: #fff1d6; box-shadow: inset 0 -3px 0 #d98a00; }
.qw[data-k="swap"] { background: #e9e5ff; box-shadow: inset 0 -3px 0 #6b4fd9; }
.qw[data-k="lahn"] { background: #dff1ff; box-shadow: inset 0 -3px 0 #1e78c8; }
.qtext-box.qt-dark .qw[data-k] { color: #1b1b1b; }
.qw-pop { position: fixed; z-index: 70; inset-inline: .6rem; bottom: .6rem; margin: 0 auto; max-width: 480px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 -6px 30px rgba(0, 0, 0, .18); padding: .8rem; display: grid; gap: .6rem; }
.qw-pop[hidden] { display: none; }
.qw-pop-w { font-family: "KFGQPC Warsh", "Amiri Quran Hafs", serif; font-size: 1.6rem; text-align: center; font-weight: 400; }
.qw-pop-k { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.qw-pop-k button, .qw-pop-x { min-height: 46px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); font: inherit; font-weight: 600; cursor: pointer; }
.qw-pop-k button[aria-pressed="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.qw-pop-x { background: none; color: var(--danger); min-height: 40px; }

.lr { border: 1px solid #cfe5da; background: linear-gradient(180deg, #f2faf6, #fff); border-radius: var(--radius); padding: .8rem; margin: 0 0 1rem; display: grid; gap: .6rem; }
.lr-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; }
.lr-head b { font-size: 1.05rem; }
.lr-kids-btn[aria-pressed="true"] { background: var(--accent); color: #1b1b1b; border-color: var(--accent); }
.lr-now { text-align: center; font-size: 1.6rem; line-height: 2.1; min-height: 3.4rem; padding: .3rem .4rem; background: #fff; border-radius: 12px; border: 1px solid var(--border); }
.lr-now.qt-hafs { font-family: "Amiri Quran Hafs", "Amiri Quran", serif; }
.lr-now.qt-warsh { font-family: "KFGQPC Warsh", serif; }
.lr.is-kids .lr-now { font-size: 2.2rem; line-height: 2.3; }
.lr.lr-hide .lr-now { visibility: hidden; }
.lr-pos { text-align: center; margin-top: -.3rem; }
.lr-ctl { display: flex; gap: .8rem; justify-content: center; align-items: center; }
.lr-b { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; color: var(--primary); }
.lr-b.lr-play { width: 64px; height: 64px; background: var(--primary); color: #fff; border-color: var(--primary); }
.lr-b:focus-visible, .lr-big:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lr-i-pause, .lr.is-playing .lr-i-play { display: none; }
.lr.is-playing .lr-i-pause { display: inline; }
.lr-turn { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: center; background: #fff7e0; border: 1px solid #f1d58a; border-radius: 12px; padding: .5rem .8rem; font-weight: 700; color: #6b4b00; }
.lr-turn[hidden] { display: none; }
.lr-turn-bar { flex-basis: 100%; height: 6px; border-radius: 6px; background: #f6e7b8; overflow: hidden; display: block; }
.lr-turn-bar > i { display: block; height: 100%; width: 100%; background: #d9a400; }
.lr-opts { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: center; font-size: .9rem; }
.lr-rep { display: inline-flex; gap: .3rem; align-items: center; }
.lr-rep button { min-width: 44px; min-height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font: inherit; font-weight: 700; cursor: pointer; }
.lr-rep button[aria-pressed="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.lr-chk { display: inline-flex; gap: .35rem; align-items: center; min-height: 40px; }
.lr.is-kids .lr-ctl { display: none; }
.lr-kidctl { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.lr-kidctl[hidden] { display: none; }
.lr-big { min-height: 64px; border-radius: 16px; border: 2px solid var(--primary); background: #fff; color: var(--primary); font: inherit; font-size: 1.15rem; font-weight: 800; cursor: pointer; }
.lr-big.is-rec { background: var(--danger); border-color: var(--danger); color: #fff; }
.lr-big.lr-next { background: var(--primary); color: #fff; }
.lr-mine { grid-column: 1 / -1; width: 100%; }
.lr-mine[hidden] { display: none; }
.lr-miss, .lr-none { margin: 0; text-align: center; }
.rec-cmp [data-lr-cmp] { justify-self: start; }

.ww-cta { display: flex; gap: .7rem; align-items: center; margin: .2rem 0 .6rem; padding: .7rem .9rem; border-radius: 14px; background: #fff7e0; border: 1px solid #f1d58a; color: #5c4100; text-decoration: none; }
.ww-cta > span:nth-child(2) { flex: 1; display: grid; }
.ww-cta small { color: #7a5b12; font-size: .82rem; }
.ww-cta-i { font-size: 1.6rem; }
.ww-list { display: grid; gap: .8rem; }
.ww-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ww-word { font-size: 2rem; line-height: 1.6; font-weight: 400; }
.ww-word.qt-warsh, .ww-ayah.qt-warsh, .tw-w.qt-warsh { font-family: "KFGQPC Warsh", serif; }
.ww-word.qt-hafs, .ww-ayah.qt-hafs, .tw-w.qt-hafs { font-family: "Amiri Quran Hafs", "Amiri Quran", serif; }
.ww-k-forget { background: #fde2df; color: #8a1c12; }
.ww-k-hesitate { background: #fff1d6; color: #7a4a00; }
.ww-k-swap { background: #e9e5ff; color: #3d2a99; }
.ww-k-lahn { background: #dff1ff; color: #0f4c85; }
.ww-ayah { font-size: 1.45rem; line-height: 2.2; margin: .4rem 0; }
.ww-ayah mark { background: #fff0a8; border-radius: 6px; padding: 0 .15em; box-shadow: inset 0 -3px 0 #d9a400; }
.ww-act { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ww-act audio { max-width: 100%; }
.ww-audio { width: 100%; }
.ww-rec { display: inline-flex; flex-wrap: wrap; gap: .4rem; align-items: center; }

.tw-list { margin: 0; padding-inline-start: 1.2rem; display: grid; gap: .45rem; }
.tw-list li { display: flex; flex-wrap: wrap; gap: .4rem .7rem; align-items: center; }
.tw-w { font-size: 1.5rem; line-height: 1.7; font-weight: 400; }
.tw-rec { font-size: .85rem; }

.aa-pick .inline-actions { flex-wrap: wrap; }
.aa-pick select { max-width: 100%; }
.aa-rec { position: sticky; top: .4rem; z-index: 5; border: 2px solid var(--primary-soft); }
.aa-rec.is-rec { border-color: var(--danger); }
.aa-cur { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.aa-text { min-height: 2.6rem; max-height: 28vh; overflow-y: auto; text-align: center; margin: .4rem 0; padding: .3rem .5rem; }
.aa-btns { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.aa-nav { margin-inline-start: auto; display: inline-flex; gap: .4rem; }
.aa-rec.is-rec .aa-nav { opacity: .4; }
.aa-list { display: grid; gap: .5rem; }
.aa-row { display: grid; grid-template-columns: 44px 1fr; gap: .2rem .6rem; align-items: start; padding: .5rem; border: 1px solid var(--border); border-radius: 12px; }
.aa-row.is-cur { border-color: var(--primary); background: var(--primary-soft); }
.aa-row.is-up { opacity: .6; }
.aa-row.is-err { border-color: var(--danger); background: #fdecea; }
.aa-num { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); font: inherit; font-weight: 700; cursor: pointer; }
.aa-row.has .aa-num { background: var(--primary); color: #fff; border-color: var(--primary); }
.aa-t { margin: 0; font-size: 1.35rem; line-height: 2; }
.aa-act { grid-column: 2; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.aa-act audio { height: 36px; max-width: 100%; }
@media (max-width: 480px) { .aa-row { grid-template-columns: 1fr; } .aa-act { grid-column: 1; } .aa-nav { margin-inline-start: 0; } }
@media (prefers-reduced-motion: reduce) { .lr-turn-bar { display: none; } }
.lr.is-kids .lr-now { font-size: 1.9rem; }
@media (max-width: 699px) { .aa-rec { position: static; } }

/* ===== v1.24.2 (P3) — تشجيع البيت، هدف الأسبوع، هدف الفوج، دفتر تلاواتي ===== */
.bar { display: block; height: 8px; border-radius: 8px; background: #e7efe9; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: 8px; }
.cheer-pop { position: relative; overflow: hidden; margin: 0 0 .7rem; padding: .9rem; border-radius: 16px; background: linear-gradient(135deg, #fff4d6, #ffe9f0); border: 1px solid #f3d27a; display: grid; gap: .4rem; text-align: center; }
.cheer-pop b { font-size: 1.05rem; }
.cheer-text { margin: 0; font-size: 1.25rem; font-weight: 700; color: #6b3d00; }
.cheer-pop audio { width: 100%; }
.cheer-pop form { margin: 0; }
.cheer-burst { position: absolute; inset: 0; pointer-events: none; }
.cheer-burst i { position: absolute; top: 100%; font-style: normal; font-size: 1.3rem; opacity: 0; animation: cheerUp 2.4s ease-out 1 forwards; }
.cheer-burst i:nth-child(1) { inset-inline-start: 8%; animation-delay: .1s; }
.cheer-burst i:nth-child(2) { inset-inline-start: 28%; animation-delay: .35s; }
.cheer-burst i:nth-child(3) { inset-inline-start: 50%; animation-delay: .2s; }
.cheer-burst i:nth-child(4) { inset-inline-start: 72%; animation-delay: .5s; }
.cheer-burst i:nth-child(5) { inset-inline-start: 90%; animation-delay: .15s; }
@keyframes cheerUp { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-160px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cheer-burst { display: none; } }
.cheer-chips, .sd-cheer { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.sd-cheer { justify-content: center; margin-top: .8rem; }
.sd-cheer > span { flex-basis: 100%; font-weight: 700; }
.cheer-chip { min-height: 44px; padding: .35rem .85rem; border-radius: 999px; border: 1px solid #f1d58a; background: #fff8e6; color: #5c4100; font: inherit; font-weight: 600; cursor: pointer; }
.cheer-chip:hover { background: #ffefc2; }
.cheer-chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.cheer-own { margin-top: 1rem; display: grid; gap: .4rem; }
.cheer-own audio { max-width: 100%; }
.cheer-recent { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .35rem; }
.cheer-recent li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem; padding: .4rem .6rem; border: 1px solid var(--border); border-radius: 10px; }
.fg-prog { display: grid; gap: .35rem; margin-bottom: 1rem; padding: .7rem; border-radius: 12px; background: var(--primary-soft); }
.fg-prog.is-done, .fg-line.is-done { background: #fff4d6; }
.fg-n, .gg-n { font-weight: 800; font-size: 1.1rem; }
.fg-line { display: grid; gap: .25rem; margin: .2rem 0 .5rem; padding: .6rem .8rem; border-radius: 14px; background: var(--primary-soft); color: var(--text); text-decoration: none; }
.fg-line small { color: var(--muted); }
.gg { display: grid; gap: .3rem; margin: .2rem 0 .5rem; padding: .6rem .8rem; border-radius: 14px; background: #eef4ff; }
.gg .bar > i { background: #3b6fd8; }
.gg-top { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.gg.is-done { background: #fff4d6; }
.gg.is-done .bar > i { background: #d9a400; }
.gg-msg { margin: 0; font-weight: 700; color: #6b4b00; }
.pc-fam { display: flex; flex-wrap: wrap; gap: .5rem; margin: .2rem 0 .4rem; }
.pc-fam a { display: inline-flex; align-items: center; min-height: 40px; padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text); font-weight: 600; font-size: .92rem; }
.qg-star { display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: center; margin: .5rem 0; padding: .5rem .7rem; border-radius: 12px; border: 1px dashed #e0c25c; background: #fffaf0; cursor: pointer; }
.qg-star input { width: 20px; height: 20px; }
.qg-star small { flex-basis: 100%; }
.star-btn { background: none; border: 0; font-size: 1.4rem; line-height: 1; cursor: pointer; color: #b9a15a; min-width: 40px; min-height: 40px; }
.star-btn.on { color: #d9a400; }
.nb-cols { display: grid; grid-template-columns: 1fr; gap: .7rem; }
@media (min-width: 700px) { .nb-cols { grid-template-columns: 1fr 1fr; } }
.nb-col { display: grid; gap: .3rem; padding: .6rem; border: 1px solid var(--border); border-radius: 12px; }
.nb-col.is-after { border-color: var(--primary); background: var(--primary-soft); }
.nb-col audio, .nb-item audio { width: 100%; }
.nb-tag { font-weight: 800; color: var(--primary); }
.nb-gap { margin: 0 1rem .8rem; }
.nb-list { display: grid; gap: .6rem; }
.nb-item { display: grid; gap: .3rem; padding: .5rem; border: 1px solid var(--border); border-radius: 12px; }
.nb-h { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }

/* v1.25.1 — registration steps folded by default (native details/summary) */
.rs-fold { border: 1px solid var(--border, #d8e3dc); border-radius: 16px; background: #fff; margin: 0 0 1rem; }
.rs-fold > summary { list-style: none; cursor: pointer; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .65rem 1rem; border-radius: 16px; }
.rs-fold > summary::-webkit-details-marker { display: none; }
.rs-fold > summary:focus-visible { outline: 3px solid #c9a227; outline-offset: 2px; }
.rs-fold-t { display: grid; gap: .1rem; min-width: 0; }
.rs-fold-t b { font-size: 1.02rem; font-weight: 800; color: var(--text, #1a2e24); }
.rs-fold-s { font-size: .86rem; color: var(--muted, #5a6f64); }
.rs-fold-a { flex: 0 0 40px; height: 40px; display: grid; place-items: center; color: var(--primary, #0d6b4c); background: #eef7f2; border-radius: 999px; }
.rs-fold-h { font-size: .85rem; font-weight: 800; color: var(--primary, #0d6b4c); }
.rs-fold-hide { display: none; }
.rs-fold[open] .rs-fold-show { display: none; }
.rs-fold[open] .rs-fold-hide { display: inline; }
.rs-fold-chev { transition: transform .2s ease; }
.rs-fold[open] .rs-fold-chev { transform: rotate(180deg); }
.rs-fold[open] > summary { border-bottom: 1px solid var(--border, #d8e3dc); border-radius: 16px 16px 0 0; }
.rs-fold-body { padding: 1rem 1rem .2rem; }
@media (prefers-reduced-motion: reduce) { .rs-fold-chev { transition: none; } }

/* ===== v1.27 — online «اليوم» dashboard (design A tokens: green / deep / gold / cream) ===== */
.dz { --dz-green: #0d6b4c; --dz-deep: #08402e; --dz-gold: #c9a227; --dz-cream: #fffaf0; --dz-line: #e7ddc6; display: grid; gap: .9rem; max-width: 1100px; margin: 0 auto; }
.dz-h { margin: 0; font-size: 1.05rem; font-weight: 800; color: var(--dz-deep); }
.dz-hi { background: linear-gradient(160deg, var(--dz-cream), #f6efdc); border: 1px solid var(--dz-line); border-radius: 20px; padding: .95rem 1.1rem 1rem; }
.dz-date { margin: 0; font-size: .82rem; font-weight: 700; color: #7a5f0c; }
.dz-hi h2 { margin: .1rem 0 .15rem; font-size: 1.35rem; font-weight: 800; color: var(--dz-deep); }
.dz-sum { margin: 0; color: #3f5a4d; font-size: .95rem; line-height: 1.7; }
.dz-sum-2 { display: block; color: var(--muted); font-size: .86rem; }
.dz-today { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: .85rem; box-shadow: var(--shadow); }
.dz-today > .dz-h { padding: 0 .25rem .55rem; }
.dz-acts { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.dz-act { border: 1px solid var(--border); border-radius: 16px; background: #fff; overflow: hidden; }
.dz-act-main { display: grid; grid-template-columns: 44px 1fr auto; grid-template-areas: "ico t n" "ico go go"; align-items: center; gap: .1rem .7rem; padding: .7rem .8rem; color: var(--text); text-decoration: none; min-height: 64px; }
.dz-act-main:hover { background: #fbfdfc; text-decoration: none; }
.dz-act-main:focus-visible { outline: 3px solid var(--dz-gold); outline-offset: -3px; }
.dz-ico { grid-area: ico; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--primary-soft); color: var(--dz-deep); }
.dz-act-t { grid-area: t; min-width: 0; display: grid; }
.dz-act-t strong { font-size: 1rem; line-height: 1.45; }
.dz-act-t small { color: var(--muted); font-size: .84rem; line-height: 1.5; }
.dz-n { grid-area: n; font-size: 1.55rem; font-weight: 800; line-height: 1; color: var(--dz-deep); font-variant-numeric: tabular-nums; }
.dz-go { grid-area: go; justify-self: start; display: inline-flex; align-items: center; gap: .2rem; margin-top: .35rem; font-size: .86rem; font-weight: 800; color: var(--dz-green); background: #eef7f2; border-radius: 999px; padding: .3rem .75rem; min-height: 32px; }
.dz-act.t-danger .dz-ico { background: #fdecec; color: #b42323; }
.dz-act.t-danger .dz-n { color: #b42323; }
.dz-act.t-warn .dz-ico { background: #fff4dc; color: #8a5a00; }
.dz-act.t-info .dz-ico { background: #e8f1fd; color: #1557a8; }
.dz-act.t-danger { border-inline-start: 4px solid #d64545; }
.dz-act.t-warn { border-inline-start: 4px solid var(--dz-gold); }
.dz-act.t-info { border-inline-start: 4px solid #4c86d9; }
.dz-more { border-top: 1px dashed var(--border); }
.dz-more summary { cursor: pointer; padding: .55rem .9rem; min-height: 44px; display: flex; align-items: center; font-size: .88rem; font-weight: 700; color: var(--dz-green); list-style: none; }
.dz-more summary::-webkit-details-marker { display: none; }
.dz-more summary::after { content: "▾"; margin-inline-start: .35rem; font-size: .8rem; }
.dz-more[open] summary::after { content: "▴"; }
.dz-more ul { list-style: none; margin: 0; padding: 0 .9rem .6rem; display: grid; gap: .2rem; }
.dz-more li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; padding: .35rem 0; border-top: 1px solid #f0f3f1; font-size: .9rem; }
.dz-clear { display: grid; justify-items: center; text-align: center; gap: .3rem; padding: 1.2rem .8rem 1rem; border-radius: 16px; background: linear-gradient(180deg, #f2faf6, #fff); border: 1px dashed #bfe0cf; }
.dz-clear-ico { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #e3f3ea; color: var(--dz-green); box-shadow: 0 0 0 8px #f2faf6; margin-bottom: .3rem; }
.dz-clear strong { font-size: 1.12rem; color: var(--dz-deep); }
.dz-clear p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.75; max-width: 30rem; }
.dz-link { margin-top: .35rem; font-weight: 800; font-size: .9rem; }
.dz-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.dz-kpi { display: grid; align-content: start; gap: .1rem; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: .7rem .8rem; color: var(--text); text-decoration: none; min-height: 96px; }
a.dz-kpi:hover { border-color: #b9d8c8; text-decoration: none; }
.dz-k-l { font-size: .8rem; font-weight: 700; color: var(--muted); }
.dz-k-v { font-size: 1.5rem; font-weight: 800; color: var(--dz-deep); line-height: 1.3; font-variant-numeric: tabular-nums; }
.dz-k-s { font-size: .78rem; color: var(--muted); line-height: 1.5; }
.dz-spark { color: var(--dz-green); display: block; max-width: 100%; height: auto; margin-top: .15rem; }
.dz-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: .85rem .95rem; }
.dz-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .55rem; }
.dz-card-h small, .dz-card-h a { font-size: .82rem; color: var(--muted); font-weight: 700; }
.dz-card-h a { color: var(--dz-green); }
.dz-goals { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.dz-g-top { display: flex; justify-content: space-between; gap: .5rem; font-size: .92rem; }
.dz-g-top span { font-weight: 800; color: var(--dz-deep); font-variant-numeric: tabular-nums; }
.dz-bar { display: block; height: 8px; border-radius: 999px; background: #eef2ef; overflow: hidden; margin: .3rem 0 .2rem; }
.dz-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--dz-gold), var(--dz-green)); }
.dz-goals small { color: var(--muted); font-size: .8rem; }
.dz-behind { color: #b42323; }
.dz-latest { list-style: none; margin: 0; padding: 0; }
.dz-latest li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .6rem; padding: .5rem 0; border-top: 1px solid #f0f3f1; font-size: .92rem; min-height: 44px; }
.dz-latest li:first-child { border-top: 0; }
.dz-latest small { color: var(--muted); font-size: .8rem; }
.dz-strip { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; background: var(--dz-cream); border: 1px solid var(--dz-line); border-radius: 14px; padding: .35rem .45rem; }
.dz-strip[hidden] { display: none; }
.dz-strip-i { flex: 1 1 auto; display: flex; align-items: center; gap: .4rem; min-height: 40px; padding: 0 .5rem; border-radius: 10px; color: var(--dz-deep); font-size: .84rem; font-weight: 700; text-decoration: none; }
.dz-strip-i:hover { background: #fff; text-decoration: none; }
.dz-strip-i > span:not(.dz-mini) { white-space: nowrap; }
.dz-mini { flex: 0 1 44px; min-width: 24px; height: 5px; border-radius: 999px; background: #eadfc4; overflow: hidden; }
.dz-mini > span { display: block; height: 100%; background: var(--dz-green); }
.dz-strip-x { display: none; flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; place-items: center; }
.js .dz-strip-x { display: grid; }
.dz-strip-x:hover { background: #fff; }
.dz-season { margin: 0; text-align: center; }
.dz .push-box, .dz .rc-nudge, .dz .alert { margin: 0; }
@media (min-width: 760px) {
  .dz { grid-template-columns: 1.35fr 1fr; align-items: start; }
  .dz-hi, .dz-today, .dz-kpis, .dz-strip, .dz-season, .dz > .alert, .dz > section:not(.dz-card):not(.dz-today):not(.dz-kpis) { grid-column: 1 / -1; }
  .dz-kpis { grid-template-columns: repeat(4, 1fr); }
  .dz-acts { grid-template-columns: 1fr 1fr; }
  .dz-acts .dz-act:only-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: no-preference) {
  .dz-act, .dz-kpi { transition: border-color .15s ease, box-shadow .15s ease; }
  .dz-act:hover { box-shadow: 0 6px 18px rgba(13, 107, 76, .08); }
}

/* ===== v1.28 — students roster (design A: green / deep / gold / cream) ===== */
.sl { --sl-green: #0d6b4c; --sl-deep: #08402e; --sl-gold: #c9a227; --sl-cream: #fffaf0; max-width: 1180px; margin: 0 auto; position: relative; }
.sl-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .6rem; }
.sl-title h2 { margin: 0; font-size: 1.2rem; font-weight: 800; color: var(--sl-deep); }
.sl-title small { font-size: .85rem; font-weight: 700; color: var(--muted); }
.sl-reset { font-size: .82rem; font-weight: 700; }
.sl-acts { display: flex; align-items: center; gap: .4rem; }
.sl-add { display: inline-flex; align-items: center; gap: .35rem; min-height: 42px; padding: 0 .95rem; border-radius: 12px; background: var(--sl-green); color: #fff; font-weight: 800; font-size: .92rem; text-decoration: none; }
.sl-add:hover { background: var(--sl-deep); color: #fff; text-decoration: none; }
.sl details > summary { list-style: none; cursor: pointer; }
.sl details > summary::-webkit-details-marker { display: none; }
.sl-over, .sl-more { position: relative; }
.sl-over > summary, .sl-more > summary { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--muted); }
.sl-over > summary { background: #fff; border: 1px solid var(--border); }
.sl-over > summary:hover, .sl-more > summary:hover, .sl-more[open] > summary { background: #f1f5f2; color: var(--sl-deep); }
.sl-menu { position: absolute; z-index: 15; inset-inline-end: 0; top: calc(100% + 4px); min-width: 190px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px rgba(8, 64, 46, .16); padding: .3rem; display: grid; }
.sl-menu a { display: flex; align-items: center; gap: .55rem; min-height: 44px; padding: 0 .7rem; border-radius: 10px; color: var(--text); font-weight: 700; font-size: .92rem; text-decoration: none; }
.sl-menu a:hover { background: #f2f8f5; text-decoration: none; }
.sl-menu a .ico { color: var(--sl-green); }
.sl-bar { position: sticky; top: 64px; z-index: 12; background: var(--bg); padding: .35rem 0 .45rem; margin: 0 -.25rem .3rem; padding-inline: .25rem; display: grid; gap: .45rem; }
.sl-search { display: flex; align-items: center; gap: .4rem; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 0 .75rem; min-height: 48px; box-shadow: 0 2px 8px rgba(13, 107, 76, .05); }
.sl-search:focus-within { border-color: var(--sl-green); box-shadow: 0 0 0 3px rgba(13, 107, 76, .14); }
.sl-s-ico { color: var(--muted); display: grid; }
.sl-search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1rem; min-height: 46px; padding: 0; box-shadow: none; }
.sl-go { border: 0; background: #eef7f2; color: var(--sl-deep); font: inherit; font-weight: 800; border-radius: 10px; min-height: 36px; padding: 0 .8rem; cursor: pointer; }
.js .sl-go { display: none; }
.sl-chips { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 1px; scroll-snap-type: x proximity; }
.sl-chips::-webkit-scrollbar { display: none; }
.sl-chips a { flex: 0 0 auto; scroll-snap-align: start; display: inline-flex; align-items: center; gap: .35rem; min-height: 38px; padding: 0 .85rem; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--text); font-size: .88rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.sl-chips a b { font-size: .78rem; color: var(--muted); font-weight: 800; }
.sl-chips a:hover { border-color: #b9d8c8; text-decoration: none; }
.sl-chips a.on { background: var(--sl-deep); border-color: var(--sl-deep); color: #fff; }
.sl-chips a.on b { color: #f3dc8c; }
.sl-chips a.is-alert b { color: #b42323; }
.sl-chips a.is-alert.on { background: #b42323; border-color: #b42323; }
.sl-chips a.is-alert.on b { color: #fff; }
.sl-st a { min-height: 34px; font-size: .84rem; padding: 0 .75rem; }
.sl-note { margin: 0 0 .5rem; font-size: .85rem; color: var(--muted); }
.sl-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--border); border-radius: 18px; overflow: visible; }
.sl-row { display: flex; align-items: center; border-top: 1px solid #edf2ef; }
.sl-row:first-child { border-top: 0; }
.sl-row[hidden] { display: none; }
.sl-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: flex-start; gap: .7rem; padding: .7rem .8rem; padding-inline-end: .2rem; color: var(--text); text-decoration: none; min-height: 64px; }
.sl-main:hover { text-decoration: none; background: #fbfdfc; }
.sl-main:focus-visible { outline: 3px solid var(--sl-gold); outline-offset: -3px; border-radius: 12px; }
.sl-av { position: relative; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; }
.sl-av.sm { flex-basis: 32px; width: 32px; height: 32px; font-size: .9rem; }
.sl-av.g-m { background: #e3f0fb; color: #1b5c96; }
.sl-av.g-f { background: #fbe9ef; color: #a23a62; }
.sl-av.g-x { background: #eef2ef; color: #4d6359; }
.sl-red { position: absolute; top: -1px; inset-inline-end: -1px; width: 12px; height: 12px; border-radius: 50%; background: #d64545; border: 2px solid #fff; }
.sl-body { flex: 1 1 auto; min-width: 0; display: grid; gap: .2rem; }
.sl-name { font-weight: 800; font-size: 1rem; color: var(--sl-deep); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.sl-chip { display: inline-flex; align-items: center; padding: .05rem .5rem; border-radius: 999px; background: #f2f6f4; color: #3f5a4d; font-size: .76rem; font-weight: 700; line-height: 1.6; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-warn { display: inline-flex; align-items: center; gap: .15rem; color: #a07a12; font-size: .74rem; }
.sl-warn.is-red { color: #b42323; }
.sl-on { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .55rem; font-size: .8rem; color: var(--muted); }
.sl-today { display: inline-flex; align-items: center; gap: .25rem; font-weight: 800; }
.sl-today::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sl-today.t-done { color: #0b7a4b; }
.sl-today.t-part { color: #a06b00; }
.sl-today.t-none { color: #8a6f5a; }
.sl-today.t-off { color: #8a9a92; font-weight: 600; }
.sl-last.is-red, td.is-red { color: #b42323; font-weight: 800; }
.sl-pt { color: #3f5a4d; }
.sl-badge { display: inline-block; padding: .05rem .5rem; border-radius: 999px; background: #e6f4ee; color: #0a5a3f; font-size: .74rem; font-weight: 800; }
.sl-badge.off { background: #f1f1ef; color: #6b6b66; }
.sl-row.is-off .sl-name, .sl-table tr.is-off .sl-tname { color: #6b7a72; }
.sl-row.is-off .sl-av { filter: grayscale(1); opacity: .7; }
.sl-more { flex: 0 0 auto; margin-inline-end: .35rem; }
.sl-empty { display: grid; justify-items: center; gap: .35rem; text-align: center; padding: 2rem 1rem; background: #fff; border: 1px dashed #cfe2d7; border-radius: 18px; color: var(--muted); }
.sl-empty strong { color: var(--sl-deep); }
.sl-empty[hidden] { display: none; }
.sl-nores { margin: 0 0 .6rem; }
.sl-table-wrap { display: none; }
.sl-fab { position: fixed; z-index: 25; inset-inline-start: 1rem; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--sl-green); color: #fff; box-shadow: 0 8px 22px rgba(8, 64, 46, .32); }
.sl-fab:hover { background: var(--sl-deep); color: #fff; }
.sl-fab:focus-visible, .sl-add:focus-visible, .sl-chips a:focus-visible, .sl details > summary:focus-visible { outline: 3px solid var(--sl-gold); outline-offset: 2px; }
@media (max-width: 992px) {
  .sl-add { display: none; }
  .sl-list { margin-bottom: 5.5rem; }
}
@media (min-width: 993px) {
  .sl-fab { display: none; }
  .sl-bar { top: 72px; grid-template-columns: minmax(260px, 360px) 1fr; align-items: center; }
  .sl-bar .sl-st { grid-column: 1 / -1; }
  .sl-list { display: none; }
  .sl-table-wrap { display: block; background: #fff; border: 1px solid var(--border); border-radius: 18px; overflow: visible; }
  .sl-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
  .sl-table th { text-align: start; font-size: .78rem; font-weight: 800; color: var(--muted); padding: .7rem .75rem; border-bottom: 1px solid var(--border); background: #fafcfb; white-space: nowrap; }
  .sl-table th:first-child { border-start-start-radius: 18px; }
  .sl-table th:last-child { border-start-end-radius: 18px; }
  .sl-table td { padding: .55rem .75rem; border-top: 1px solid #f0f3f1; vertical-align: middle; }
  .sl-table tbody tr:first-child td { border-top: 0; }
  .sl-table tbody tr:hover { background: #fbfdfc; }
  .sl-table tr[hidden] { display: none; }
  .sl-tname { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; color: var(--sl-deep); }
  .sl-mute { color: var(--muted); }
  .sl-tact { white-space: nowrap; text-align: end; }
  .sl-ib { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--muted); }
  .sl-ib:hover { background: #eef7f2; color: var(--sl-green); }
}
@media (prefers-reduced-motion: no-preference) {
  .sl-chips a, .sl-main, .sl-search { transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
}
@media (min-width: 993px) {
  .sl-bar .sl-chips:not(.sl-st) { flex-wrap: wrap; overflow: visible; }
  .sl-tn { display: grid; line-height: 1.35; }
  .sl-tn small { font-size: .74rem; color: var(--muted); font-weight: 600; text-align: start; }
  .sl-table-wrap { overflow-x: auto; }
  .sl-table .sl-today, .sl-table .sl-badge, .sl-tn small { white-space: nowrap; }
  .sl-table td:nth-child(3) { min-width: 7.5rem; }
}

/* ===== v1.29 — student profile (design A) ===== */
.sp { --sp-green: #0d6b4c; --sp-deep: #08402e; --sp-gold: #c9a227; --sp-cream: #fffaf0; display: grid; gap: .85rem; margin-bottom: 1rem; }
.sp-hero { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "av id" "acts acts"; gap: .7rem .85rem; align-items: center; background: linear-gradient(160deg, var(--sp-cream), #f6efdc); border: 1px solid #e7ddc6; border-radius: 22px; padding: 1rem; }
.sp-av { grid-area: av; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; font-weight: 800; box-shadow: 0 0 0 4px #fff; }
.sp-av.g-m { background: #e3f0fb; color: #1b5c96; }
.sp-av.g-f { background: #fbe9ef; color: #a23a62; }
.sp-av.g-x { background: #eef2ef; color: #4d6359; }
.sp-id { grid-area: id; min-width: 0; }
.sp-id h2 { margin: 0 0 .3rem; font-size: 1.35rem; font-weight: 800; color: var(--sp-deep); line-height: 1.3; overflow-wrap: anywhere; }
.sp-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.sp-chip { padding: .1rem .6rem; border-radius: 999px; background: #fff; border: 1px solid #eadfc4; font-size: .8rem; font-weight: 700; color: #3f5a4d; }
.sp-st { padding: .1rem .6rem; border-radius: 999px; background: #f1f1ef; color: #6b6b66; font-size: .8rem; font-weight: 800; }
.sp-st.on { background: #e3f3ea; color: #0a5a3f; }
.sp-acts { grid-area: acts; display: flex; gap: .5rem; align-items: center; }
.sp-wa { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 48px; padding: 0 1.1rem; border-radius: 14px; background: #1f9d55; color: #fff; font-weight: 800; text-decoration: none; box-shadow: 0 4px 0 #157a40; }
.sp-wa:hover { background: #188a49; color: #fff; text-decoration: none; }
.sp details > summary { list-style: none; cursor: pointer; }
.sp details > summary::-webkit-details-marker { display: none; }
.sp-over { position: relative; flex: 0 0 auto; }
.sp-over > summary { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #fff; border: 1px solid #e7ddc6; color: var(--sp-deep); }
.sp-menu { position: absolute; z-index: 15; inset-inline-end: 0; top: calc(100% + 6px); min-width: 220px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px rgba(8, 64, 46, .16); padding: .3rem; display: grid; }
.sp-menu a { display: flex; align-items: center; gap: .55rem; min-height: 46px; padding: 0 .75rem; border-radius: 10px; color: var(--text); font-weight: 700; text-decoration: none; }
.sp-menu a:hover { background: #f2f8f5; text-decoration: none; }
.sp-menu a .ico { color: var(--sp-green); }
.sp-grid { display: grid; gap: .85rem; }
.sp-main, .sp-side { display: grid; gap: .85rem; align-content: start; min-width: 0; }
.sp-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: .9rem 1rem; min-width: 0; }
.sp-card-h { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.sp-card-h h3 { margin: 0; font-size: 1.02rem; font-weight: 800; color: var(--sp-deep); }
.sp-card-h a { font-size: .85rem; font-weight: 800; }
.sp-count { min-width: 1.8rem; text-align: center; padding: .05rem .5rem; border-radius: 999px; background: #f2f6f4; font-weight: 800; font-size: .85rem; color: #3f5a4d; }
.sp-count.warn { background: #fff4dc; color: #8a5a00; }
.sp-empty { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.7; background: #fafcfb; border: 1px dashed #d7e6dd; border-radius: 12px; padding: .7rem .8rem; }
.sp-mute { color: var(--muted); font-size: .82rem; margin: .4rem 0 0; }
.sp-today { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.sp-stat { display: grid; gap: .05rem; background: #fafcfb; border: 1px solid #edf2ef; border-radius: 14px; padding: .55rem .6rem; min-width: 0; }
.sp-k { font-size: .76rem; font-weight: 700; color: var(--muted); }
.sp-stat strong { font-size: 1.25rem; font-weight: 800; color: var(--sp-deep); line-height: 1.35; }
.sp-stat strong.ok { color: #0b7a4b; }
.sp-stat strong.mid { color: #a06b00; }
.sp-stat strong.sp-sm { font-size: .95rem; }
.sp-stat small { font-size: .74rem; color: var(--muted); }
.sp-week { list-style: none; margin: .7rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: .25rem; text-align: center; }
.sp-week li { display: grid; justify-items: center; gap: .15rem; }
.sp-week small { font-size: .7rem; color: var(--muted); }
.sp-dot { width: 22px; height: 22px; border-radius: 50%; background: #eef2ef; border: 2px solid #e2e9e5; }
.sp-week .w-done .sp-dot { background: var(--sp-green); border-color: var(--sp-green); }
.sp-week .w-partial .sp-dot { background: linear-gradient(90deg, var(--sp-gold) 50%, #fff4dc 50%); border-color: var(--sp-gold); }
.sp-week .w-missed .sp-dot { background: #fdecec; border-color: #e7a3a3; }
.sp-week .w-pending .sp-dot { background: #fff; border-color: var(--sp-gold); border-style: dashed; }
.sp-week .w-off .sp-dot { background: transparent; border-style: dotted; }
.sp-week .w-future .sp-dot { background: #fff; }
.sp-week .is-today small { color: var(--sp-deep); font-weight: 800; }
.sp-tasks { list-style: none; margin: .7rem 0 0; padding: 0; }
.sp-tasks li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .5rem; padding: .45rem 0; border-top: 1px solid #f0f3f1; font-size: .9rem; }
.sp-tasks li > span:first-child { font-weight: 800; }
.sp-tasks small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-point { display: flex; gap: .7rem; align-items: center; background: #f2faf6; border-radius: 14px; padding: .65rem .75rem; }
.sp-pt-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #fff; color: var(--sp-green); flex: 0 0 42px; }
.sp-point div { display: grid; min-width: 0; }
.sp-point strong { font-size: 1.1rem; color: var(--sp-deep); }
.sp-point small { color: var(--muted); font-size: .78rem; }
.sp-ms { margin: .75rem 0 .2rem; }
.sp-ms-top { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; font-size: .86rem; font-weight: 700; color: var(--sp-deep); }
.sp-ms-top small { color: var(--muted); font-weight: 600; }
.sp-bar { display: block; height: 10px; border-radius: 999px; background: #eef2ef; overflow: hidden; margin-top: .35rem; }
.sp-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sp-gold), var(--sp-green)); }
.sp-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; margin-top: .7rem; }
.sp-nums > * { display: grid; justify-items: center; padding: .45rem; border-radius: 12px; background: #fafcfb; border: 1px solid #edf2ef; color: var(--text); text-decoration: none; }
.sp-nums strong { font-size: 1.2rem; color: var(--sp-deep); }
.sp-nums span { font-size: .76rem; color: var(--muted); }
.sp-badges { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .6rem; }
.sp-badges span { padding: .15rem .6rem; border-radius: 999px; background: #fff8e1; border: 1px solid #f1e2b0; font-size: .78rem; font-weight: 700; color: #6d5310; }
.sp-recs { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.sp-recs li { display: grid; gap: .35rem; padding-top: .55rem; border-top: 1px solid #f0f3f1; }
.sp-recs li:first-child { border-top: 0; padding-top: 0; }
.sp-rec-h { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; }
.sp-rec-h small { color: var(--muted); font-size: .8rem; }
.sp-recs audio { width: 100%; height: 40px; }
.sp-words { display: flex; flex-wrap: wrap; gap: .35rem; }
.sp-words span { font-family: "Amiri Quran", "Scheherazade New", var(--font); font-size: 1.15rem; padding: .15rem .7rem; border-radius: 12px; background: #fff4dc; color: #6d4a00; }
.sp-info > summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 44px; font-weight: 800; color: var(--sp-deep); }
.sp-info > summary > span:first-child { display: inline-flex; align-items: center; gap: .45rem; }
.sp-info > summary::after { content: "▾"; color: var(--muted); }
.sp-info[open] > summary::after { content: "▴"; }
.sp-info-flags { display: flex; gap: .3rem; margin-inline-start: auto; }
.sp-flag { padding: .05rem .5rem; border-radius: 999px; background: #fff4dc; color: #8a5a00; font-size: .74rem; font-weight: 800; }
.sp-flag.red { background: #fdecec; color: #b42323; }
.sp-dl { margin: .5rem 0 0; display: grid; gap: 0; }
.sp-dl > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: .5rem; padding: .45rem 0; border-top: 1px solid #f0f3f1; font-size: .9rem; }
.sp-dl dt { color: var(--muted); font-weight: 700; }
.sp-dl dd { margin: 0; overflow-wrap: anywhere; }
.sp-dl a[href^="tel:"] { font-weight: 800; }
.sp-info-more { margin-top: .6rem; }
.sp-info-more .two-col { display: grid; gap: .6rem; }
.sp-info-more .panel { margin: 0 0 .6rem; box-shadow: none; }
.sp-wa:focus-visible, .sp details > summary:focus-visible, .sp-menu a:focus-visible { outline: 3px solid var(--sp-gold); outline-offset: 2px; }
@media (min-width: 993px) {
  .sp-hero { grid-template-columns: auto 1fr auto; grid-template-areas: "av id acts"; padding: 1.1rem 1.3rem; }
  .sp-av { width: 76px; height: 76px; font-size: 2rem; }
  .sp-id h2 { font-size: 1.6rem; }
  .sp-wa { flex: 0 0 auto; }
  .sp-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
}
@media (prefers-reduced-motion: no-preference) {
  .sp-bar > span { transition: width .6s ease; }
}

/* ===== v1.30 — «المزيد»: search + الأكثر استعمالاً + collapsible list sections ===== */
.ms-search { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: .5rem; margin: .25rem -1rem .5rem; padding: .6rem 1rem; background: var(--bg); }
.ms-search-ico { position: absolute; inset-inline-start: 1.75rem; color: var(--muted); display: grid; pointer-events: none; }
.ms-search input { flex: 1 1 auto; min-width: 0; height: 46px; border-radius: 14px; border: 1px solid var(--border); background: #fff; padding-inline: 2.6rem .9rem; font: inherit; font-size: 1rem; color: var(--text); }
.ms-search input:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.ms-go { height: 46px; padding: 0 1rem; border-radius: 14px; border: 0; background: var(--primary); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.js .ms-go { display: none; }
.ms-none, .ms-qinfo { margin: .5rem .25rem; color: var(--muted); font-size: .9rem; }
.ms-none { padding: 1rem; text-align: center; background: #fff; border: 1px dashed var(--border); border-radius: 14px; }
.ms-top h3 { margin: .5rem .25rem .5rem; font-size: .8rem; color: var(--muted); font-weight: 800; }
.ms-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
.ms-q { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .55rem .25rem .5rem; border-radius: 14px; background: #fff; border: 1px solid var(--border); color: var(--text); font-size: .78rem; font-weight: 700; line-height: 1.25; text-align: center; text-decoration: none; min-height: 72px; }
.ms-q:hover { text-decoration: none; border-color: var(--primary); }
.ms-q.active { border-color: var(--primary); background: var(--primary-soft); }
.ms-q .ms-ico { position: relative; width: 36px; height: 36px; border-radius: 11px; }
.ms-q .dot-count { position: absolute; top: -6px; inset-inline-end: -10px; }
.ms-ql { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ms-sec { margin-top: .6rem; background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.ms-sec > summary { list-style: none; display: flex; align-items: center; gap: .5rem; min-height: 50px; padding: .4rem .9rem; cursor: pointer; font-weight: 800; font-size: .95rem; }
.ms-sec > summary::-webkit-details-marker { display: none; }
.ms-sec > summary:focus-visible, .ms-row:focus-visible, .ms-q:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.ms-sec-t { flex: 1 1 auto; }
.ms-sec-n { min-width: 24px; height: 22px; padding: 0 .45rem; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: .75rem; font-weight: 700; display: grid; place-items: center; }
.ms-sec .badge-count { margin: 0; }
.ms-chev { width: 9px; height: 9px; flex: 0 0 auto; border-inline-start: 2px solid #9aaba2; border-bottom: 2px solid #9aaba2; transform: rotate(-45deg); margin-inline: .2rem .1rem; }
.ms-sec > summary .ms-chev { transform: rotate(45deg); margin-top: -4px; }
.ms-sec[open] > summary .ms-chev { transform: rotate(225deg); margin-top: 4px; }
.ms-sec[open] > summary { border-bottom: 1px solid var(--border); }
.ms-list { list-style: none; margin: 0; padding: 0; }
.ms-list li + li { border-top: 1px solid #eef3f0; }
.ms-row { display: flex; align-items: center; gap: .7rem; min-height: 50px; padding: .35rem .9rem; color: var(--text); font-weight: 600; font-size: .93rem; text-decoration: none; }
.ms-row:hover { text-decoration: none; background: #f7faf8; }
.ms-row.active { background: var(--primary-soft); color: var(--primary-dark); }
.ms-row .ms-ico { width: 32px; height: 32px; border-radius: 10px; flex: 0 0 auto; }
.ms-rl { flex: 1 1 auto; min-width: 0; }
.ms-row .badge-count { margin: 0; }
.ms-searching .ms-top h3 { display: none; }
.ms-page { max-width: 640px; margin: 0 auto; }
.ms-page .ms-search { margin-inline: 0; padding-inline: 0; }
.ms-page .ms-search-ico { inset-inline-start: .75rem; }
[data-more-sec][hidden], .ms-list li[hidden], .ms-q[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { .more-sheet { animation: none; } }

/* ===== v1.31 — «المتابعة» (/online): header + day switcher, slim summary, chips, compact rows, desktop table ===== */
.fl { --sl-green: #0d6b4c; --sl-deep: #08402e; --sl-gold: #c9a227; max-width: 1180px; margin: 0 auto; }
.fl-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .6rem; }
.fl-date { margin: 0; font-size: .95rem; color: var(--muted); font-weight: 600; }
.fl-date b { font-size: 1.15rem; font-weight: 800; color: var(--sl-deep); margin-inline-end: .2rem; }
.fl-date small { font-size: .8rem; }
.fl-day { display: inline-flex; align-items: center; gap: .15rem; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 2px; flex: 0 0 auto; }
.fl-day a, .fl-day span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-size: 1.35rem; font-weight: 800; color: var(--sl-green); text-decoration: none; line-height: 1; }
.fl-day span { color: #c5d1ca; }
.fl-day a:hover { background: var(--primary-soft); text-decoration: none; }
.fl-day strong { min-width: 3.2rem; text-align: center; font-size: .9rem; color: var(--sl-deep); }
.fl-sum { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: .7rem .9rem .6rem; margin-bottom: .6rem; }
.fl-sum-top { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.fl-sum-top strong { font-size: 1.15rem; font-weight: 800; color: var(--sl-deep); }
.fl-sum-top strong span { font-size: .88rem; font-weight: 700; color: var(--text); }
.fl-sum-top small { color: var(--muted); font-size: .8rem; }
.fl-bar { height: 8px; border-radius: 999px; background: #edf2ef; overflow: hidden; margin: .45rem 0 .5rem; }
.fl-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sl-green), #2f9a6f); }
.fl-mini { display: flex; flex-wrap: wrap; gap: .25rem .9rem; margin: 0; font-size: .82rem; color: var(--muted); }
.fl-mini a { color: var(--muted); text-decoration: none; }
.fl-mini a:hover { color: var(--sl-deep); text-decoration: underline; }
.fl-mini b { font-weight: 800; color: var(--text); }
.fl-mini b.c-none { color: #b42318; } .fl-mini b.c-part { color: #b54708; } .fl-mini b.c-wait { color: #175cd3; }
.fl-bar-chips { display: grid; gap: .45rem; margin-bottom: .6rem; }
.sl-chips a.is-alert:not(.on) b { color: #b42318; }
.fl-bulk { margin-bottom: .6rem; background: #fffaf0; border: 1px solid #f0e2b6; border-radius: 14px; }
.fl-bulk > summary { list-style: none; display: flex; align-items: center; gap: .45rem; min-height: 44px; padding: .3rem .9rem; cursor: pointer; font-weight: 800; color: #7a5f0c; font-size: .9rem; }
.fl-bulk > summary::-webkit-details-marker { display: none; }
.fl-bulk form { padding: 0 .9rem .8rem; }
.fl-bulk p { margin: 0 0 .6rem; font-size: .86rem; line-height: 1.7; color: var(--text); }
.fl-alldone { display: flex; align-items: center; gap: .7rem; margin-bottom: .6rem; padding: .75rem .9rem; border-radius: 16px; background: linear-gradient(135deg, #eaf6ef, #fdf8e8); border: 1px solid #cfe7da; }
.fl-alldone > span { font-size: 1.6rem; }
.fl-alldone strong { display: block; color: var(--sl-deep); }
.fl-alldone small { color: var(--muted); }
.fl-list { list-style: none; margin: 0 0 1rem; padding: 0; background: #fff; border: 1px solid var(--border); border-radius: 18px; }
.fl-row { display: flex; align-items: center; gap: .3rem; padding: .55rem .6rem .55rem .4rem; }
.fl-row + .fl-row { border-top: 1px solid #eef3f0; }
.fl-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: flex-start; gap: .65rem; color: var(--text); text-decoration: none; }
.fl-main:hover { text-decoration: none; }
.fl-main .sl-av { flex-basis: 40px; width: 40px; height: 40px; font-size: 1rem; }
.fl-body { min-width: 0; display: grid; gap: .2rem; }
.fl-name { font-weight: 800; font-size: .97rem; color: var(--sl-deep); line-height: 1.35; }
.fl-k { display: inline-block; padding: 0 .45rem; border-radius: 999px; font-size: .72rem; font-weight: 800; line-height: 1.7; vertical-align: 1px; white-space: nowrap; }
.fl-k.k-none { background: #fdecea; color: #b42318; }
.fl-k.k-partial { background: #fff4e5; color: #9a4a06; }
.fl-k.k-done { background: #e7f6ee; color: #05603a; }
.fl-k.k-off { background: #f2f4f3; color: #5d6b63; }
.fl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; font-size: .78rem; color: var(--muted); }
.fl-rem { font-size: .74rem; color: #7a5f0c; white-space: nowrap; }
.fl-quiet { font-size: .74rem; font-weight: 800; color: #b42318; white-space: nowrap; }
.fl-note { margin: 0 .2rem .6rem; font-size: .84rem; color: var(--muted); }
.fl-pills { display: flex; flex-wrap: wrap; gap: .25rem; }
.fl-pill { display: inline-flex; align-items: center; gap: .2rem; padding: .05rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 700; line-height: 1.7; border: 1px solid transparent; white-space: nowrap; }
.fl-pill i { font-style: normal; font-size: .72rem; }
.fl-pill.p-ok { background: #e7f6ee; color: #05603a; border-color: #bfe5cf; }
.fl-pill.p-wait { background: #eef4ff; color: #1849a9; border-color: #c9dafc; }
.fl-pill.p-none { background: #fff; color: #5d6b63; border-color: #d5ded9; border-style: dashed; }
.fl-pill.p-miss, .fl-pill.p-redo { background: #fdecea; color: #b42318; border-color: #f5c6c1; }
.fl-pill.p-off { background: #f2f4f3; color: #5d6b63; }
.fl-pill.is-opt { opacity: .75; }
.fl-acts { display: flex; align-items: center; gap: .25rem; flex: 0 0 auto; }
.fl-acts form { margin: 0; }
.fl-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: #fff; color: var(--sl-green); cursor: pointer; text-decoration: none; padding: 0; }
.fl-btn:hover { background: var(--primary-soft); text-decoration: none; }
.fl-btn.wa { background: #e8f8ee; border-color: #bfe8cd; color: #128c4a; }
.fl-btn:focus-visible, .fl-day a:focus-visible, .fl-main:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.fl-table-wrap { display: none; }
.fl-words { margin-top: 1rem; }
.fl-words > summary { list-style: none; cursor: pointer; }
.fl-words > summary::-webkit-details-marker { display: none; }
.fl-foot { margin: .8rem .2rem 5.5rem; font-size: .8rem; color: var(--muted); }
@media (min-width: 993px) {
  .fl-head { margin-bottom: .8rem; }
  .fl-bar-chips { grid-template-columns: auto 1fr; align-items: center; gap: .6rem; }
  .fl-list { display: none; }
  .fl-table-wrap { display: block; background: #fff; border: 1px solid var(--border); border-radius: 18px; overflow-x: auto; margin-bottom: 1rem; }
  .fl-table td.fl-acts { display: table-cell; white-space: nowrap; }
  .fl-table td.fl-acts > * { display: inline-grid; vertical-align: middle; margin-inline-start: .2rem; }
  .fl-table .fl-btn { width: 36px; height: 36px; }
  .fl-nowrap { white-space: nowrap; }
  .fl-foot { margin-bottom: 1rem; }
}
@media (prefers-reduced-motion: no-preference) { .fl-bar i { transition: width .4s ease; } }

/* ===== v1.32 — motivation without competition ===== */
.rhythm-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .7rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 800; font-size: .85rem; border: 1px solid #bfe3d1; }
.rhythm-chip.is-reached { background: var(--gold-soft); color: var(--gold-text); border-color: #ecd58a; }
.rhythm-hint { display: block; }
.wk-madeup .wk-dot { background: var(--primary); box-shadow: inset 0 0 0 3px #c7b8ff; }
.wk-strip.is-perfect .wk-madeup .wk-dot { background: var(--gold); }
.sp-week .w-madeup .sp-dot { background: var(--sp-green); border-color: #a78bfa; }
.pw-day.s-madeup { background: #f5f3ff; }
.pc-mytime { display: inline-flex; align-items: center; gap: .25rem; margin-top: .3rem; padding: .2rem .65rem; border-radius: 999px; background: #f4f1ea; color: #6b4f1d; font-size: .82rem; font-weight: 700; text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-mytime.is-empty { background: #fff; border: 1px dashed #d6c49a; }
.pc-mk { color: #6d28d9; font-weight: 700; }
.pc-hadith { margin: .3rem 0 .6rem; padding: .55rem .75rem; border-radius: 12px; background: #fbf8f1; border-inline-start: 4px solid var(--accent); font-size: .88rem; line-height: 1.8; color: #5b4a24; }
.pc-makeup { display: grid; gap: .35rem; margin: .2rem 0 .5rem; padding: .65rem .8rem; border-radius: 14px; background: #f5f3ff; border: 1px solid #ddd6fe; }
.pc-makeup small { color: var(--muted); }
.pc-makeup-b { display: flex; flex-wrap: wrap; gap: .4rem; }
.pc-makeup-b form { margin: 0; }
.pc-makeup-b .btn { min-height: 40px; }
.self-cmp { display: grid; gap: .25rem; margin: .2rem 0 .5rem; padding: .65rem .8rem; border-radius: 14px; background: #f0f9ff; border: 1px solid #cfe8f7; }
.self-cmp.tone-same { background: #f3f7f4; border-color: #dbe5df; }
.self-cmp.tone-soft { background: #fffbeb; border-color: #f5e3a8; }
.self-cmp > small { color: var(--muted); line-height: 1.6; }
.self-cmp-l { list-style: none; margin: .2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: .35rem; }
.self-cmp-l li { display: grid; gap: .05rem; padding: .35rem .5rem; border-radius: 10px; background: #fff; font-size: .8rem; }
.self-cmp-l li b { font-size: 1.15rem; color: var(--text); }
.self-cmp-l li.up b { color: #0b7a4b; }
.self-cmp-l li.up b::after { content: " ▲"; font-size: .7rem; }
.self-cmp-l li small { color: var(--muted); font-size: .72rem; }
.qg-qc-k { flex: 0 0 auto; align-self: center; font-size: .78rem; font-weight: 800; color: var(--muted); padding-inline-end: .2rem; }
.qg-praise { flex-wrap: nowrap; margin-bottom: .3rem; }
.qg-qc-b.is-praise { border-color: #e7c873; background: #fffaf0; color: #7a5a12; }
.qg-tip { display: block; color: var(--muted); font-size: .78rem; margin: .1rem 0 .3rem; line-height: 1.6; }
.mt-form { display: grid; gap: .8rem; }
.mt-q { border: 1px solid var(--border); border-radius: 14px; padding: .6rem .8rem .8rem; margin: 0; min-width: 0; }
.mt-q legend { font-weight: 800; padding: 0 .3rem; color: var(--primary-dark); }
.mt-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.mt-chip { position: relative; }
.mt-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.mt-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: .2rem .8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: .9rem; }
.mt-chip input:checked + span { background: var(--primary); color: #fff; border-color: var(--primary); }
.mt-chip input:focus-visible + span { outline: 3px solid rgba(13,107,76,.35); outline-offset: 2px; }
.mt-other { display: flex; align-items: center; gap: .4rem; margin-top: .5rem; font-size: .88rem; color: var(--muted); }
.mt-other input { flex: 1; min-width: 0; }
.mt-why { line-height: 1.9; margin-top: 0; }
.mt-card { margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 16px; background: linear-gradient(135deg, #fbf6e9, #f1e6c8); border: 1px solid #e3d3a5; text-align: center; }
.mt-card p { font-size: 1.15rem; font-weight: 800; margin: .3rem 0; color: #4a3a12; line-height: 1.8; }
.mt-card-k { font-size: .78rem; font-weight: 800; color: #8a6d2a; }
.sp-mytime { margin: 0 0 .4rem; font-size: .92rem; }
.sp-mt-edit summary { cursor: pointer; color: var(--primary); font-weight: 700; font-size: .88rem; margin-bottom: .5rem; }
.hb-intro { margin-top: 0; color: var(--muted); line-height: 1.8; }
.hb-count { font-weight: 700; display: flex; align-items: center; gap: .3rem; }
.hb-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; }
.hb-item { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem .8rem; border-radius: 14px; border: 1px solid #ecd58a; background: linear-gradient(135deg, #fffdf6, #fbf3dc); }
.hb-star { font-size: 1.4rem; line-height: 1; }
.hb-body { display: grid; gap: .15rem; min-width: 0; }
.hb-body small { color: var(--muted); }
.hb-why { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .2rem; }
.hb-chip { padding: .15rem .55rem; border-radius: 999px; background: #fff; border: 1px solid #ead9a4; font-size: .78rem; font-weight: 700; color: #6b5314; }
.hb-crit { margin-top: 1rem; font-size: .88rem; }
.hb-crit summary { cursor: pointer; color: var(--primary); font-weight: 700; }

/* ===== v1.33 — «اللوح المزيّن» + «سمّع لأهلك» ===== */
.lw-pop { display: flex; align-items: center; gap: .7rem; margin: 0 0 .6rem; padding: .6rem .8rem; border-radius: 16px; background: linear-gradient(135deg, #fbf3dc, #f3e2b5); border: 1px solid #e3cf8f; color: #4a2f0e; text-decoration: none; }
.lw-pop:hover { text-decoration: none; border-color: var(--gold); }
.lw-pop span { display: grid; gap: .1rem; min-width: 0; }
.lw-pop small { color: #6b5314; }
.lw-pop-mini { flex: 0 0 64px; width: 64px; height: 80px; display: block !important; }
.lw-shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.lw-tile { display: grid; gap: .2rem; justify-items: center; padding: .5rem; border-radius: 14px; border: 1px solid var(--border); background: #fffdf6; color: var(--text); text-decoration: none; text-align: center; }
.lw-tile:hover { text-decoration: none; border-color: var(--gold); }
.lw-tile.is-new { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.lw-tile small { color: var(--muted); }
.lw-mini { width: 100%; aspect-ratio: 4 / 5; display: block; }
.lw-page { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .lw-page { grid-template-columns: minmax(0, 460px) minmax(0, 1fr); } }
.lw-board { width: 100%; max-width: 460px; margin: 0 auto; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; box-shadow: 0 8px 24px rgba(74, 47, 14, .18); background: #f6efe0; }
.lw-board svg { display: block; }
.lw-side { min-width: 0; }
.lw-h { margin: 0 0 .4rem; font-size: 1.25rem; color: #4a2f0e; }
.lw-acts { display: flex; flex-wrap: wrap; gap: .5rem; }
.lw-acts .btn { min-height: 46px; }
.lw-msg { min-height: 1.2em; }
.lw-ideas { margin-top: .6rem; padding: .8rem 1rem; border-radius: 16px; background: var(--primary-soft); }
.lw-ideas h3 { margin: 0 0 .4rem; font-size: 1rem; }
.lw-ideas ul { margin: 0 0 .6rem; padding-inline-start: 1.2rem; line-height: 1.9; }
.lw-note { font-size: .78rem; }
.fl-line { display: grid; gap: .15rem; margin: .2rem 0 .5rem; padding: .6rem .8rem; border-radius: 14px; background: #f0f9ff; border: 1px solid #cfe8f7; color: var(--text); text-decoration: none; }
.fl-line:hover { text-decoration: none; border-color: #8cc8ea; }
.fl-line.is-done { background: #f0fdf4; border-color: #bbf7d0; }
.fl-line small { color: var(--muted); }
.fl-why { line-height: 1.9; margin-top: 0; }
.fl-done, .fl-link { display: grid; gap: .35rem; padding: .8rem 1rem; border-radius: 16px; background: #f0fdf4; border: 1px solid #bbf7d0; margin-bottom: 1rem; }
.fl-link { background: #f0f9ff; border-color: #cfe8f7; }
.fl-done small, .fl-link small { color: var(--muted); }
.fl-url { display: block; padding: .55rem .7rem; border-radius: 10px; background: #fff; border: 1px solid var(--border); font-size: .82rem; word-break: break-all; text-align: left; }
.fl-acts { display: flex; flex-wrap: wrap; gap: .5rem; }
.fl-acts .btn { min-height: 44px; }
.fl-dua { margin: .2rem 0; color: #0b5d3f; font-weight: 700; }
.fl-form { display: grid; gap: .8rem; }
.fl-range { margin: 0; }
.fl-hh { font-size: 1rem; margin: 1.2rem 0 .4rem; }
.fl-hist { margin: 0; padding-inline-start: 1.1rem; line-height: 1.9; }
.fl-guest { max-width: 640px; margin: 0 auto; padding: 1rem .8rem 2rem; display: grid; gap: .8rem; }
.fl-g-head { display: flex; align-items: center; gap: .6rem; }
.fl-g-head b { display: block; font-size: 1.2rem; color: var(--primary-dark); }
.fl-g-head small { color: var(--muted); }
.fl-g-ico { font-size: 2rem; }
.fl-g-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 1rem 1.1rem; line-height: 1.9; }
.fl-g-big { font-size: 1.15rem; font-weight: 800; margin: 0 0 .3rem; }
.fl-g-steps { margin: .3rem 0 0; padding-inline-start: 1.2rem; }
.fl-g-form { display: grid; gap: .5rem; }
.fl-g-form textarea { width: 100%; }
.fl-g-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.fl-g-btns .btn { min-height: 52px; font-size: 1.05rem; }
.fl-g-done { text-align: center; background: #f0fdf4; border-color: #bbf7d0; }

/* v1.34 — focused grading (quick grading + grading link): compact header, custom player, text first, sticky grading bar */
.qf-top { gap: .6rem; margin-bottom: .45rem; }
.qf-back { display: inline-flex; align-items: center; gap: .2rem; min-height: 36px; padding: 0 .7rem; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--text); font-weight: 700; font-size: .85rem; text-decoration: none; white-space: nowrap; }
.qf-prog { flex: 1 1 auto; height: 6px; border-radius: 999px; background: #e3ece6; overflow: hidden; }
.qf-prog i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.qf-top .qg-count { white-space: nowrap; font-size: .9rem; }
.qf-top .qg-count b { font-size: 1.1rem; }
.qf-filters { margin-bottom: .5rem; gap: .35rem; }
.qf-filters .chip { min-height: 34px; padding: 0 .75rem; font-size: .82rem; }
.qg-focus .panel-body { padding: .75rem .8rem .5rem; gap: 0; }
.qf { display: flex; flex-direction: column; gap: .5rem; }
.qf-kid { display: flex; align-items: center; gap: .6rem; }
.qf-av { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-weight: 900; font-size: 1.15rem; color: hsl(var(--h) 45% 28%); background: hsl(var(--h) 55% 90%); }
.qf-id { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; line-height: 1.3; }
.qf-name { font-size: 1.08rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qf-id small { color: var(--muted); font-size: .78rem; }
.qf-skip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .15rem; min-height: 36px; padding: 0 .6rem; border-radius: 999px; color: var(--muted); font-weight: 700; font-size: .82rem; text-decoration: none; border: 1px solid var(--border); }
.qf-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .45rem; }
.qf-kind { font-size: .75rem; font-weight: 800; padding: .12rem .5rem; border-radius: 999px; background: #e8f0fe; color: #1e40af; }
.qf-kind.k-small, .qf-kind.k-big { background: #f3e8ff; color: #6b21a8; }
.qf-range { font-weight: 900; font-size: 1.05rem; color: var(--primary-dark); }
.qf-hz { color: var(--muted); font-size: .76rem; }
.qf-line { font-size: .82rem; color: var(--muted); }
.qf-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.qf-chips .qg-chip { padding: .12rem .5rem; font-size: .76rem; }
.qf-prev { display: inline-flex; align-items: center; gap: .2rem; font-size: .74rem; color: var(--muted); }
.qf-dot { font-style: normal; font-weight: 700; padding: .05rem .4rem; border-radius: 999px; font-size: .72rem; }
.qg-focus .qg-note { font-size: .85rem; padding: .35rem .6rem; }
/* player */
.qf-player { display: flex; align-items: center; gap: .4rem; background: #f3f7f5; border: 1px solid #e1ebe5; border-radius: 16px; padding: .35rem .45rem; }
.qf-player audio { display: none; }
.qf-play { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; cursor: pointer; }
.qf-play .qf-i-pause, .qf-player.is-playing .qf-play .qf-i-play { display: none; }
.qf-player.is-playing .qf-play .qf-i-pause { display: inline; }
.qf-play svg { display: block; }
.qf-track { position: relative; flex: 1 1 auto; min-width: 60px; height: 40px; cursor: pointer; touch-action: none; border-radius: 8px; }
.qf-track canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.qf-track .qf-fill { position: absolute; top: 50%; inset-inline-start: 0; height: 4px; margin-top: -2px; border-radius: 4px; background: var(--primary); width: 0; }
.qf-player.has-wave .qf-fill { display: none; }
.qf-player:not(.has-wave) .qf-track::before { content: ""; position: absolute; top: 50%; inset-inline: 0; height: 4px; margin-top: -2px; border-radius: 4px; background: #d3e0d8; }
.qf-track:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.qf-time { flex: 0 0 auto; font-variant-numeric: tabular-nums; font-size: .78rem; color: var(--muted); min-width: 2.6rem; text-align: center; }
.qf-tbtn { flex: 0 0 auto; height: 40px; min-width: 40px; padding: 0 .35rem; border-radius: 12px; border: 1px solid var(--border); background: #fff; color: var(--text); font: inherit; font-weight: 800; font-size: .82rem; display: inline-flex; align-items: center; justify-content: center; gap: .1rem; cursor: pointer; }
.qf-speed { min-width: 48px; }
.qf-speed.is-fast { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
/* compact text box */
.qt-compact.qtext-box { margin: 0; }
.qt-compact .qtext-head { padding: .35rem .55rem; gap: .4rem; align-items: center; }
.qt-compact .qtext-title { font-size: .92rem; gap: .3rem; flex-wrap: wrap; align-items: center; }
.qt-tap { color: var(--muted); font-weight: 600; font-size: .74rem; }
.qt-compact .qtext-btns { display: flex; align-items: center; gap: .3rem; }
.qt-ib { height: 34px; min-width: 34px; padding: 0 .55rem; border-radius: 10px; border: 1px solid var(--border); background: #fff; font: inherit; font-size: .8rem; font-weight: 700; color: var(--text); cursor: pointer; }
.qt-info { position: relative; }
.qt-info summary { list-style: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--muted); font-size: 1rem; cursor: pointer; }
.qt-info summary::-webkit-details-marker { display: none; }
.qt-info[open] summary { border-color: var(--primary); color: var(--primary-dark); }
.qt-info-pop { position: absolute; z-index: 30; inset-inline-end: 0; top: calc(100% + 6px); width: min(280px, 78vw); padding: .6rem .7rem; border-radius: 12px; background: #1f2d26; color: #f4f8f6; font-size: .8rem; line-height: 1.6; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.qt-compact .qw-count { font-size: .74rem; }
.qt-compact .qtext { padding-top: .4rem; }
.qt-compact .qtext-src { font-size: .7rem; }
/* sticky grading bar */
.qf-bar.qg-sticky { margin: .4rem -.8rem -.5rem; border-radius: 18px 18px 0 0; padding: .5rem .6rem .55rem; display: flex; flex-direction: column; gap: .4rem; background: rgba(255,255,255,.98); border-top: 1px solid #e1ebe5; }
.qf-grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; }
.qf-grade { position: relative; margin: 0; }
.qf-grade input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.qf-grade span { display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 12px; font-weight: 800; font-size: .95rem; border: 2px solid transparent; background: #f2f5f3; color: var(--text); white-space: nowrap; transition: background .12s, color .12s; }
.qf-grade input:focus-visible + span { outline: 3px solid #93c5fd; outline-offset: 1px; }
.qf-grade.g-excellent input:checked + span { background: #1f7a4f; color: #fff; }
.qf-grade.g-good input:checked + span { background: #22687f; color: #fff; }
.qf-grade.g-acceptable input:checked + span { background: #8a5d0b; color: #fff; }
.qf-grade.g-retry span { color: #9b2c22; }
.qf-grade.g-retry input:checked + span { background: #fff; border-color: #c2410c; color: #9b2c22; }
.qf-hint { font-size: .76rem; color: #7a4a05; background: #fff7e6; border-radius: 10px; padding: .25rem .55rem; }
.qf-actions { display: flex; gap: .35rem; align-items: stretch; }
.qf-x { flex: 0 0 auto; min-height: 46px; padding: 0 .75rem; border-radius: 12px; border: 1px solid var(--border); background: #fff; font: inherit; font-size: .88rem; font-weight: 700; color: var(--primary-dark); cursor: pointer; white-space: nowrap; }
.qf-x.has { background: var(--primary-soft); border-color: var(--primary); }
.qf-send { flex: 1 1 auto; min-height: 46px; border: 0; border-radius: 12px; background: var(--primary); color: #fff; font: inherit; font-weight: 900; font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; cursor: pointer; }
.qf-send[aria-disabled="true"] { background: #b8c9bf; }
.qf-send:active { transform: scale(.98); }
.qf-picked { font-size: .8rem; color: var(--primary-dark); background: var(--primary-soft); border-radius: 10px; padding: .3rem .55rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qf-sheet { border-bottom: 1px dashed var(--border); padding-bottom: .4rem; }
.qf-sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .3rem; }
.qf-sheet-head small { color: var(--muted); font-weight: 600; }
.qf-close { min-height: 36px; padding: 0 .9rem; border-radius: 999px; border: 0; background: var(--primary); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.qf-sheet-body { max-height: min(52vh, 420px); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: .45rem; padding: .1rem .1rem .2rem; }
.qf-sheet-body .qg-qc { flex-wrap: wrap; overflow: visible; }
.qf-sheet-body .qg-qc-b { min-height: 36px; font-size: .82rem; }
.qf-help { font-size: .76rem; margin: 0; }
.qf-toast { position: fixed; z-index: 60; inset-inline: .75rem; bottom: calc(150px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem .9rem; border-radius: 14px; background: #1f2d26; color: #fff; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.qf-toast button { border: 0; background: #fff; color: #1f2d26; font: inherit; font-weight: 900; border-radius: 999px; min-height: 38px; padding: 0 1rem; cursor: pointer; }
.qf-toast[hidden] { display: none; }
.glink .qf-toast { bottom: calc(130px + env(safe-area-inset-bottom)); }
@media (min-width: 993px) {
  .qg-focus { max-width: 760px; margin-inline: auto; }
  .qf-top, .qf-filters { max-width: 760px; margin-inline: auto; }
  .qf-toast { inset-inline: auto; left: 50%; transform: translateX(-50%); width: 420px; bottom: 140px; }
  .glink .qf-toast { left: 50%; }
}
@media (prefers-reduced-motion: reduce) { .qf-grade span, .qf-send { transition: none; } .qf-send:active { transform: none; } }
.qf-grades.qf-need { animation: qfNeed .35s ease 2; border-radius: 12px; box-shadow: 0 0 0 2px #f59e0b; }
@keyframes qfNeed { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .qf-grades.qf-need { animation: none; } }
.qf.is-sending .qf-bar { pointer-events: none; }
.qf.is-sending .qf-bar > * { opacity: .45; }
.qf.is-sending .qf-toast { pointer-events: auto; opacity: 1; }
.qf-bar.qg-sticky.qf-fixed { position: fixed; z-index: 45; margin: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 24px rgba(13,107,76,.14); }
@media (min-width: 993px) { .qf-bar.qg-sticky.qf-fixed { border-radius: 18px 18px 0 0; } }
.qf-toast { inset-inline: .75rem; }
@media (min-width: 993px) { .qf-toast { inset-inline: auto; } }
.qf-top .qg-bar.qf-prog { margin: 0; }
.qf-top .help { white-space: nowrap; margin: 0; font-size: .85rem; }
.glink .qg-focus .panel-body { padding-bottom: .5rem; }

/* v1.35 — التسميع المنزلي list in the v1.34 style */
/* no JS: native controls only (every layout sets html.js before paint) */
html:not(.js) .qf-player > :not(audio) { display: none; }
html:not(.js) .qf-player audio { display: block; width: 100%; }
html:not(.js) .qf-player { background: none; border: 0; padding: 0; }
.rq-top { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .6rem; }
.rq-cta { display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; border-radius: 16px; background: linear-gradient(135deg, #0d6b4c, #11805c); color: #fff; text-decoration: none; box-shadow: 0 6px 18px rgba(13,107,76,.22); }
.rq-cta:hover { text-decoration: none; filter: brightness(1.05); }
.rq-cta:active { transform: scale(.99); }
.rq-cta > span:nth-child(2) { flex: 1 1 auto; display: flex; flex-direction: column; line-height: 1.35; }
.rq-cta b { font-size: 1.05rem; }
.rq-cta small { opacity: .9; font-size: .8rem; }
.rq-cta-i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.18); font-size: 1.2rem; }
.rq-tabs { display: flex; gap: .25rem; padding: .25rem; background: #eef3f0; border-radius: 14px; overflow-x: auto; scrollbar-width: none; }
.rq-tabs::-webkit-scrollbar { display: none; }
.rq-tab { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-height: 40px; padding: 0 .5rem; border-radius: 11px; color: var(--muted); font-weight: 800; font-size: .85rem; text-decoration: none; white-space: nowrap; }
.rq-tab:hover { text-decoration: none; color: var(--primary-dark); }
.rq-tab.is-on { background: #fff; color: var(--primary-dark); box-shadow: 0 1px 3px rgba(16,60,40,.15); }
.rq-tab .chip-n { font-size: .72rem; background: rgba(13,107,76,.1); border-radius: 999px; padding: 0 .4rem; }
.rq-filters { display: flex; flex-direction: column; gap: .3rem; }
.rq-filters .qf-filters { margin: 0; }
.rq-av-s { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 7px; font-size: .7rem; font-weight: 900; color: hsl(var(--h) 45% 28%); background: hsl(var(--h) 55% 90%); }
.chip.active .rq-av-s { background: rgba(255,255,255,.25); color: #fff; }
.rq-list { display: flex; flex-direction: column; gap: .6rem; }
.rq-card.panel { margin: 0; padding: .7rem .75rem; display: flex; flex-direction: column; gap: .45rem; overflow: visible; scroll-margin-top: 80px; }
.rq-card:target { box-shadow: 0 0 0 2px var(--primary); }
.rq-card .qg-note { font-size: .84rem; padding: .3rem .55rem; }
.rq-more { border: 1px solid #e3ebe6; border-radius: 12px; background: #fbfdfc; }
.rq-more > summary { list-style: none; cursor: pointer; padding: .45rem .7rem; font-size: .84rem; font-weight: 700; color: var(--primary-dark); display: flex; align-items: center; gap: .3rem; }
.rq-more > summary::-webkit-details-marker { display: none; }
.rq-more > summary::after { content: "▾"; margin-inline-start: auto; color: var(--muted); }
.rq-more[open] > summary::after { content: "▴"; }
.rq-more-body { display: flex; flex-direction: column; gap: .45rem; padding: 0 .6rem .6rem; }
.rq-more-body .qg-qc { flex-wrap: wrap; overflow: visible; }
.rq-more-body .qg-qc-b { min-height: 34px; font-size: .8rem; }
.rq-nums { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.rq-nums label { display: flex; flex-direction: column; gap: .15rem; font-size: .78rem; font-weight: 700; color: var(--muted); }
.rq-nums input { min-height: 40px; }
.rq-range > summary { cursor: pointer; font-size: .8rem; font-weight: 700; color: var(--muted); padding: .2rem 0; }
.rq-range > summary small { font-weight: 500; }
.rq-links { display: flex; flex-wrap: wrap; gap: .35rem; }
.rq-grade { display: flex; flex-direction: column; gap: .35rem; }
.rq-grade .qf-grade span { min-height: 42px; font-size: .9rem; }
.rq-card .qf-send { min-height: 42px; }
.rq-card:not(.has-grade) .qf-send { background: #b8c9bf; }
html:not(.js) .rq-card .qf-send { background: var(--primary); }
.rq-card.is-sending .rq-grade, .rq-card.is-sending .rq-more { opacity: .5; pointer-events: none; }
.rq-card .qf-toast { position: fixed; }
.rq-card.is-done { gap: .35rem; }
.rq-gbadge { flex: 0 0 auto; font-size: .82rem; }
.rq-by { font-size: .8rem; color: var(--muted); }
.rq-done-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.rq-done-actions:empty { display: none; }
.rq-done-actions .qf-x { min-height: 38px; font-size: .82rem; display: inline-flex; align-items: center; text-decoration: none; }
.rq-star.on { background: #fff7e0; border-color: #e8c35a; color: #7a5a00; }
.rq-foot { text-align: center; margin-top: .6rem; font-size: .78rem; }
@media (min-width: 993px) {
  .rq-top, .rq-list, .rq-foot { max-width: 820px; margin-inline: auto; }
  .rq-top { margin-bottom: .8rem; }
  .rq-grade { flex-direction: row; align-items: stretch; }
  .rq-grade .qf-grades { flex: 1 1 auto; }
  .rq-grade .qf-send { flex: 0 0 180px; }
}

/* v1.35.2 — one player block (audio time left→right like WhatsApp): [waveform / «0:12 / 0:47» · 1×] [«5 ▶ 5»] */
.qf-player { flex-direction: row; align-items: center; gap: .45rem; padding: .35rem .45rem; }
.qf-wavebox { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0; }
.qf-track { height: 40px; min-width: 0; margin: 0; }
.qf-ctl { flex: 0 0 auto; display: flex; align-items: center; gap: .25rem; }
.qf-sk { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #d5e2da; background: #fff; color: var(--primary-dark); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.qf-sk small { font-size: .62rem; font-weight: 800; margin-top: -1px; }
.qf-sk:active, .qf-sk.flash { background: var(--primary-soft); transform: scale(.94); }
.qf-play { width: 46px; height: 46px; }
.qf-head { position: absolute; top: 3px; bottom: 3px; left: 0; width: 3px; margin-left: -1.5px; border-radius: 3px; background: #0b5a40; box-shadow: 0 0 0 2px rgba(255,255,255,.85); pointer-events: none; }
.qf-head::after { content: ""; position: absolute; top: -3px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: #0b5a40; }
.qf-track.is-drag .qf-head { width: 4px; }
.qf-player:not(.has-wave) .qf-track::before { height: 6px; margin-top: -3px; }
.qf-track .qf-fill { height: 6px; margin-top: -3px; }
.qf-sub { display: flex; align-items: center; justify-content: space-between; gap: .4rem; min-height: 22px; padding: 0 .1rem; }
.qf-sub .qf-time { min-width: 0; font-size: .76rem; font-weight: 700; color: #4a5e54; font-variant-numeric: tabular-nums; }
.qf-sub .qf-speed { min-width: 0; height: 22px; padding: 0 .5rem; border-radius: 999px; border: 1px solid #d5e2da; background: #fff; font: inherit; font-size: .7rem; font-weight: 800; color: var(--text); cursor: pointer; }
.qf-sub .qf-speed.is-fast { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
@media (prefers-reduced-motion: reduce) { .qf-sk:active, .qf-sk.flash { transform: none; } }

/* v1.35.2 — passage line: «≈ العاديات 9 – الناس 6» + «الحزب 60 · الثمن 8» small/muted, bidi-isolated */
.qf-meta { gap: .15rem .45rem; }
.qf-hz { font-size: .74rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.qf-id small .qg-chip { font-size: .68rem; padding: .05rem .4rem; vertical-align: 1px; margin-inline-start: .15rem; }

/* v1.35.2 — segmented grades (one row, light), full-width send, clearly disabled «اختر التقدير» */
.qf-grades { display: flex; gap: 0; border: 1px solid #d7e2db; border-radius: 12px; overflow: hidden; background: #fff; }
.qf-grade { flex: 1 1 0; min-width: 0; }
.qf-grade + .qf-grade { border-inline-start: 1px solid #d7e2db; }
.qf-grade span, .rq-grade .qf-grade span { min-height: 42px; border: 0; border-radius: 0; background: #fff; font-size: .88rem; font-weight: 700; color: var(--text); padding: 0 .2rem; }
.qf-grade.g-retry span { color: #9b2c22; }
.qf-gi { font-size: .78em; opacity: .7; margin-inline-end: .2rem; font-style: normal; }
.qf-grade.g-excellent input:checked + span { background: #1f7a4f; color: #fff; }
.qf-grade.g-good input:checked + span { background: #22687f; color: #fff; }
.qf-grade.g-acceptable input:checked + span { background: #8a5d0b; color: #fff; }
.qf-grade.g-retry input:checked + span { background: #fdecea; color: #9b2c22; box-shadow: inset 0 0 0 2px #c2410c; }
.qf-grade input:checked + span .qf-gi { opacity: 1; }
.qf-grade input:focus-visible + span { outline: 3px solid #93c5fd; outline-offset: -3px; }
.rq-grade { display: flex; flex-direction: column; gap: .4rem; }
.rq-card .qf-send { width: 100%; min-height: 42px; }
.qf-send[aria-disabled="true"], .rq-card:not(.has-grade) .qf-send { background: #eef2f0; color: #8a9a92; border: 1.5px dashed #c3d0c8; cursor: not-allowed; box-shadow: none; }
.qf-send[aria-disabled="true"] svg, .rq-card:not(.has-grade) .qf-send svg { opacity: .45; }
html:not(.js) .rq-card .qf-send { background: var(--primary); color: #fff; border: 0; cursor: pointer; }
@media (min-width: 993px) { .rq-grade { flex-direction: column; } .rq-grade .qf-send { flex: none; } }

/* v1.35.2 — «المزيد» row */
.rq-more > summary { padding: .4rem .65rem; min-height: 42px; color: var(--text); font-weight: 700; }
.rq-more > summary small { color: var(--muted); font-weight: 600; }
.rq-more-i { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); font-weight: 900; font-size: .9rem; flex: 0 0 auto; }
.rq-more[open] .rq-more-i { transform: rotate(45deg); }

/* v1.35.2 — tighter card */
.rq-card.panel { padding: .6rem .7rem; gap: .4rem; }
.rq-card .qf-kid { gap: .5rem; }
.rq-list { display: flex; flex-direction: column; gap: .6rem; }

/* v1.35.2 — compact header: slim CTA + «تصفية ▾» on one row, active filters as removable chips, one-line segmented tabs */
.rq-top { gap: .45rem; margin-bottom: .55rem; }
.rq-bar { display: flex; align-items: center; gap: .4rem; position: relative; }
.rq-cta2 { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: .45rem; height: 42px; padding: 0 .75rem; border-radius: 12px; background: var(--primary); color: #fff; text-decoration: none; font-size: .92rem; box-shadow: 0 3px 10px rgba(13,107,76,.18); }
.rq-cta2:hover { text-decoration: none; filter: brightness(1.05); }
.rq-cta2 b { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-cta2 .chip-n { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: rgba(255,255,255,.25); color: #fff; font-size: .8rem; font-weight: 800; opacity: 1; }
.rq-filt { flex: 0 0 auto; }
.rq-fchip { list-style: none; display: inline-flex; align-items: center; gap: .3rem; height: 42px; padding: 0 .75rem; border-radius: 12px; border: 1px solid #d5e2da; background: #fff; font-weight: 700; font-size: .88rem; cursor: pointer; color: var(--text); white-space: nowrap; }
.rq-fchip::-webkit-details-marker { display: none; }
.rq-fchip.is-on { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-soft); }
.rq-filt[open] .rq-fchip { border-color: var(--primary); }
.rq-fpanel { position: absolute; z-index: 30; inset-inline: 0; top: calc(100% + 6px); background: #fff; border: 1px solid #e1ebe5; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: .55rem .6rem .65rem; display: flex; flex-direction: column; gap: .35rem; max-height: 60vh; overflow: auto; }
.rq-fh { font-size: .74rem; color: var(--muted); font-weight: 700; }
.rq-fwrap { display: flex; flex-wrap: wrap; gap: .35rem; }
.rq-fwrap .chip { margin: 0; }
.rq-active { display: flex; flex-wrap: wrap; gap: .35rem; }
.rq-achip { display: inline-flex; align-items: center; gap: .35rem; min-height: 32px; padding: 0 .65rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); border: 1px solid var(--primary); font-size: .82rem; font-weight: 700; text-decoration: none; }
.rq-achip span { font-size: .75rem; opacity: .8; }
.rq-seg { display: flex; padding: 3px; gap: 2px; background: #eef3f0; border-radius: 12px; }
.rq-segi { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: .25rem; height: 36px; border-radius: 9px; font-size: .82rem; font-weight: 700; color: #4a5e54; text-decoration: none; white-space: nowrap; padding: 0 .2rem; }
.rq-segi:hover { text-decoration: none; }
.rq-segi .chip-n { font-size: .68rem; min-width: 1.2rem; padding: 0 .3rem; border-radius: 999px; background: rgba(13,107,76,.1); text-align: center; }
.rq-segi.is-on { background: #fff; color: var(--primary-dark); box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* v1.35.3 — player: full-width waveform on top; under it time (left) · ««5 ▶ 5»» (centre) · speed (right) */
.qf-player { flex-direction: column; align-items: stretch; gap: .2rem; padding: .4rem .5rem .35rem; }
.qf-player > .qf-track { flex: 0 0 auto; height: 44px; width: 100%; margin: 0; }
.qf-player.is-js .qf-fill, .qf-player.is-js .qf-track::before { display: none; }
.qf-player > .qf-sub { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .3rem; min-height: 46px; padding: 0; }
.qf-sub .qf-time { justify-self: start; font-size: .8rem; }
.qf-sub .qf-ctl { justify-self: center; gap: .55rem; }
.qf-sub .qf-speed { justify-self: end; height: 28px; padding: 0 .65rem; font-size: .76rem; }
.qf-sub .qf-play { width: 46px; height: 46px; }

/* v1.35.3 — tighter «أضف…» and grade rows on the list */
.rq-more > summary { min-height: 38px; padding: .3rem .6rem; }
.rq-grade .qf-grade span { min-height: 38px; }
.rq-card .qf-send { min-height: 40px; }

/* v1.35.3 — quick grading bar: row 1 grades; row 2 small «👏 مدح» «✎ ملاحظة» chips + Send taking the rest */
.qf-actions { display: flex; gap: .35rem; align-items: stretch; }
.qf-actions .qf-xs { flex: 0 0 auto; min-height: 42px; padding: 0 .55rem; font-size: .78rem; border-radius: 999px; display: inline-flex; align-items: center; gap: .25rem; }
.qf-actions .qf-send { flex: 1 1 auto; min-width: 0; min-height: 42px; }
.qf-bar .qf-grades .qf-grade span { min-height: 40px; }

/* v1.36 — moving between recordings: ‹ السابق · N من M · التالي › + queue of avatar chips with status dots */
.qn { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .5rem; }
.qn-strip { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: .4rem; }
.qn-b { display: flex; align-items: center; gap: .3rem; min-height: 44px; min-width: 0; padding: .2rem .55rem; border-radius: 12px; background: #fff; border: 1px solid #d9e4dd; color: var(--text); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.qn-b:hover { text-decoration: none; border-color: var(--primary); }
.qn-b:active { background: var(--primary-soft); }
.qn-b.is-off { visibility: hidden; }
.qn-b span { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.qn-b small { font-size: .68rem; color: var(--muted); font-weight: 700; }
.qn-b b { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qn-b svg { flex: 0 0 auto; color: var(--primary-dark); }
.qn-prev { justify-self: stretch; overflow: hidden; }
.qn-next { justify-self: stretch; overflow: hidden; text-align: end; justify-content: flex-end; }
.qn-next span { align-items: stretch; text-align: end; }
.qn-c { font-size: .85rem; color: var(--muted); white-space: nowrap; padding: 0 .2rem; }
.qn-c b { font-size: 1.05rem; color: var(--text); }
.qn-queue { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; padding: 3px 2px 4px; scroll-behavior: smooth; }
.qn-queue::-webkit-scrollbar { display: none; }
.qn-q { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; text-decoration: none; border: 2px solid transparent; }
.qn-q .qf-av { width: 34px; height: 34px; font-size: .85rem; }
.qn-q.is-cur { border-color: var(--primary); box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(13,107,76,.25); }
.qn-dot { position: absolute; bottom: 0; inset-inline-end: 0; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; background: #f59e0b; }
.qn-q.is-done .qn-dot { background: #1f7a4f; }
.qn-q.is-done .qf-av { opacity: .55; }
.qn-q.is-skip .qn-dot { background: #9aa8a0; }
.qn-q.is-skip .qf-av { opacity: .75; }
.qn-all { background: #fff; border: 1px solid #d9e4dd; }
.qn-ic { font-size: 1rem; color: var(--primary-dark); }
.qn-done { text-align: center; padding: 1.4rem .8rem; }
.qn-done-i { font-size: 2.4rem; }
.qn-done h2 { margin: .3rem 0 .2rem; font-size: 1.2rem; }
.qn-done-links { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: center; margin-top: .8rem; }
form.qg-focus { touch-action: pan-y; }
@media (min-width: 993px) { .qn { max-width: 820px; margin-inline: auto; } }
@media (prefers-reduced-motion: reduce) { .qn-queue { scroll-behavior: auto; } }
.qn-q .qf-av { border-radius: 50%; }
.qn-b span { flex: 1 1 auto; }
.qn-b b, .qn-b small { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* v1.36.1 — grading bar room: bar height + bottom nav + safe area + 12px (CSS variables set by app.js) */
.has-gradebar { padding-bottom: calc(var(--gradebar-h, 150px) + var(--bottomnav-h, 0px) + env(safe-area-inset-bottom, 0px) + 12px) !important; }
/* the passage text on the grading screens: the page scrolls, no nested scroll box */
.qt-compact .qtext, .qtext-box.qt-compact.qt-s3 .qtext, .qtext-box.qt-compact.qt-s4 .qtext { max-height: none; overflow: visible; }

/* v1.36.1 — compact navigation: one row  ☰ · ‹ · avatars · › · «1 من 2» (no wrap-around) */
.qn { margin-bottom: .45rem; gap: 0; }
.qn-row { display: flex; align-items: center; gap: .3rem; min-width: 0; }
.qn-ib { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 .3rem; border-radius: 12px; background: #fff; border: 1px solid #d9e4dd; color: var(--primary-dark); text-decoration: none; font-weight: 800; font-size: .84rem; -webkit-tap-highlight-color: transparent; }
.qn-ib:hover { text-decoration: none; border-color: var(--primary); }
.qn-ib:active { background: var(--primary-soft); }
.qn-ib.is-off { opacity: .3; pointer-events: none; }
.qn-ib.qn-all span { font-size: 1.05rem; }
.qn-tolist { padding: 0 .6rem; }
.qn-row .qn-queue { flex: 1 1 auto; min-width: 0; display: flex; align-items: flex-start; gap: .3rem; overflow-x: auto; scrollbar-width: none; padding: 3px 2px 0; }
.qn-row .qn-c { flex: 0 0 auto; font-size: .8rem; }
.qn-row .qn-c b { font-size: 1rem; }
.qn-q { flex: 0 0 auto; flex-direction: column; width: auto; min-width: 44px; height: auto; border: 0; border-radius: 12px; padding: 0 2px; gap: 1px; box-shadow: none; }
.qn-avw { position: relative; display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid transparent; }
.qn-q .qf-av { width: 34px; height: 34px; border-radius: 50%; font-size: .9rem; }
.qn-q.is-cur { border: 0; box-shadow: none; }
.qn-q.is-cur .qn-avw { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,107,76,.18); }
.qn-dot { width: 14px; height: 14px; bottom: -1px; inset-inline-end: -2px; border-width: 2.5px; }
.qn-nm { max-width: 62px; font-size: .64rem; font-weight: 800; color: var(--primary-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.qn-row .qn-queue { gap: .15rem; }
.qn-row .qn-queue { scroll-behavior: auto; padding-inline: 1px; }
.qn-nm { max-width: 56px; }

/* v1.37 — «التصحيح»: one page, «ينتظر» (one by one) / «السجل» switch; ☰ jump list of what waits */
.rc-switch { display: flex; padding: 3px; gap: 2px; background: #e6eee9; border-radius: 14px; margin-bottom: .5rem; }
.rc-sw { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: .35rem; height: 40px; border-radius: 11px; font-weight: 800; font-size: .92rem; color: #4a5e54; text-decoration: none; }
.rc-sw:hover { text-decoration: none; background: rgba(255,255,255,.5); }
.rc-sw.is-on { background: #fff; color: var(--primary-dark); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.rc-sw .chip-n { font-size: .72rem; min-width: 1.35rem; padding: 0 .35rem; border-radius: 999px; background: #f59e0b; color: #fff; text-align: center; line-height: 1.35rem; }
@media (min-width: 993px) { .qg-focus ~ .rc-switch, .rc-switch { max-width: 820px; margin-inline: auto; } }
.qn-menu { position: relative; flex: 0 0 auto; }
.qn-menu > summary { list-style: none; cursor: pointer; }
.qn-menu > summary::-webkit-details-marker { display: none; }
.qn-menu[open] > summary { background: var(--primary-dark); color: #fff; border-color: var(--primary-dark); }
.qn-mp { position: absolute; z-index: 60; top: calc(100% + 6px); inset-inline-start: 0; width: min(360px, calc(100vw - 24px)); max-height: min(70vh, 520px); display: flex; flex-direction: column; background: #fff; border: 1px solid #d9e4dd; border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.16); overflow: hidden; }
.qn-mh { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; padding: .6rem .8rem .4rem; }
.qn-mh b { font-size: .95rem; }
.qn-mh .chip-n { font-size: .72rem; padding: 0 .4rem; border-radius: 999px; background: #f59e0b; color: #fff; }
.qn-mh small { color: var(--muted); font-size: .74rem; }
.qn-mf { display: flex; flex-wrap: wrap; gap: .3rem; padding: 0 .8rem .5rem; border-bottom: 1px solid #edf2ef; }
.qn-mf .chip { font-size: .74rem; padding: .2rem .55rem; }
.qn-ml { list-style: none; margin: 0; padding: .25rem; overflow-y: auto; overscroll-behavior: contain; }
.qn-mi { display: flex; align-items: center; gap: .55rem; padding: .45rem .5rem; border-radius: 10px; color: var(--text); text-decoration: none; min-height: 48px; }
.qn-mi:hover { background: #f3f7f5; text-decoration: none; }
.qn-mi.is-cur { background: #e8f3ee; box-shadow: inset 3px 0 0 var(--primary); }
[dir="rtl"] .qn-mi.is-cur { box-shadow: inset -3px 0 0 var(--primary); }
.qn-mi .qf-av { width: 34px; height: 34px; font-size: .9rem; }
.qn-mi.is-skip .qn-dot { background: #9aa8a0; }
.qn-mi .qn-dot { width: 12px; height: 12px; border-width: 2px; }
.qn-mt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.qn-mt b { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qn-mt small { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qn-mt .qf-kind { font-size: .68rem; padding: 0 .35rem; }
.qn-mw { flex: 0 0 auto; font-size: .72rem; color: var(--muted); white-space: nowrap; }
.qn-mw.is-late { color: #b45309; font-weight: 800; }
.qn-mfoot { display: flex; flex-direction: column; gap: .2rem; padding: .5rem .8rem .6rem; border-top: 1px solid #edf2ef; background: #fafcfb; }
.qn-mfoot a { display: inline-flex; align-items: center; gap: .25rem; font-weight: 800; font-size: .84rem; }
.qn-keys { color: var(--muted); font-size: .7rem; }
@media (hover: none), (max-width: 760px) { .qn-keys { display: none; } }
.qf-factive { margin: -.15rem 0 .45rem; }
.rq-card.is-wait { display: flex; flex-direction: column; gap: .35rem; }
.rq-gonow { align-self: flex-start; display: inline-flex; align-items: center; gap: .3rem; }

/* v1.37.1 — «المتابعة» polish: one-row date, slim summary, segmented status + «تصفية ▾», list header with a small bulk remind, WhatsApp + ⋮ */
.fl-head { justify-content: flex-start; gap: .5rem; margin-bottom: .5rem; }
.fl-day { background: none; border: 0; padding: 0; gap: .35rem; flex: 1 1 auto; min-width: 0; }
.fl-dbtn { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px; border: 1px solid #d9e4dd; background: #fff; color: var(--sl-green); text-decoration: none; }
.fl-dbtn:hover { background: var(--primary-soft); text-decoration: none; }
.fl-dbtn.is-off { color: #c5d1ca; background: #f6f9f7; }
.fl-day .fl-date { flex: 0 1 auto; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-day .fl-date b { font-size: 1.08rem; margin: 0; }
.fl-day .fl-date small { color: var(--muted); font-weight: 700; }
.fl-today { flex: 0 0 auto; margin-inline-start: auto; padding: .3rem .8rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 800; font-size: .84rem; text-decoration: none; }
.fl-sum { padding: .55rem .8rem .5rem; border-radius: 14px; margin-bottom: .5rem; }
.fl-sum-row { display: flex; align-items: center; gap: .7rem; }
.fl-sum-row strong { flex: 0 0 auto; font-size: 1.05rem; font-weight: 800; color: var(--sl-deep); white-space: nowrap; }
.fl-sum-row strong span { font-size: .84rem; font-weight: 700; color: var(--text); }
.fl-sum-row .fl-bar { flex: 1 1 auto; margin: 0; }
.fl-sum .fl-mini { margin-top: .3rem; font-size: .78rem; gap: .15rem .8rem; }
.fl-mini b.c-soon { color: #5d6b63; }
.fl-filters { display: flex; align-items: center; gap: .4rem; margin-bottom: .45rem; position: relative; }
.fl-seg { flex: 1 1 auto; min-width: 0; }
.fl-seg .rq-segi { font-size: .78rem; }
.fl-filt { position: static; }
.fl-filt .rq-fchip { height: 42px; padding: 0 .6rem; }
.fl-active { margin-bottom: .45rem; }
.fl-lh { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: .1rem .15rem .4rem; position: relative; }
.fl-lh-t { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.fl-lh-t b { font-size: .9rem; color: var(--sl-deep); }
.fl-early { font-size: .76rem; color: var(--muted); }
.fl-lh .fl-bulk { margin: 0; background: none; border: 0; border-radius: 0; flex: 0 0 auto; }
.fl-lh .fl-bulk > summary { min-height: 36px; padding: .25rem .7rem; font-size: .82rem; color: var(--primary-dark); gap: .3rem; display: inline-flex; }
.fl-lh .fl-bulk[open] > summary { border-color: var(--primary); }
.fl-bulk-p { position: absolute; z-index: 30; inset-inline: 0; top: calc(100% + 6px); background: #fffaf0; border: 1px solid #f0e2b6; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: .7rem .8rem !important; }
.fl-k.k-soon { background: #f2f4f3; color: #4a5e54; }
.fl-row { padding: .5rem .55rem .5rem .35rem; align-items: center; }
.fl-body { gap: .15rem; }
.fl-meta { font-size: .76rem; }
.fl-acts { gap: .3rem; }
.fl-wa { display: inline-flex; align-items: center; gap: .3rem; height: 38px; padding: 0 .65rem; border-radius: 12px; background: #e8f8ee; border: 1px solid #bfe8cd; color: #128c4a; font-weight: 800; font-size: .8rem; text-decoration: none; white-space: nowrap; }
.fl-wa:hover { background: #d8f2e2; text-decoration: none; }
.fl-more { position: relative; }
.fl-more > summary { list-style: none; width: 38px; height: 38px; font-size: 1.2rem; font-weight: 900; line-height: 1; }
.fl-more > summary::-webkit-details-marker { display: none; }
.fl-more[open] > summary { background: var(--primary-soft); border-color: var(--primary); }
.fl-menu { position: absolute; z-index: 40; top: calc(100% + 4px); inset-inline-end: 0; min-width: 200px; background: #fff; border: 1px solid #d9e4dd; border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.15); padding: .25rem; display: flex; flex-direction: column; }
.fl-menu form { margin: 0; }
.fl-menu a, .fl-menu button { display: flex; align-items: center; gap: .5rem; width: 100%; min-height: 44px; padding: 0 .7rem; border: 0; background: none; border-radius: 9px; color: var(--text); font: inherit; font-size: .88rem; font-weight: 700; text-decoration: none; cursor: pointer; text-align: start; }
.fl-menu a:hover, .fl-menu button:hover { background: #f3f7f5; text-decoration: none; }
.fl-menu .ico { color: var(--sl-green); }
details.fl-foot { margin: .7rem .2rem 5.5rem; }
details.fl-foot > summary { list-style: none; cursor: pointer; color: var(--muted); font-size: .8rem; display: inline-flex; gap: .3rem; }
details.fl-foot > summary::-webkit-details-marker { display: none; }
details.fl-foot p { margin: .3rem 0 0; font-size: .8rem; color: var(--muted); }
@media (max-width: 380px) { .fl-wa span { display: none; } .fl-wa { padding: 0 .55rem; } }
@media (min-width: 993px) {
  .fl-filters { max-width: 720px; }
  .fl-table td.fl-acts > * { display: inline-flex; }
  .fl-table .fl-wa { height: 34px; }
  .fl-table .fl-more > summary { width: 34px; height: 34px; }
  details.fl-foot { margin-bottom: 1rem; }
}
.fl-seg .rq-segi { gap: .2rem; padding: 0 .15rem; }
.fl-seg .rq-segi .chip-n { padding: 0 .25rem; min-width: 1.1rem; }
@media (max-width: 560px) { .fl-ft { display: none; } .fl-filt .rq-fchip { padding: 0 .5rem; gap: .15rem; } }
.fl-main, .fl-body { min-width: 0; overflow: hidden; }
.fl-meta { min-width: 0; }
.fl-meta .sl-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.fl-row { gap: .55rem; }

/* v1.37.2 — «الطلاب» polish: search + «تصفية ▾» in one row, segmented status, removable active chips, labelled flags,
   memorised-progress hint, visible WhatsApp + ⋮, «تصدير» instead of the header ⋮, room for the FAB */
.sl-srow { display: flex; align-items: center; gap: .4rem; position: relative; }
.sl-srow .sl-search { flex: 1 1 auto; min-width: 0; }
.sl-filt { position: static; flex: 0 0 auto; }
.sl-filt .rq-fchip { height: 48px; border-radius: 14px; padding: 0 .7rem; }
.sl-filt .rq-fpanel { z-index: 40; }
.sl-seg .rq-segi { font-size: .8rem; gap: .2rem; }
.sl-seg .rq-segi .chip-n { padding: 0 .3rem; min-width: 1.1rem; }
.sl-active { margin: 0; }
.sl-exp { display: inline-flex; align-items: center; gap: .3rem; min-height: 40px; padding: 0 .75rem; border-radius: 12px; border: 1px solid var(--border); background: #fff; color: var(--sl-deep); font-weight: 800; font-size: .85rem; text-decoration: none; }
.sl-exp:hover { background: #f1f5f2; text-decoration: none; }
.sl-flag { display: inline-flex; align-items: center; gap: .2rem; padding: 0 .4rem; border-radius: 999px; font-size: .7rem; font-weight: 800; line-height: 1.7; background: #fff7e0; color: #8a6400; white-space: nowrap; }
.sl-flag.is-red { background: #fdecea; color: #b42323; }
.sl-today.t-soon { color: #6b7a72; font-weight: 700; }
.sl-ptl { display: flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--muted); min-width: 0; }
.sl-ptl .sl-pt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sl-prog { flex: 0 0 44px; height: 5px; border-radius: 999px; background: #e6eee9; overflow: hidden; }
.sl-prog i { display: block; height: 100%; min-width: 3px; background: var(--sl-green); border-radius: inherit; }
.sl-ptl small { white-space: nowrap; color: #3f5a4d; font-size: .72rem; }
.sl-row { gap: .2rem; }
.sl-wa { flex: 0 0 auto; height: 36px; padding: 0 .55rem; font-size: .78rem; }
.sl-row .sl-main { min-width: 0; overflow: hidden; }
.sl-list { margin-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 380px) { .sl-wa span { display: none; } }
@media (min-width: 993px) { .sl-list { margin-bottom: 0; } .sl-table .sl-ptl { margin-top: .15rem; } }
.sl-ptl { flex-wrap: wrap; row-gap: .1rem; }
.sl-ptl .sl-pt { white-space: normal; overflow: visible; }
.sl-meta { row-gap: .25rem; }
@media (max-width: 480px) {
  .sl-wa { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 12px; }
  .sl-wa span { display: none; }
  .sl-row .sl-main { padding-inline-end: .1rem; }
  .sl-more { margin-inline-end: .2rem; }
}
@media (min-width: 993px) { .sl-seg { max-width: 560px; } }

/* v1.39 — «الزوار» (first-party visitor statistics) */
.vz { max-width: 980px; }
.vz-seg { margin-bottom: .8rem; max-width: 420px; }
.vz-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-bottom: .8rem; }
.vz-kpi { background: #fff; border: 1px solid var(--border, #e3ebe6); border-radius: 14px; padding: .7rem .8rem; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.vz-kpi span { font-size: .8rem; color: var(--muted); font-weight: 700; }
.vz-kpi b { font-size: 1.7rem; line-height: 1.15; color: var(--primary-dark); }
.vz-kpi small { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vz-card { padding: .85rem .95rem; margin-bottom: .8rem; }
.vz-h { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .55rem; }
.vz-h h2 { font-size: 1rem; margin: 0; }
.vz-h small { color: var(--muted); font-size: .76rem; }
.vz-spark { width: 100%; height: 86px; display: block; }
.vz-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: .25rem; }
.vz-none { margin: .2rem 0; color: var(--muted); font-size: .88rem; }
.vz-sub { margin: .6rem 0 0; color: var(--muted); font-size: .8rem; line-height: 1.7; }
.vz-bars, .vz-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.vz-bars li { display: grid; grid-template-columns: 7.2rem 1fr auto; align-items: center; gap: .55rem; font-size: .88rem; }
.vz-bl { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vz-bt { height: 10px; background: #eef3f0; border-radius: 99px; overflow: hidden; }
.vz-bt i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.vz-bn { font-weight: 800; white-space: nowrap; }
.vz-bn small { color: var(--muted); font-weight: 600; margin-inline-start: .2rem; }
.vz-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; background: #9aa9a1; }
.vz-s-fb { background: #1877f2; } .vz-s-ig { background: #d6249f; } .vz-s-wa { background: #25d366; } .vz-s-qr { background: #c9a227; }
.vz-s-google { background: #ea4335; } .vz-s-direct { background: #4a5e54; } .vz-s-tiktok { background: #111; } .vz-s-yt { background: #ff0000; }
.vz-fun { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.vz-fun li { display: grid; grid-template-columns: 8.4rem 1fr 3.6rem; align-items: center; gap: .55rem; }
.vz-fl { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.vz-fl b { font-size: .86rem; } .vz-fl small { font-size: .7rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vz-ft { height: 22px; background: #eef3f0; border-radius: 7px; overflow: hidden; }
.vz-ft i { display: block; height: 100%; background: linear-gradient(90deg, #0d6b4c, #2f9a72); border-radius: 7px; }
.vz-fn { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.vz-fn b { font-size: 1rem; } .vz-fn small { font-size: .72rem; color: var(--muted); font-weight: 700; }
.vz-two { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.vz-two .vz-card { margin-bottom: .8rem; }
.vz-dev { display: flex; flex-wrap: wrap; gap: .5rem; }
.vz-dev span { display: inline-flex; align-items: baseline; gap: .3rem; padding: .4rem .7rem; border-radius: 12px; background: #f3f7f5; font-size: .85rem; }
.vz-dev b { font-size: 1.1rem; color: var(--primary-dark); }
.vz-dev small { color: var(--muted); }
.vz-tbl { width: 100%; border-collapse: collapse; font-size: .85rem; }
.vz-tbl th { text-align: start; font-size: .74rem; color: var(--muted); font-weight: 700; padding: .2rem .3rem; }
.vz-tbl td { padding: .35rem .3rem; border-top: 1px solid #eef3f0; }
.vz-links li { display: flex; flex-direction: column; gap: .3rem; }
.vz-lk { display: flex; gap: .4rem; }
.vz-lk input { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; height: 38px; padding: 0 .6rem; border: 1px solid var(--border, #d5e2da); border-radius: 10px; background: #f8fbf9; }
.vz-lk .btn { flex: 0 0 auto; min-height: 38px; }
.vz-more { margin-top: .7rem; font-size: .84rem; color: #33493f; }
.vz-more summary { cursor: pointer; font-weight: 700; color: var(--primary-dark); display: inline-flex; align-items: center; gap: .35rem; }
.vz-more code { display: block; direction: ltr; text-align: left; word-break: break-all; background: #f3f7f5; padding: .45rem .6rem; border-radius: 8px; font-size: .78rem; }
.vz-more p { line-height: 1.8; margin: .4rem 0; }
.vz-priv { padding: 0 .2rem 1rem; }
.vz-empty { display: flex; gap: .6rem; align-items: flex-start; padding: .9rem; background: #fff8e6; border: 1px solid #f0dca2; border-radius: 14px; margin-bottom: .8rem; }
@media (max-width: 640px) {
  .vz-two { grid-template-columns: 1fr; gap: 0; }
  .vz-kpi b { font-size: 1.45rem; }
  .vz-bars li { grid-template-columns: 6.4rem 1fr auto; }
  .vz-fun li { grid-template-columns: 6.9rem 1fr 3rem; gap: .45rem; }
}

/* v1.40 — «ناقص — يكمّل» (not a grade) + «قريت المقطع كامل» */
/* «ناقص — يكمّل»: its own thin row under the 4 grades (not a grade) */
.qf-grades:has(.g-incomplete) { flex-wrap: wrap; }
.qf-grade.g-incomplete { grid-column: 1 / -1; flex: 1 0 100%; border-inline-start: 0 !important; border-top: 1px dashed #d8c58a; }
.qf-grade.g-incomplete span, .rq-grade .qf-grade.g-incomplete span { min-height: 34px; font-size: .84rem; font-weight: 700; background: #fffbef; color: #6b5a1e; }
.qf-grade.g-incomplete input:checked + span { background: #8a6d1c; color: #fff; }
/* v1.40 «حفظت حتى الآية …» — parts of a hifz segment */
.parts-box { margin: .2rem 0 .8rem; padding: .75rem .85rem; border-radius: 12px; background: #f3f8f5; border: 1.5px solid #cfe3d8; line-height: 1.55; }
.parts-head { display: flex; gap: .5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: .35rem; }
.parts-list { margin: .2rem 0 .55rem; padding: 0; list-style: none; }
.parts-list li { margin: .12rem 0; }
.parts-list .parts-next { color: #8a5a00; font-weight: 600; }
.parts-upto { display: block; font-weight: 600; margin-bottom: .25rem; }
.parts-box select { width: 100%; min-height: 46px; font-size: 1rem; border-radius: 10px; }
.parts-help { margin: .45rem 0 0; font-size: .86rem; }
.parts-full { display: flex; gap: .5rem; align-items: flex-start; margin-top: .55rem; font-size: .9rem; }
.parts-full input { width: 20px; height: 20px; flex: none; margin-top: .15rem; accent-color: #0d6b4c; }
.qf-parts { margin: .3rem 0 .6rem; display: grid; gap: .45rem; }
.qf-part-h { font-size: .88rem; font-weight: 600; color: #0d6b4c; margin: 0 0 .15rem; }
.qf-part.is-now .qf-part-h::before { content: '▶ '; }
.rec-short { margin: 0 0 .6rem; padding: .55rem .8rem; border-radius: 10px; background: #fff7ea; color: #8a4b08; font-weight: 700; }
.task-seg-n { display: block; margin-top: .2rem; }
.pc-note.pc-parts { color: #6b5a1e; background: #fffbef; border-radius: 8px; padding: .25rem .45rem; display: block; margin-top: .3rem; }

/* v1.40.1 «التقدّم في الحفظ» — current hizb first, compact overall, dense 60-hizb map */
.hf { display: grid; gap: .8rem; }
.hf-cur { border: 1.5px solid #cfe3d8; border-radius: 16px; padding: .85rem; background: linear-gradient(180deg, #f3faf6, #fff 70%); }
.hf-cur-h { display: flex; align-items: center; gap: .8rem; }
.hf-big { flex: none; width: 76px; height: 76px; border-radius: 18px; background: var(--success, #1f7a4f); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.hf-big span { font-size: .78rem; opacity: .85; }
.hf-big b { font-size: 2.1rem; font-weight: 800; margin-top: .15rem; }
.hf-cur-t { display: grid; gap: .15rem; min-width: 0; }
.hf-cur-t strong { font-size: 1.05rem; }
.hf-cur-t span { color: var(--muted, #5b6b63); font-size: .9rem; }
.hf-thumns { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: .3rem; }
.hf-thumns li { display: flex; flex-direction: column; align-items: center; gap: .2rem; min-width: 0; }
.hf-thumns i { width: 100%; height: 30px; border-radius: 8px; background: #e3ebe6; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: .85rem; font-weight: 800; color: #fff; }
.hf-thumns small { font-size: .62rem; color: var(--muted, #5b6b63); white-space: nowrap; }
.hf-thumns .st-done i { background: var(--success, #1f7a4f); }
.hf-thumns .st-partial i { background: #f5b83d; color: #6b4a00; }
.hf-thumns .is-cur i { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #f5b83d; color: #6b4a00; }
.hf-thumns .is-cur.st-none i { background: #fff3d6; }
.hf-thumns .is-cur small { color: #8a5a00; font-weight: 700; }
.hf-ayah { margin-top: .85rem; padding-top: .7rem; border-top: 1px dashed #cfe3d8; }
.hf-ayah-h { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; margin: 0 0 .4rem; font-size: .9rem; }
.hf-ayah-h b { color: var(--success, #1f7a4f); white-space: nowrap; }
.hf-strip { display: flex; gap: 2px; height: 10px; }
.hf-strip i { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: #e3ebe6; }
.hf-strip .s-done { background: var(--success, #1f7a4f); }
.hf-strip .s-parts { background: #8fc9a9; }
.hf-strip .s-next { background: #f5b83d; }
.hf-runs { list-style: none; margin: .55rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.hf-runs li { font-size: .86rem; padding: .25rem .55rem; border-radius: 999px; background: #eef2ef; color: #3c4a43; }
.hf-runs small { font-size: .78rem; opacity: .85; }
.hf-runs .r-done { background: #e3f6ec; color: #155c3b; }
.hf-runs .r-parts { background: #eaf6f0; color: #155c3b; border: 1px dashed #8fc9a9; }
.hf-runs .r-next { background: #fff3d6; color: #6b4a00; font-weight: 700; }
.hf-eta { margin: .75rem 0 0; font-size: .9rem; line-height: 1.6; color: #4a3b10; background: #fffaeb; border-radius: 10px; padding: .45rem .6rem; }
.hf-all { padding: 0 .1rem; }
.hf-all-h { display: flex; justify-content: space-between; gap: .5rem; font-size: .92rem; }
.hf-all-h b { font-size: 1.05rem; }
.hf-bar { height: 10px; border-radius: 999px; background: #e3ebe6; overflow: hidden; margin: .35rem 0; }
.hf-bar i { display: block; height: 100%; background: var(--success, #1f7a4f); border-radius: inherit; }
.hf-all-s { margin: 0; font-size: .82rem; color: var(--muted, #5b6b63); }
.hf-map { border: 1px solid var(--border, #dfe7e2); border-radius: 14px; background: #fff; }
.hf-map > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .7rem .8rem; font-weight: 700; min-height: 44px; }
.hf-map > summary::-webkit-details-marker { display: none; }
.hf-map > summary::after { content: '▾'; color: var(--muted, #5b6b63); }
.hf-map[open] > summary::after { content: '▴'; }
.hf-leg { font-weight: 400; font-size: .74rem; color: var(--muted, #5b6b63); display: inline-flex; align-items: center; gap: .25rem; margin-inline-start: auto; }
.hf-leg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-inline-start: .3rem; }
.hf-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; padding: 0 .7rem .2rem; }
.hf-grid button { aspect-ratio: 1; min-height: 28px; border: 0; border-radius: 6px; padding: 0; font: inherit; font-size: .62rem; color: #8a978f; background: #e9eeeb; cursor: pointer; }
.hf-leg .c-done, .hf-grid .c-done { background: var(--success, #1f7a4f); color: #d9f0e3; }
.hf-leg .c-partial, .hf-grid .c-partial { background: linear-gradient(to top, #f5b83d calc(var(--f, .5) * 100%), #fbe7bd 0); color: #6b4a00; }
.hf-leg .c-none { background: #e3ebe6; }
.hf-grid .is-cur { outline: 2px solid #f5b83d; outline-offset: 1px; font-weight: 800; }
.hf-grid button[aria-pressed="true"] { outline: 2px solid #0d6b4c; outline-offset: 1px; }
.hf-detail { margin: .45rem .8rem .7rem; font-size: .84rem; min-height: 1.3em; }

/* ---- v1.42.0 «محفوظ من قبل» (prior memorisation): subtle striped green = memorised before joining ---- */
.pr-ask { background: #fff8e6; border: 1px solid #f1d58a; border-radius: 12px; padding: .7rem .8rem; }
.pr-ask p { margin: 0 0 .35rem; }
.pr-acts { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.pr-acts form { margin: 0; }
.pr-on p { margin: 0 0 .3rem; }
.pr-chip { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; }
.pr-edit { margin-top: .6rem; border-top: 1px dashed #d6e2dc; padding-top: .5rem; }
.pr-edit > summary { cursor: pointer; font-weight: 700; color: var(--primary, #0d6b4c); padding: .3rem 0; }
.pr-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.pr-form select { width: 100%; }
.pr-sum { margin: .2rem 0 .6rem; font-weight: 700; color: #134e36; min-height: 1.2em; }
.pr-undo { margin-top: .3rem; }
.pr-chip, .hf-leg .c-prior, .hf-grid .c-done.is-prior, .hf-thumns .st-done.is-prior i, .jr-bar i.d.pr, .hizb-cell.is-prior .hz-bar i.m, .hizb-legend .lg.pr-chip {
  background: repeating-linear-gradient(135deg, #3f9b70 0 4px, #5aae86 4px 7px); }
.hf-grid .c-done.is-prior { color: #eaf6ef; }
.hizb-cell.is-prior .hz-no::after { content: ' ·من قبل'; font-size: .6rem; color: #3f7d62; font-weight: 400; }
.hf-prior-note { margin: .35rem 0 0; font-size: .74rem; color: var(--muted, #5b6b63); }
.sp-prior-ask { display: block; margin: 0 0 .5rem; padding: .45rem .6rem; border-radius: 10px; background: #fff8e6; border: 1px solid #f1d58a; color: #6b4a00; font-size: .85rem; text-decoration: none; }
.sl-badge.pr-ask-b { background: #fff3d6; color: #8a5a00; }
.bs-item.is-prior { background: #f1f8f4; border-color: #cfe5d8; border-style: dashed; }
.bs-item.is-prior .bs-ico { opacity: .7; }
.bs-item.is-prior .pr-chip { width: 9px; height: 9px; }

/* v1.43 — password recovery (one step per screen, minimal text) */
.pwr-card { padding: 1.6rem 1.25rem 1.4rem; }
.pwr-top { display: flex; flex-direction: column; align-items: center; gap: .9rem; margin-bottom: 1.2rem; }
.pwr-top .mark { width: 52px; height: 52px; border-radius: 15px; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 1.3rem; font-weight: 800; }
.pwr-top .mark.has-logo { background: #fff; padding: 3px; overflow: hidden; }
.pwr-dots { display: flex; gap: 6px; }
.pwr-dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--border); transition: width .2s, background .2s; }
.pwr-dots i.is-on { width: 22px; background: var(--primary); }
.pwr-dots i.is-done { background: var(--primary); opacity: .45; }
.pwr-h { margin: 0 0 .35rem; font-size: 1.35rem; text-align: center; }
.pwr-p { margin: 0 0 1.2rem; text-align: center; color: var(--muted); }
.pwr-p bdi { color: var(--text, inherit); font-weight: 600; }
.pwr-form { display: flex; flex-direction: column; gap: .7rem; }
.pwr-label { font-size: .85rem; color: var(--muted); margin-bottom: -.35rem; }
.pwr-input { width: 100%; font-size: 1.05rem; padding: .8rem .9rem; border-radius: 12px; }
.pwr-btn { width: 100%; padding: .8rem 1rem; font-size: 1rem; border-radius: 12px; justify-content: center; display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; }
.pwr-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; }
.pwr-msg { border-radius: 12px; padding: .6rem .8rem; margin-bottom: .9rem; font-size: .92rem; text-align: center; }
.pwr-msg.is-error { background: #fdecec; color: #a12a2a; }
.pwr-msg.is-ok { background: #e8f5ee; color: #0d6b4c; }
.pwr-otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: .45rem; }
.pwr-otp input { width: 100%; min-width: 0; height: 54px; text-align: center; font-size: 1.45rem; font-weight: 700; border-radius: 12px; padding: 0; font-variant-numeric: tabular-nums; }
.pwr-otp input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,107,76,.15); outline: none; }
.pwr-otp.is-bad input { border-color: #d64545; animation: pwr-shake .3s; }
@keyframes pwr-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.pwr-resend { text-align: center; margin: .9rem 0 0; }
.pwr-link { background: none; border: 0; color: var(--primary); font: inherit; font-size: .92rem; cursor: pointer; padding: .3rem; }
.pwr-link[disabled] { color: var(--muted); cursor: default; }
.pwr-help { margin-top: .8rem; text-align: center; }
.pwr-help > summary { display: inline-block; cursor: pointer; color: var(--muted); font-size: .9rem; list-style: none; padding: .3rem .6rem; }
.pwr-help > summary::-webkit-details-marker { display: none; }
.pwr-help > summary::after { content: ' ▾'; font-size: .75em; }
.pwr-help[open] > summary::after { content: ' ▴'; }
.pwr-help-body { text-align: right; background: var(--bg); border-radius: 12px; padding: .8rem .9rem; margin-top: .4rem; font-size: .9rem; }
.pwr-help-body p { margin: 0 0 .5rem; }
.pwr-help-body .pwr-btn { margin: .2rem 0 .3rem; }
.pwr-list { margin: 0 0 .6rem; padding: 0 1.1rem 0 0; }
.pwr-list li { margin: .2rem 0; }
.pwr-small { font-size: .85rem; text-align: center; margin: .4rem 0 0 !important; }
.pwr-foot { text-align: center; margin: 1rem 0 0; font-size: .9rem; }
.pwr-foot a, .pwr-small a, .pwr-list a { color: var(--primary); }
.pwr-pw { position: relative; }
.pwr-pw .pwr-input { padding-left: 4.6rem; }
.pwr-eye { position: absolute; left: .4rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--primary); font: inherit; font-size: .85rem; padding: .4rem .5rem; cursor: pointer; }
.pwr-check { width: 64px; height: 64px; margin: 0 auto .9rem; border-radius: 50%; background: #e8f5ee; color: #0d6b4c; display: grid; place-items: center; font-size: 2rem; font-weight: 800; }
.pwr-nudge { display: flex; gap: .7rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pwr-nudge p { margin: 0; flex: 1 1 180px; }

/* ===== v1.43.1 — student profile top (compact header, «اليوم» first, clear week strip) — prefix spx- ===== */
.spx-head { min-width: 0; display: flex; align-items: center; gap: .7rem; padding: .2rem .1rem; }
.spx-av { position: relative; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.15rem; font-weight: 800; }
.spx-av.g-m { background: #e3f0fb; color: #1b5c96; }
.spx-av.g-f { background: #fbe9ef; color: #a23a62; }
.spx-av.g-x { background: #eef2ef; color: #4d6359; }
.spx-dot { position: absolute; bottom: 0; inset-inline-start: 0; width: 12px; height: 12px; border-radius: 50%; background: #b9c2bd; box-shadow: 0 0 0 2px var(--bg, #f6f8f7); }
.spx-dot.on { background: #22a45d; }
.spx-id { flex: 1 1 auto; min-width: 0; }
.spx-id h2 { margin: 0; font-size: 1.12rem; font-weight: 800; color: #08402e; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spx-id p { margin: 0; font-size: .82rem; color: var(--muted); line-height: 1.45; }
.spx-off { color: #a12a2a; font-weight: 700; }
.spx-acts { display: flex; gap: .4rem; flex: 0 0 auto; }
.spx-ib { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #fff; border: 1px solid var(--border); color: #08402e; text-decoration: none; cursor: pointer; }
.spx-ib.is-wa { background: #e8f7ee; border-color: #cdebd9; color: #128c4a; }
.spx-ib.is-lg { width: 46px; height: 46px; flex: 0 0 46px; }
.spx-ib:hover { text-decoration: none; filter: brightness(.97); }
.spx-over > summary.spx-ib { width: 40px; height: 40px; }
.spx-tasks { list-style: none; margin: 0; padding: 0; }
.spx-tasks li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .5rem; padding: .5rem 0; border-top: 1px solid #f0f3f1; font-size: .9rem; }
.spx-tasks li:first-child { border-top: 0; padding-top: 0; }
.spx-tk { font-weight: 800; }
.spx-tk small { font-weight: 600; color: var(--muted); }
.spx-rg { color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spx-pill { font-size: .76rem; font-weight: 800; padding: .15rem .55rem; border-radius: 999px; background: #f1f3f2; color: #5c6b64; white-space: nowrap; }
.spx-pill.sent { background: #fff4dc; color: #8a5a00; }
.spx-pill.parts { background: #e9f1fb; color: #1b5c96; }
.spx-pill.graded { background: #e3f3ea; color: #0a5a3f; }
.spx-pill.redo { background: #fdecec; color: #a12a2a; }
.spx-cta-row { display: flex; gap: .5rem; align-items: center; margin-top: .7rem; }
.spx-grow { flex: 1 1 auto; margin: 0; }
.spx-cta { width: 100%; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: 12px; font-weight: 800; }
.spx-today > .spx-cta { margin-top: .7rem; }
.spx-done { margin: .7rem 0 0; color: #0a5a3f; font-weight: 800; font-size: .9rem; }
.spx-cta-row .spx-done { margin: 0; text-align: center; background: #eef7f2; border-radius: 12px; padding: .7rem; }
.spx-none { margin: 0; color: var(--muted); font-size: .9rem; }
.spx-week { list-style: none; margin: .9rem 0 0; padding: .75rem 0 0; border-top: 1px solid #f0f3f1; display: grid; grid-template-columns: repeat(7, 1fr); gap: .2rem; text-align: center; }
.spx-week li { display: grid; justify-items: center; gap: .2rem; }
.spx-week small { font-size: .7rem; color: var(--muted); }
.spx-day { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 800; background: #f2f4f3; color: #9aa6a0; }
.spx-wk-done .spx-day { background: #0d6b4c; color: #fff; }
.spx-wk-madeup .spx-day { background: #e3f3ea; color: #0d6b4c; box-shadow: inset 0 0 0 2px #0d6b4c; }
.spx-wk-partial .spx-day { background: #fff4dc; color: #8a5a00; }
.spx-wk-missed .spx-day { background: #fdecec; color: #c0392b; }
.spx-wk-off .spx-day { background: transparent; color: #b5bfba; }
.spx-wk-none .spx-day, .spx-wk-future .spx-day { background: transparent; box-shadow: inset 0 0 0 1.5px #e2e8e5; }
.spx-wk-off small { color: #b5bfba; }
.spx-wk-pending .spx-day, .spx-now .spx-day { box-shadow: inset 0 0 0 2px #0d6b4c; background: #fff; }
.spx-wk-done.spx-now .spx-day { background: #0d6b4c; }
.spx-week .spx-now small { color: #08402e; font-weight: 800; }
.spx-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem .8rem; margin: .45rem 0 0; font-size: .72rem; color: var(--muted); }
.spx-legend b { font-weight: 800; }
.spx-lg-done b { color: #0d6b4c; } .spx-lg-partial b { color: #8a5a00; } .spx-lg-missed b { color: #c0392b; } .spx-lg-off b { color: #b5bfba; }
.spx-sum { display: flex; flex-wrap: wrap; gap: .2rem .9rem; margin: .8rem 0 0; padding-top: .65rem; border-top: 1px solid #f0f3f1; font-size: .82rem; color: var(--muted); }
.spx-sum b { color: #08402e; font-weight: 800; }

/* ===== v1.43.2 — «فعّل الإشعارات» bottom sheet (prefix pps-) ===== */
.pps { position: fixed; inset-inline: 0; bottom: 0; z-index: 60; display: flex; justify-content: center; padding: 0 .6rem calc(.6rem + env(safe-area-inset-bottom)); pointer-events: none; }
.pps[hidden] { display: none; }
.pps-card { pointer-events: auto; width: min(440px, 100%); background: #fff; border-radius: 20px; box-shadow: 0 -6px 30px rgba(8, 64, 46, .18), 0 2px 8px rgba(0,0,0,.06); padding: 1.1rem 1.1rem .8rem; text-align: center; transform: translateY(110%); transition: transform .25s ease; }
.pps.is-open .pps-card { transform: none; }
.pps-ico { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: #e8f5ee; color: #0d6b4c; font-size: 1.6rem; margin-bottom: .55rem; }
.pps-t { margin: 0 0 .9rem; font-weight: 800; font-size: 1.02rem; color: #08402e; line-height: 1.55; }
.pps-t.pps-sm { font-weight: 600; font-size: .9rem; color: #3f5a4d; margin-bottom: .4rem; }
.pps-btn { width: 100%; min-height: 48px; border-radius: 14px; font-weight: 800; font-size: 1rem; }
.pps-later { display: block; width: 100%; margin-top: .35rem; background: none; border: 0; color: var(--muted); font: inherit; font-size: .92rem; padding: .6rem; cursor: pointer; }
.pps-steps { text-align: right; margin: 0 0 .9rem; padding: 0 1.2rem 0 0; font-size: .9rem; color: #3f5a4d; line-height: 1.9; }
.pps-k { display: inline-block; padding: 0 .35rem; border: 1px solid var(--border); border-radius: 6px; font-size: .8rem; }
.pps-toast { position: fixed; z-index: 61; inset-inline: 0; margin: 0 auto; bottom: calc(76px + env(safe-area-inset-bottom)); width: max-content; max-width: 90vw; background: #08402e; color: #fff; font-weight: 700; border-radius: 999px; padding: .6rem 1.1rem; box-shadow: 0 6px 20px rgba(0,0,0,.2); opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
.pps-toast.is-on { opacity: 1; transform: none; }
.pps-toast[hidden] { display: none; }
@media (max-width: 992px) { .pps { bottom: calc(64px + env(safe-area-inset-bottom)); } }

/* ===== v1.44.0 — staff student profile: sticky header + tabs, consistent cards (prefix spt-, spx-mot) ===== */
.spt { gap: .75rem; grid-template-columns: minmax(0, 1fr); }
.spt > * { min-width: 0; }
.spt-tabs { position: sticky; top: var(--spt-top, 61px); z-index: 14; display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -.35rem; padding: 0 .35rem; background: var(--bg, #f4f7f5); box-shadow: 0 1px 0 var(--border); }
/* phones: html/body use overflow-x:hidden (v1.1), which disables position:sticky — on this page clip instead (no scroll container) */
@media (max-width: 992px) { html:has(.spt), body:has(.spt) { overflow-x: clip; } }
.spt-ttl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62vw; }
.spt-tabs::-webkit-scrollbar { display: none; }
.spt-tabs a { position: relative; flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: .25rem; min-height: 44px; padding: 0 .4rem; color: var(--muted); font-weight: 800; font-size: .88rem; white-space: nowrap; text-decoration: none; border-bottom: 3px solid transparent; }
.spt-tabs a:hover { text-decoration: none; color: #08402e; }
.spt-tabs a.is-on { color: #0d6b4c; border-bottom-color: #0d6b4c; }
.spt-tabs a:focus-visible { outline: 2px solid #0d6b4c; outline-offset: -2px; border-radius: 8px; }
.spt-n { min-width: 1.2rem; height: 1.2rem; padding: 0 .3rem; border-radius: 999px; background: #e7a417; color: #fff; font-size: .7rem; line-height: 1.2rem; text-align: center; }
.spt-dot { width: 7px; height: 7px; border-radius: 50%; background: #d64545; display: inline-block; }
.spt-pane { display: none; gap: .75rem; align-content: start; scroll-margin-top: 140px; }
.spt-pane.is-on { display: grid; grid-template-columns: minmax(0, 1fr); }
.spt-pane > * { min-width: 0; }
.spt-pane [id] { scroll-margin-top: 150px; }
.spt-pane > .panel { margin: 0; border-radius: 18px; box-shadow: none; min-width: 0; }
.spt-pane > .panel > .panel-header { padding: .75rem 1rem; background: #fff; border-bottom: 1px solid #f0f3f1; }
.spt-pane > .panel > .panel-header h2 { font-size: 1.02rem; font-weight: 800; color: #08402e; }
.spt-pane > .panel > .panel-body { padding: .85rem 1rem; }
.spt-pane .sp-card-h a { font-size: .85rem; font-weight: 700; }
/* «اليوم»: motivation as one slim row */
.spx-mot { background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.spx-mot > summary { list-style: none; position: relative; display: grid; gap: .15rem; min-height: 44px; align-content: center; padding: .5rem .8rem; padding-inline-end: 2rem; cursor: pointer; font-size: .86rem; }
.spx-mot > summary::-webkit-details-marker { display: none; }
.spx-mot-i { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #3f5a4d; font-weight: 700; }
.spx-mot-i.tone-up { color: #0a5a3f; }
.spx-mot-c { position: absolute; inset-inline-end: .9rem; top: 50%; width: 8px; height: 8px; border-inline-end: 2px solid #9aa6a0; border-bottom: 2px solid #9aa6a0; transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.spx-mot[open] .spx-mot-c { transform: translateY(-20%) rotate(-135deg); }
.spx-mot-b { padding: 0 .8rem .8rem; display: grid; gap: .5rem; }
.spx-mot-b .sp-mute { margin: 0; }
.spx-mot-h { margin: .3rem 0 0; font-weight: 800; font-size: .88rem; color: #08402e; }
/* lists, chips, forms shared by the tabs */
.spt-pane .spt-tl + .spt-more { margin-top: .2rem; }
.spt-more > summary, .spt-add > summary { list-style: none; cursor: pointer; min-height: 40px; display: flex; align-items: center; font-weight: 800; font-size: .88rem; color: #0d6b4c; }
.spt-more > summary::-webkit-details-marker, .spt-add > summary::-webkit-details-marker { display: none; }
.spt-add { margin-top: .5rem; border-top: 1px solid #f0f3f1; padding-top: .2rem; }
.spt-form { display: grid; gap: .55rem; padding-top: .3rem; }
.spt-form label { display: grid; gap: .25rem; font-size: .82rem; font-weight: 700; color: #3f5a4d; min-width: 0; }
.spt-form-r { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem; }
.spt-form input:not([type=checkbox]), .spt-form select { width: 100%; min-height: 42px; }
.spt-form .spt-check { display: flex; align-items: center; gap: .4rem; font-weight: 600; }
.spt-bh { list-style: none; margin: 0; padding: 0; }
.spt-bh li { position: relative; display: grid; gap: .15rem; padding: .55rem 0; border-top: 1px solid #f0f3f1; }
.spt-bh li:first-child { border-top: 0; padding-top: 0; }
.spt-bh .badge { justify-self: start; }
.spt-bh p { margin: 0; font-size: .9rem; line-height: 1.6; overflow-wrap: anywhere; padding-inline-end: 2rem; }
.spt-bh small { color: var(--muted); font-size: .76rem; }
.spt-wa-s { position: absolute; inset-inline-end: 0; top: .55rem; color: #128c4a; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #e8f7ee; }
.spt-bh li:first-child .spt-wa-s { top: 0; }
.spt-chipl { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.spt-chipl a { display: inline-flex; align-items: baseline; gap: .3rem; padding: .3rem .65rem; border-radius: 999px; background: #eef7f2; color: #0a5a3f; font-weight: 800; font-size: .85rem; text-decoration: none; }
.spt-chipl small { font-weight: 600; color: #5c7b6d; font-size: .72rem; }
.spt-nums { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.spt-nums span { text-align: center; }
/* «التسجيلات» */
.spt-chips { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; margin: 0 0 .6rem; padding-bottom: .1rem; }
.spt-chips::-webkit-scrollbar { display: none; }
.spt-chip { flex: 0 0 auto; min-height: 36px; padding: 0 .75rem; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: #3f5a4d; font: inherit; font-size: .82rem; font-weight: 800; cursor: pointer; }
.spt-chip bdi { color: var(--muted); font-weight: 700; }
.spt-chip.is-on { background: #0d6b4c; border-color: #0d6b4c; color: #fff; }
.spt-chip.is-on bdi { color: #cfe8db; }
.spt-recs { list-style: none; margin: 0; padding: 0; }
.spt-rec { display: grid; gap: .45rem; padding: .7rem 0; border-top: 1px solid #f0f3f1; }
.spt-rec:first-child { border-top: 0; padding-top: .1rem; }
.spt-rec[hidden] { display: none; }
.spt-rec-h { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.spt-rec-t { display: grid; min-width: 0; }
.spt-rec-t strong { font-size: .92rem; }
.spt-rec-t small { color: var(--muted); font-size: .78rem; }
.spt-rec-n { margin: 0; font-size: .8rem; color: #5c6b64; }
.spt-gchip { flex: 0 0 auto; display: inline-block; padding: .18rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 800; background: #f1f3f2; color: #5c6b64; white-space: nowrap; text-decoration: none; }
.spt-gchip.g-excellent { background: #e3f3ea; color: #0a5a3f; }
.spt-gchip.g-good { background: #e9f1fb; color: #1b5c96; }
.spt-gchip.g-acceptable { background: #f4f0e3; color: #7a6420; }
.spt-gchip.g-retry { background: #fdecec; color: #a12a2a; }
.spt-gchip.is-pend { background: #fff4dc; color: #8a5a00; }
a.spt-gchip.is-pend { background: #e7a417; color: #fff; padding: .3rem .8rem; }
a.spt-gchip:hover { text-decoration: none; filter: brightness(.96); }
.spt-skel { display: grid; gap: .6rem; }
.spt-skel i { display: block; height: 54px; border-radius: 12px; background: linear-gradient(90deg, #f1f4f2 25%, #e8eeea 50%, #f1f4f2 75%); background-size: 200% 100%; animation: spt-sh 1.2s linear infinite; }
@keyframes spt-sh { to { background-position: -200% 0; } }
/* «اللوح» timeline */
.spt-tl { list-style: none; margin: .7rem 0 0; padding: 0; }
.spt-tl li { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: .6rem; }
.spt-tl-d { display: grid; align-content: start; font-size: .8rem; font-weight: 800; color: #08402e; padding-top: .55rem; }
.spt-tl-d small { font-weight: 600; color: var(--muted); font-size: .7rem; }
.spt-tl-b { position: relative; padding: .55rem 0 .55rem; padding-inline-start: .9rem; border-inline-start: 2px solid #e2ebe6; display: grid; gap: .15rem; min-width: 0; }
.spt-tl-b::before { content: ""; position: absolute; inset-inline-start: -6px; top: .95rem; width: 10px; height: 10px; border-radius: 50%; background: #0d6b4c; box-shadow: 0 0 0 3px #fff; }
.spt-tl-retry .spt-tl-b::before { background: #d64545; }
.spt-tl-h { display: flex; align-items: center; justify-content: space-between; gap: .4rem; font-size: .9rem; font-weight: 700; }
.spt-tl-h bdi { min-width: 0; overflow-wrap: anywhere; }
.spt-tl-b small { color: var(--muted); font-size: .76rem; }
.spt-foot { margin: .6rem 0 0; font-size: .86rem; font-weight: 700; }
.spt-list { list-style: none; margin: 0; padding: 0; }
.spt-list li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem 0; border-top: 1px solid #f0f3f1; }
.spt-list li:first-child { border-top: 0; padding-top: 0; }
.spt-list li > div { display: grid; min-width: 0; }
.spt-list strong { font-size: .9rem; }
.spt-list small { color: var(--muted); font-size: .76rem; }
/* «الملف» */
.spt-btns { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .7rem; }
.spt-btns .btn { flex: 1 1 140px; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 44px; }
.spt-acts { list-style: none; margin: 0; padding: 0; }
.spt-acts a { display: flex; align-items: center; gap: .55rem; min-height: 46px; border-top: 1px solid #f0f3f1; color: #08402e; font-weight: 700; text-decoration: none; }
.spt-acts li:first-child a { border-top: 0; }
.spt-acts a::after { content: "‹"; margin-inline-start: auto; color: #9aa6a0; font-size: 1.1rem; }
.spt-danger { border-color: #f3d2d2; }
.spt-danger h3 { color: #a12a2a !important; }
.spt-danger .sp-mute { margin: 0 0 .6rem; }
.btn.spt-btn-danger { background: #fff; border: 1px solid #e5b4b4; color: #a12a2a; min-height: 44px; display: inline-flex; align-items: center; font-weight: 800; }
@media (min-width: 1100px) {
  .spt-pane.is-on { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .spt-pane > .spx-today, .spt-pane > #hizbmap, .spt-pane > .spt-full { grid-column: 1 / -1; }
  .spt-tabs a { flex: 0 0 auto; padding: 0 1.2rem; }
}

/* ===== v1.45.0 — focused task screen (parent / child): text first, fixed action bar — prefix tsk- ===== */
.tsk-back { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; margin-inline-end: -.35rem; border-radius: 12px; color: var(--primary-dark, #08402e); text-decoration: none; }
.tsk-back:hover { background: var(--primary-soft, #e6f4ee); text-decoration: none; }
.tsk-kid { flex: 0 0 auto; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: .18rem .65rem; border-radius: 999px; background: #eef5f1; color: #0a5a3f; font-weight: 800; font-size: .8rem; }
.tsk { max-width: 720px; margin: 0 auto; display: grid; gap: .6rem; min-width: 0; }
.tsk > * { min-width: 0; }
.tsk-can { padding-bottom: 170px; }
.tsk-js.tsk-can { padding-bottom: 0; }
.tsk-meta { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.tsk-line { min-width: 0; color: #4d6359; font-weight: 700; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsk-meta .badge { flex: 0 0 auto; }
.tsk-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.tsk-chip { display: inline-flex; align-items: center; gap: .2rem; padding: .15rem .55rem; border-radius: 999px; background: #f1f3f2; color: #4d6359; font-size: .76rem; font-weight: 800; }
.tsk-chip.is-done { background: #e3f3ea; color: #0a5a3f; }
.tsk-chip.is-left { background: #fff4dc; color: #8a5a00; }
.tsk-chip.is-old { background: #e9f1fb; color: #1b5c96; }
.tsk-redo { margin: 0; padding: .55rem .75rem; border-radius: 12px; background: #fdecec; color: #a12a2a; font-weight: 700; font-size: .88rem; }
/* the text */
.tsk-qt { margin: 0; border-radius: 18px; position: relative; }
.tsk-qt .tsk-tools { justify-content: flex-end; flex-wrap: nowrap; gap: .35rem; padding: .4rem .5rem; background: transparent; border-bottom: 1px solid #f1e8cc; }
.tsk-ib { position: relative; min-width: 40px; min-height: 40px; display: inline-grid; place-items: center; font-size: 1.05rem; }
.tsk-ib[aria-pressed="true"] { background: #f4e7b8; border-color: #c9a227; }
.tsk-lv { position: absolute; bottom: 2px; inset-inline-start: 50%; transform: translateX(50%); font-style: normal; font-size: .58rem; font-weight: 800; color: #7a6420; line-height: 1; }
.tsk-qt .qtext { max-height: none; overflow: visible; padding: .5rem .9rem .7rem; }
.tsk-qt .qt-warsh { font-size: calc(1.95rem * var(--qt-scale)); line-height: calc(2.35 * var(--qt-lh)); }
.tsk-qt .qt-hafs { font-size: calc(1.75rem * var(--qt-scale)); line-height: calc(2.4 * var(--qt-lh)); }
.tsk-qt .qt-surah { margin-top: .2rem; }
.tsk-qt .qt-a { cursor: pointer; border-radius: 10px; -webkit-tap-highlight-color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.tsk-qt .qt-a:focus-visible { outline: 2px solid #c9a227; outline-offset: 2px; }
.tsk-qt .qt-a.tsk-on { background: rgba(201, 162, 39, .2); }
.tsk-qt.qt-dark .qt-a.tsk-on { background: rgba(227, 196, 107, .22); }
.tsk-qt.tsk-m1 .tsk-wh, .tsk-qt.tsk-m2 .tsk-w:not(.tsk-w0), .tsk-qt.tsk-m3 .tsk-w { filter: blur(.32em); user-select: none; }
.tsk-qt .qt-a.tsk-peek .tsk-w { filter: none; }
.tsk-qt .qtext-src { font-size: .68rem; opacity: .8; }
/* «🎧 اسمع» */
.tsk-listen > summary { list-style: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 1rem; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: #08402e; font-weight: 800; cursor: pointer; }
.tsk-listen > summary::-webkit-details-marker { display: none; }
.tsk-listen > summary small { color: var(--muted); font-weight: 600; }
.tsk-listen[open] > summary { background: var(--primary-soft, #e6f4ee); border-color: #bfe0cf; }
.tsk-listen .lr { margin-top: .5rem; }
/* options and compare (in the page, not in the bar) */
.tsk-form { display: grid; gap: .6rem; margin: 0; }
.tsk-more { border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.tsk-more > summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; padding: 0 .9rem; color: #4d6359; font-weight: 700; font-size: .86rem; }
.tsk-more > summary::-webkit-details-marker { display: none; }
.tsk-more > summary::after { content: "▾"; margin-inline-start: auto; color: var(--muted); }
.tsk-more[open] > summary::after { content: "▴"; }
.tsk-more > :not(summary) { margin: 0 .9rem .7rem; }
.tsk-more .selfcheck-btn { width: auto; margin: 0 .9rem .7rem; }
.tsk-note { margin-bottom: .6rem; }
.tsk-parts-help { font-size: .8rem; }
.tsk-cmp { display: none; gap: .35rem; padding: .7rem .8rem; border-radius: 14px; background: #f3faf6; border: 1px solid #d5e8de; }
.tsk-form[data-tsk-mode="review"][data-tsk-self="1"] .tsk-cmp { display: grid; }
.tsk-cmp .rec-cmp-h, .tsk-cmp .rec-cmp-l { display: block; margin: 0; font-size: .86rem; }
.tsk-cmp .rec-cmp-l { font-weight: 700; color: var(--primary-dark); }
.tsk-cmp audio { width: 100%; }
/* the fixed action bar (above the bottom nav; app.js measures it into --gradebar-h / --bottomnav-h) */
.tsk-bar { position: fixed; z-index: 45; left: 0; right: 0; bottom: var(--bottomnav-h, 0px); background: rgba(255, 255, 255, .97); border-top: 1px solid var(--border); box-shadow: 0 -8px 22px rgba(8, 64, 46, .1); border-radius: 18px 18px 0 0; padding: .6rem .8rem .65rem; display: grid; gap: .4rem; }
@media (max-width: 992px) { .tsk-bar { bottom: var(--bottomnav-h, 64px); } }
.tsk-short { margin: 0; padding: .4rem .6rem; border-radius: 10px; background: #fff4dc; color: #8a5a00; font-weight: 700; font-size: .82rem; text-align: center; }
.tsk-rec { background: none; border: 0; border-radius: 0; padding: 0; gap: .4rem; justify-items: stretch; }
.tsk-rec .rec-controls { min-height: 0; gap: .6rem; justify-content: center; }
.tsk-live { display: flex; align-items: center; gap: .6rem; }
.tsk-live .rec-wave { flex: 1 1 auto; width: auto; min-width: 0; height: 40px; }
.tsk-live .rec-time { font-size: 1.35rem; flex: 0 0 auto; }
.tsk-rec[data-mode="idle"] .tsk-live { display: none; }
.tsk-rec .rec-main { width: 62px; height: 62px; box-shadow: 0 6px 16px rgba(13,107,76,.25), 0 0 0 5px #e6f4ee; }
.tsk-rec .rec-stop { box-shadow: 0 6px 16px rgba(180,35,24,.22), 0 0 0 5px #fde8e7; }
.tsk-rec .tsk-mic { flex: 1 1 auto; width: auto; height: 56px; padding: 0 1.4rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font: inherit; font-size: 1.1rem; font-weight: 800; }
.tsk-rec .rec-ctl { width: 56px; min-height: 56px; border-radius: 16px; font-size: .66rem; }
.tsk-upto { flex: 0 1 46%; min-width: 0; display: grid; gap: .1rem; font-size: .72rem; font-weight: 700; color: var(--muted); text-align: start; }
.tsk-upto select { width: 100%; min-height: 44px; font-size: .9rem; padding-inline: .5rem; }
.tsk-rec:not([data-mode="idle"]) .tsk-upto { display: none; }
.tsk-state { min-height: 0; font-size: .82rem; font-weight: 700; justify-self: center; text-align: center; max-width: none; }
.tsk-state:empty { display: none; }
.tsk-rec .rec-peek { justify-self: center; }
.tsk-rec .rec-review { gap: .45rem; }
.tsk-rec .rec-review audio { height: 40px; }
.tsk-acts { display: flex; gap: .5rem; width: 100%; }
.tsk-redo-b { flex: 0 0 auto; min-width: 64px; min-height: 52px; border-radius: 14px; border: 1px solid var(--border); background: #fff; color: var(--text); font: inherit; font-size: .72rem; font-weight: 700; display: grid; place-items: center; gap: 1px; cursor: pointer; }
.tsk-send { flex: 1 1 auto; width: auto; min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.tsk-rec[data-mode="file"] > .rec-review { display: grid; }
.tsk-rec[data-mode="file"] [data-rec-preview], .tsk-rec[data-mode="file"] .tsk-redo-b { display: none; }
/* after sending / read-only states */
.tsk-status .tsk-st { margin: 0; padding: .7rem .85rem; border-radius: 14px; background: #f1f3f2; color: #3f5a4d; font-weight: 700; }
.tsk-st.is-sent { background: #fff4dc; color: #8a5a00; }
.tsk-st.is-graded { background: #e3f3ea; color: #0a5a3f; }
.tsk-last { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: .7rem .85rem; display: grid; gap: .35rem; }
.tsk-last-h { margin: 0; font-size: .82rem; font-weight: 800; color: #4d6359; }
.tsk-qt:has([data-qt-body][hidden]) .tsk-tools::before { content: "سمّع من الحفظ · 👁 للنص"; white-space: nowrap; margin-inline-end: auto; align-self: center; color: #7a6420; font-size: .82rem; font-weight: 700; }
