/* سكريبتاتي — هادئ مثل الورق. القراءة أهم شي. */
:root {
  --bg: #F6F3EC; --surface: #FFFDF8; --ink: #24211C; --muted: #6B6458; --line: #E4DDCF;
  --accent: #8A5532; --accent-ink: #FFFDF8; --accent-soft: #F1E5D6; --ok: #4F6E2C; --ok-soft: #E7EDD9;
  --danger: #A3412C; --shadow: 0 1px 2px rgb(60 45 25 / .06), 0 4px 14px rgb(60 45 25 / .05);
  --read-size: 1.3rem; --radius: 16px;
  --font: 'IBM Plex Sans Arabic', 'Noto Sans Arabic', 'Geeza Pro', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1A1816; --surface: #23201D; --ink: #ECE6DA; --muted: #A69D8E; --line: #36312B;
    --accent: #DDA97E; --accent-ink: #1A1816; --accent-soft: #3A2E24; --ok: #A9C27A; --ok-soft: #2C3322;
    --danger: #E58C74; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1A1816; --surface: #23201D; --ink: #ECE6DA; --muted: #A69D8E; --line: #36312B;
  --accent: #DDA97E; --accent-ink: #1A1816; --accent-soft: #3A2E24; --ok: #A9C27A; --ok-soft: #2C3322;
  --danger: #E58C74; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 1rem; line-height: 1.7; letter-spacing: 0; overflow-x: hidden;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.loading { text-align: center; color: var(--muted); padding: 30vh 1rem; }
.wrap { max-width: 42rem; margin: 0 auto; padding: 0 16px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }

/* الشريط العلوي */
.top {
  position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  padding-top: env(safe-area-inset-top); border-bottom: 1px solid transparent;
}
.top.scrolled { border-bottom-color: var(--line); }
.top-row { display: flex; align-items: center; gap: 8px; min-height: 56px; }
.brand { font-size: 1.35rem; font-weight: 700; margin: 0; flex: 1; }
.top-title { flex: 1; font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.icon-btn {
  min-width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 8px; color: var(--ink);
}
.icon-btn:hover { background: var(--accent-soft); }
.icon-btn svg { width: 22px; height: 22px; }
.pill-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-size: .9rem; min-height: 44px; color: var(--accent); font-weight: 600; }

/* البحث والفلاتر */
.search { position: relative; margin: 4px 0 10px; }
.search input {
  width: 100%; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  padding: 0 44px 0 14px; font-size: 1rem; -webkit-appearance: none; appearance: none;
}
.search svg { position: absolute; right: 14px; top: 13px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.chips { display: flex; gap: 8px; margin-bottom: 6px; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 4px 14px; min-height: 44px; font-size: .92rem; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* القائمة */
.week { margin: 22px 0 8px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.week h2 { font-size: 1rem; margin: 0; font-weight: 700; }
.week span { color: var(--muted); font-size: .88rem; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.card {
  display: block; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); transition: transform .12s ease;
}
.card:active { transform: scale(.99); }
.card-head { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.num { color: var(--accent); font-weight: 600; }
.n-pill { background: var(--accent-soft); color: var(--accent); border-radius: 8px; padding: 0 7px; font-weight: 600; font-size: .82rem; }
.sep::before { content: ''; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .45; vertical-align: middle; margin-inline-end: 8px; }
.meta .sep::before { display: none; }
.badge { margin-inline-start: auto; background: var(--ok-soft); color: var(--ok); border-radius: 999px; padding: 0 10px; font-size: .8rem; font-weight: 600; }
.card h3 { margin: 4px 0 2px; font-size: 1.12rem; line-height: 1.5; font-weight: 600; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card.filmed h3 { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 48px 8px; }
.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); }

/* صفحة السكريبت */
.reader { padding-bottom: calc(130px + env(safe-area-inset-bottom)); }
.meta { margin: 12px 0 0; color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.meta .num { font-size: 1rem; }
.reader h1 { font-size: 1.6rem; line-height: 1.45; margin: 6px 0 18px; font-weight: 700; }
.script { max-width: 34rem; font-size: var(--read-size); line-height: 1.95; }
.script p { margin: 0 0 1.1em; }
.script strong { font-weight: 700; background: linear-gradient(transparent 62%, var(--accent-soft) 62%); }
.source { color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 24px; max-width: 34rem; word-break: break-word; }
.source p { margin: 0 0 4px; }
.plinks a { display: block; }
.source a, .plinks a { display: inline-flex; align-items: center; min-height: 44px; }
.trend-btn { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.filmed-note { display: inline-flex; gap: 6px; align-items: center; background: var(--ok-soft); color: var(--ok); border-radius: 999px; padding: 2px 12px; font-size: .88rem; font-weight: 600; margin-bottom: 14px; }

.actions {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 6; background: color-mix(in srgb, var(--surface) 94%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
}
.actions-row { max-width: 42rem; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.3fr 1fr 1fr; gap: 6px; }
.act {
  border: 0; background: transparent; border-radius: 12px; min-height: 56px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; font-size: .8rem; color: var(--ink); padding: 4px 2px;
}
.act svg { width: 22px; height: 22px; }
.act:hover { background: var(--accent-soft); }
.act.primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.act.on { color: var(--ok); font-weight: 600; }
.act.danger { color: var(--danger); }

/* الأزرار والحوار */
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; min-height: 46px; padding: 0 18px; font-weight: 600; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.dialog { border: 0; border-radius: 20px; background: var(--surface); color: var(--ink); padding: 22px; width: min(92vw, 380px); box-shadow: 0 20px 60px rgb(0 0 0 / .25); }
.dialog::backdrop { background: rgb(20 15 10 / .45); }
.dialog h2 { margin: 0 0 6px; font-size: 1.15rem; }
.dialog p { margin: 0 0 18px; color: var(--muted); }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-start; flex-wrap: wrap; }

.toast {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(90px + env(safe-area-inset-bottom));
  background: var(--ink); color: var(--bg); border-radius: 14px; padding: 10px 16px; display: flex; gap: 14px; align-items: center;
  box-shadow: 0 8px 30px rgb(0 0 0 / .2); max-width: calc(100vw - 32px); font-size: .95rem;
}
.toast[hidden] { display: none; }
.toast button { background: transparent; border: 0; color: var(--accent-soft); font-weight: 700; min-height: 36px; padding: 0 4px; text-decoration: underline; }

/* الإعدادات */
.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 14px 0; }
.section h2 { margin: 0 0 6px; font-size: 1.05rem; }
.section p, .section li { color: var(--muted); font-size: .94rem; }
.section ol { padding-inline-start: 1.6em; margin: 6px 0; list-style: arabic-indic; }
.section bdi { font-family: ui-monospace, monospace; font-size: .85em; }
.field { display: grid; gap: 6px; margin: 10px 0; }
.field input { height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); padding: 0 12px; direction: ltr; text-align: left; font-family: ui-monospace, monospace; font-size: .9rem; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg button { border: 0; background: transparent; min-height: 42px; padding: 0 14px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.status { font-size: .9rem; font-weight: 600; }
.status.ok { color: var(--ok); } .status.bad { color: var(--danger); }
.deleted-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.deleted-list li { display: flex; gap: 8px; align-items: center; justify-content: space-between; color: var(--ink); }

/* شرح الإضافة للشاشة */
.sheet-back { position: fixed; inset: 0; z-index: 40; background: rgb(20 15 10 / .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: var(--surface); width: 100%; max-width: 30rem; border-radius: 22px 22px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  max-height: 92dvh; overflow-y: auto;
}
@media (min-width: 640px) { .sheet-back { align-items: center; } .sheet { border-radius: 22px; } }
.sheet h2 { margin: 0 0 4px; font-size: 1.2rem; }
.sheet > p { margin: 0 0 12px; color: var(--muted); }
.steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.step { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; background: var(--bg); border-radius: 14px; padding: 10px; }
.step-n { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; }
.step b { display: block; margin-bottom: 6px; line-height: 1.6; font-weight: 500; }
.step svg { width: 100%; max-width: 260px; height: auto; display: block; border-radius: 10px; }
.sheet .btn { width: 100%; }

/* التلقين */
.prompter { position: fixed; inset: 0; z-index: 50; background: #0F0E0D; color: #F3EEE4; display: flex; flex-direction: column; }
.p-scroll { flex: 1; overflow-y: auto; padding: 0 22px; font-size: var(--p-size, 2.4rem);
  /* السطر الحالي واضح، اللي انقرا خافت، والجاي نص واضح */
  --hl: linear-gradient(rgb(0 0 0 / .22) 0, rgb(0 0 0 / .32) calc(26vh - .2em), #000 26vh, #000 calc(26vh + 3.3em), rgb(0 0 0 / .62) calc(26vh + 4.6em), rgb(0 0 0 / .55) 78%, transparent 100%);
  -webkit-mask-image: var(--hl); mask-image: var(--hl); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.p-scroll::-webkit-scrollbar { display: none; }
.p-text { max-width: min(100%, 14em); margin: 0 auto; font-size: var(--p-size, 2.4rem); line-height: 1.6; font-weight: 500; padding: 26vh 0 75vh; }
.p-text p { margin: 0 0 .8em; }
.p-text strong { color: #F2C190; font-weight: 700; }
.prompter.mirror .p-text { transform: scaleX(-1); }
.p-line { position: absolute; inset-inline: 0; top: 26vh; height: 1.7em; font-size: var(--p-size, 2.4rem); background: rgb(242 193 144 / .06); pointer-events: none; }
.p-line::before { content: ''; position: absolute; inset-inline-start: 2px; top: calc(50% - 8px); border: 8px solid transparent; border-inline-start-color: #F2C190; }
.p-count { position: absolute; inset: 0; background: rgb(15 14 13 / .82); display: grid; place-items: center; font-size: 7rem; font-weight: 700; color: #F2C190; pointer-events: none; }
.p-bar {
  position: absolute; bottom: 0; inset-inline: 0; z-index: 2;
  background: rgb(15 14 13 / .92); border-top: 1px solid #2B2723; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; transition: opacity .3s;
}
.prompter.playing.hide-ui .p-bar, .prompter.playing.hide-ui .p-top { opacity: 0; pointer-events: none; }
.p-top { position: absolute; top: 0; inset-inline: 0; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; display: flex; justify-content: space-between; align-items: center; background: linear-gradient(#0F0E0D, transparent); transition: opacity .3s; z-index: 2; }
.p-btn { min-width: 46px; height: 46px; border-radius: 12px; border: 1px solid #36312B; background: #1C1A18; color: #F3EEE4; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; gap: 6px; }
.p-btn svg { width: 22px; height: 22px; }
.p-play { min-width: 72px; height: 56px; background: #F2C190; color: #1A1816; border-color: #F2C190; font-weight: 700; border-radius: 16px; }
.p-group { display: inline-flex; align-items: center; gap: 4px; background: #1C1A18; border: 1px solid #36312B; border-radius: 12px; padding: 0 4px; }
.p-group .p-btn { border: 0; background: transparent; min-width: 40px; }
.p-val { min-width: 3.4em; text-align: center; font-size: .85rem; color: #CFC6B8; line-height: 1.2; }
.p-time { color: #CFC6B8; font-size: .9rem; }

@media (min-width: 768px) {
  :root { --read-size: 1.45rem; }
  .reader h1 { font-size: 1.9rem; }
}
@media (min-width: 1025px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ترندات الأسبوع */
.trend-sum { font-size: 1.05rem; margin: 4px 0 12px; }
.patterns { list-style: none; counter-reset: p; padding: 0; margin: 0; display: grid; gap: 10px; }
.pattern { counter-increment: p; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 8px; box-shadow: var(--shadow); }
.pattern h3 { margin: 0 0 2px; font-size: 1.05rem; }
.pattern h3::before { content: counter(p, arabic-indic) ". "; color: var(--accent); }
.pattern p { margin: 0 0 4px; color: var(--muted); font-size: .95rem; }
.plinks { font-size: .88rem; word-break: break-word; }
.trend-cmp, .trend-src { color: var(--muted); font-size: .9rem; margin: 12px 0 0; }
.older { margin-top: 28px; }
.older summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--accent); font-weight: 600; }
.plinks a { flex-wrap: wrap; column-gap: 4px; }
.plinks bdi, .source bdi { white-space: nowrap; }

/* خطة المونتاج */
.plan { max-width: 34rem; margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.plan summary { min-height: 52px; display: flex; align-items: center; gap: 8px; padding: 0 16px; font-weight: 600; color: var(--accent); cursor: pointer; list-style: none; }
.plan summary::-webkit-details-marker { display: none; }
.plan summary::after { content: '+'; margin-inline-start: auto; font-size: 1.3rem; }
.plan[open] summary::after { content: '−'; }
.pl-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0 16px 8px; color: var(--muted); font-size: .9rem; }
.pl-meta b { color: var(--ink); font-weight: 600; }
.pl-lines { list-style: none; margin: 0; padding: 0 12px 12px; display: grid; gap: 8px; }
.pl-line { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.pl-say { margin: 0 0 6px; font-weight: 500; line-height: 1.7; color: var(--muted); }
.pl-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: .78rem; margin-inline-end: 8px; vertical-align: 2px; }
.pl-row { display: grid; grid-template-columns: 5.5em 1fr; gap: 8px; font-size: .9rem; line-height: 1.6; }
.pl-row span { color: var(--muted); }
.pl-row b { font-weight: 500; }
.pl-car { padding: 4px 16px 14px; }
.pl-car h3 { font-size: .98rem; margin: 6px 0; }
.pl-car ol { margin: 0; padding-inline-start: 1.4em; list-style: arabic-indic; color: var(--muted); font-size: .92rem; }

@media (max-width: 420px) { .pill-txt { display: none; } .top-row .pill-btn { padding: 6px 12px; } .top-row { gap: 4px; } }

/* كاميرا التلقين */
.p-cam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); z-index: 0; background: #000; }
.p-shade { position: absolute; inset: 0 0 auto 0; height: 58vh; z-index: 0; pointer-events: none; background: linear-gradient(rgb(10 9 8 / .78), rgb(10 9 8 / .62) 75%, transparent); }
.prompter.cam { background: #000; }
.prompter.cam .p-scroll, .prompter.cam .p-line { position: relative; z-index: 1; }
.prompter.cam .p-line { position: absolute; }
.prompter.cam .p-scroll { --hl: linear-gradient(rgb(0 0 0 / .2) 0, rgb(0 0 0 / .3) calc(26vh - .2em), #000 26vh, #000 calc(26vh + 3.3em), rgb(0 0 0 / .55) calc(26vh + 4.6em), transparent 56vh); }
.prompter.cam .p-text { text-shadow: 0 1px 6px rgb(0 0 0 / .6); }
.p-cam-btn { gap: 6px; font-size: .9rem; }
.p-cam-btn[aria-pressed="true"] { background: #F2C190; color: #1A1816; border-color: #F2C190; }
.p-rec { gap: 6px; min-width: 88px; height: 56px; border-radius: 16px; font-weight: 700; }
.p-rec svg { width: 26px; height: 26px; }
.p-stop { position: absolute; z-index: 4; left: 50%; transform: translateX(-50%); bottom: calc(22px + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 8px;
  background: #E5484D; color: #fff; border: 0; border-radius: 999px; min-height: 56px; padding: 0 22px; font-weight: 700; font-size: 1.05rem; box-shadow: 0 6px 24px rgb(0 0 0 / .35); }
.p-stop svg { width: 22px; height: 22px; }
.prompter.recording .p-time::before { content: '● '; color: #E5484D; }
.take .sheet { max-width: 26rem; }
.take-v { width: 100%; max-height: 52dvh; border-radius: 14px; background: #000; margin-bottom: 12px; }
.take-actions { display: grid; gap: 8px; }
.prompter [hidden] { display: none !important; }
.sheet-back.take { z-index: 60; }
.toast { z-index: 70; }
.p-res { margin-inline-start: auto; margin-inline-end: 8px; font: inherit; font-size: .8rem; font-weight: 700; color: #1A1816; background: #F2C190; border: 0; border-radius: 8px; padding: 0 10px; min-height: 36px; direction: ltr; }

/* دليل الوجه + اللقطات */
.p-guide { position: absolute; z-index: 1; left: 50%; top: 56vh; width: min(52vw, 260px); height: 25vh; transform: translateX(-50%); border: 2px dashed rgb(255 255 255 / .55); border-radius: 50%; pointer-events: none; display: grid; place-items: end center; }
.p-guide span { transform: translateY(1.6em); font-size: .78rem; color: rgb(255 255 255 / .8); text-shadow: 0 1px 4px rgb(0 0 0 / .6); }
.prompter.recording .p-guide, .prompter.playing .p-guide { display: none; }
.p-takes { font-size: .8rem; padding: 0 10px; min-height: 40px; height: 40px; margin-inline-end: 6px; }
.take-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.take-list li { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; align-items: center; border-radius: 12px; padding: 4px; }
.take-list li.on { background: var(--accent-soft); }
.take-name { border: 0; background: transparent; text-align: start; min-height: 44px; font-weight: 600; padding: 0 6px; }
.take-list .btn { min-height: 44px; padding: 0 14px; }
.take-list .btn svg { width: 20px; height: 20px; }
.p-time { white-space: nowrap; font-size: .85rem; }

/* تعديل الكلام */
.edited-note { display: inline-block; font-size: .8rem; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 0 10px; margin: -10px 0 12px; }
.reader.editing h1, .reader.editing .script { outline: 2px dashed var(--accent); outline-offset: 6px; border-radius: 6px; caret-color: var(--accent); }
.reader.editing .script { background: var(--surface); }
.reader.editing .source, .reader.editing .plan { opacity: .4; pointer-events: none; }
[contenteditable="true"]:focus { outline-style: solid; }
.take-star { font-size: 1.15rem; padding: 0 10px !important; }
.note { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); line-height: 1.7; }
.hello { margin: 6px 0 14px; }
.hello-hi { margin: 0; font-size: 1.35rem; font-weight: 700; }
.hello-sub { margin: 2px 0 0; color: var(--muted); }
.btn-big { width: 100%; min-height: 54px; font-size: 1.1rem; margin: 6px 0 4px; }
.tok-more { margin-top: 12px; }
.tok-more > summary { cursor: pointer; color: var(--muted); padding: 6px 0; }

/* ---------- رادار الجمعة: الهوك، أقوى ٣، أكثر، الكابشن ---------- */
.top-badge { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 0 10px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.card-head .top-badge { margin-inline-start: auto; }
.card-head .top-badge + .badge { margin-inline-start: 0; }
.hooks { margin: 6px 0 14px; }
.hooks-h { margin: 0 0 8px; color: var(--muted); font-size: .92rem; }
.hook-opts { display: grid; gap: 8px; }
.hook-opt { display: flex; gap: 10px; align-items: flex-start; text-align: start; width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem; line-height: 1.6; }
.hook-opt[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.hook-n { flex: none; min-width: 3.2em; color: var(--accent); font-weight: 700; font-size: .85rem; padding-top: .15em; }
.hook-line { max-width: 34rem; margin: 0 0 1.1em; font-size: calc(var(--read-size) * 1.08); line-height: 1.85; font-weight: 700; }
.reader.editing .hooks, .reader.editing .hook-line, .reader.editing .caption { display: none; }
.caption { margin: 10px 0 0; border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px 12px; background: var(--surface); }
.caption > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.caption p { line-height: 1.8; margin: 4px 0 12px; }
.more-link { display: flex; align-items: center; gap: 10px; margin: 18px 0 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-decoration: none; }
.more-link span { color: var(--muted); font-size: .92rem; flex: 1; }
.more-link .flip { transform: scaleX(-1); color: var(--muted); }
.more-list { padding: 0; margin: 0 0 18px; list-style: none; display: grid; gap: 10px; counter-reset: m; }
.more-list li { counter-increment: m; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.more-list h3 { margin: 0; font-size: 1.05rem; }
.more-list h3::before { content: counter(m, arabic-indic) ". "; color: var(--accent); }
.more-list p { margin: 4px 0 0; color: var(--muted); line-height: 1.7; }
.nudge { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 8px 8px 12px; border-radius: 14px; background: var(--accent-soft); font-size: .92rem; }
.nudge span { flex: 1; line-height: 1.6; }
.btn-small { min-height: 40px; padding: 0 12px; font-size: .9rem; }
.nudge-x { width: 40px; height: 40px; }
.nudge-x svg { width: 18px; height: 18px; }
.chips { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-inline: -16px; padding-inline: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; white-space: nowrap; }
.card-head { flex-wrap: wrap; row-gap: 2px; }
.card-head > span { white-space: nowrap; }
.nudge.ready { background: var(--ok-soft); }

/* ---------- الأقسام: صحة وأشعة · حياة وأمل · فيديو طويل ---------- */
.kinds { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 4px -16px 8px; padding: 0 16px; }
.kinds::-webkit-scrollbar { display: none; }
.kind-tab { flex: none; white-space: nowrap; min-height: 44px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: .95rem; }
.kind-tab[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 700; }
.kind-tag { border-radius: 999px; padding: 0 8px; font-size: .78rem; font-weight: 600; white-space: nowrap; background: var(--ok-soft); color: var(--ok); }
.kind-tag.k-long { background: var(--accent-soft); color: var(--accent); }
.week-prog { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; font-size: .9rem; }
.wp-l { color: var(--muted); }
.wp { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.wp.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.kind-tag.k-mine { background: #F6ECD2; color: #7A5A12; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kind-tag.k-mine { background: #3A3120; color: #E9C77A; } }
:root[data-theme="dark"] .kind-tag.k-mine { background: #3A3120; color: #E9C77A; }

/* ---------- جلسة التصوير، 📌، الطلبات، تذكير الأسبوع ---------- */
.session-btn { width: 100%; margin-top: 12px; min-height: 52px; font-size: 1.05rem; }
.week-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.week-note .btn-small { margin-inline-start: auto; }
.pin-btn { font-size: 1.1rem; filter: grayscale(1); opacity: .55; }
.pin-btn[aria-pressed="true"] { filter: none; opacity: 1; }
.more-act { margin-top: 8px; }
.req-on { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.ss-list { list-style: none; padding: 0; margin: 10px 0; max-height: 52vh; overflow-y: auto; display: grid; gap: 6px; }
.ss-list label { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); min-height: 52px; }
.ss-list input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.ss-list span { display: grid; gap: 2px; }
.ss-list small { color: var(--muted); }
.ss-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ss-actions .btn-primary { flex: 1; }
.p-sess { background: rgb(0 0 0 / .45); color: #fff; border-radius: 999px; padding: 4px 12px; font-size: .9rem; white-space: nowrap; }
.p-next { background: #F2C190 !important; color: #2a1a0c !important; font-weight: 700; padding: 0 16px !important; }
.take-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 420px) { .p-cam-btn span { display: none; } .p-top { gap: 4px; } .p-res { padding: 0 6px; font-size: .72rem; margin-inline-end: 2px; } .p-track { min-width: 40px; } .p-sess { font-size: .8rem; } .p-takes { padding: 0 8px; font-size: .8rem; } }
/* 14/11: التبويبات الخمسة تبين كلها بالموبايل */
@media (max-width: 420px) { .kinds { gap: 0; justify-content: space-between; } .kind-tab { padding: 0 5px; font-size: .86rem; } }
/* 14/11: الأسابيع القديمة منطوية بسطر واحد */
.old-week { margin: 14px 0 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.old-week > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; }
.old-week > summary::-webkit-details-marker { display: none; }
.old-week > summary::after { content: '‹'; margin-inline-start: auto; color: var(--muted); font-size: 1.2rem; transition: transform .2s; }
.old-week[open] > summary::after { transform: rotate(-90deg); }
.ow-t { font-weight: 700; }
.ow-s { color: var(--muted); font-size: .9rem; }
.old-week > .cards { padding: 0 10px 10px; }
/* 14/11: زرّين للسرعة «عادي / أبطأ» بالتلقين */
.p-pace .p-btn { min-width: 0; padding: 0 12px; font-size: .95rem; color: #CFC6B8; border-radius: 9px; height: 38px; }
.p-pace .p-btn[aria-pressed="true"] { background: #F3EEE4; color: #1C1A18; font-weight: 700; }
/* 14/11: «اسمع بصوت الاستوديو» تحت اللقطة */
.studio-btn { width: 100%; margin: 8px 0 0; min-height: 44px; }
.studio-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.studio-note { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }

/* 14/11: الدخول ببصمة الوجه أو الرمز */
.login .btn-big { width: 100%; }
.pin-row { display: flex; gap: 8px; margin-top: 12px; }
.pin-row input { flex: 1; min-height: 48px; font-size: 1.3rem; letter-spacing: .3em; text-align: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); }
.tok-old { margin: 18px 0; }
.tok-old > summary { cursor: pointer; color: var(--muted); }
/* 14/11: قائمة جودة الكاميرا ودليل التتبع فوق التلقين */
.sheet-back.cam-menu, .sheet-back.track-guide { z-index: 75; }
.p-track { min-width: 44px; font-size: 1.1rem; }
.tr-steps { margin: 8px 0; padding-inline-start: 22px; line-height: 2; }
/* 14/11: الحافظات و«⭐ تصوير الأسبوع» */
.card-li { position: relative; }
.card-move { position: absolute; top: 6px; inset-inline-end: 6px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 1.3rem; line-height: 1; }
.card-move:active, .card-move:hover { background: var(--bg); color: var(--ink); }
.card-li .card-head, .card-li .card h3 { padding-inline-end: 40px; }
.folder-row .btn-small, .move-list .btn { min-height: 44px; }
.move-week { width: 100%; min-height: 50px; justify-content: center; margin-top: 6px; }
.move-week.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mv-k { margin: 14px 0 0; font-weight: 700; }
.folder-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.folder-row .btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.move-list { display: grid; gap: 8px; margin: 10px 0; }
.move-list .btn { min-height: 48px; justify-content: center; }
.k-week { background: transparent; padding: 0 2px; }
/* ---------- 14/11: «🎤 مدرّبي» ---------- */
.sheet-back.co-done { z-index: 70; }
.coach-btn { display: flex; justify-content: center; width: 100%; margin-top: 8px; min-height: 46px; align-items: center; text-decoration: none; }
.coach { padding-bottom: 40px; }
.co-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 14px 0; }
.co-card h2 { margin: 4px 0 8px; font-size: 1.15rem; line-height: 1.5; }
.co-card p { margin: 6px 0; line-height: 1.8; }
.co-k { color: var(--muted); font-size: .85rem; margin: 0 !important; }
.co-topic { font-size: 1.3rem !important; }
.co-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.co-row .btn-big { flex: 1 1 180px; }
.co-how { margin: 6px 0; padding-inline-start: 22px; line-height: 1.9; }
.co-ex { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.co-small { color: var(--muted); font-size: .85rem; }
.co-empty { color: var(--muted); line-height: 1.9; }
.co-tip { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.co-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.co-stat { background: var(--bg); border-radius: 12px; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.co-stat b { font-size: 1.4rem; }
.co-stat span { font-size: .75rem; color: var(--muted); }
.co-stat.ok b { color: #3E7B4F; }
.co-d { font-size: .75rem !important; color: var(--muted); }
.co-d.up { color: #3E7B4F !important; } .co-d.down { color: #B5523B !important; }
.co-now { margin-top: 4px; }
.co-hist { list-style: none; padding: 0; margin: 8px 0; font-size: .85rem; }
.co-hist li { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr .8fr; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line); }
.co-lock, .co-lock body { overflow: hidden; }
.co-rec { position: fixed; inset: 0; z-index: 60; background: #000; color: #fff; display: flex; flex-direction: column; }
.co-cam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.co-rec-top, .co-rec-topic, .co-rec-bot { position: relative; z-index: 1; }
.co-rec-top { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) 14px 8px; }
.co-x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 1.1rem; }
.co-res { background: rgba(0,0,0,.45); border-radius: 8px; padding: 3px 8px; font-size: .8rem; }
.co-time { margin-inline-start: auto; background: rgba(0,0,0,.45); border-radius: 10px; padding: 4px 10px; font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.co-rec.on .co-time { background: #B5523B; }
.co-rec-topic { margin: 6px 16px; padding: 10px 14px; background: rgba(0,0,0,.45); border-radius: 14px; font-size: 1.1rem; line-height: 1.7; }
.co-rec-bot { margin-top: auto; display: flex; justify-content: center; padding: 16px 0 calc(env(safe-area-inset-bottom) + 22px); }
.co-recbtn { width: 76px; height: 76px; border-radius: 50%; border: 5px solid #fff; background: #D9473A; }
.co-rec.on .co-recbtn { border-radius: 22px; transform: scale(.8); }

.note-big { border: 2px solid var(--accent, #8A5532); }
@media (max-width: 420px) { .p-pace .p-btn { padding: 0 9px; font-size: .9rem; } }

/* ▦ المربعات + تتبع العيون (18/11/2026) */
.p-grid { position: absolute; z-index: 1; pointer-events: none; }
.p-grid .g-cells { position: absolute; inset: 0; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); }
.p-grid .g-cell { border: 1px solid rgb(255 255 255 / .38); background: transparent; padding: 0; margin: 0; border-radius: 0; pointer-events: none; transition: background .2s, border-color .2s; }
.p-grid .g-cell.chosen { border: 3px solid #F2C190; background: rgb(242 193 144 / .16); }
.prompter.grid-picking .g-status, .prompter.grid-picking .p-bar { visibility: hidden; }
.p-grid.ok .g-cell.chosen { border-color: #3DD68C; background: rgb(61 214 140 / .14); }
.p-grid .g-safe { position: absolute; inset-inline: 0; background: repeating-linear-gradient(135deg, rgb(229 72 77 / .16) 0 8px, transparent 8px 16px); display: grid; place-items: center; }
.p-grid .g-safe-top { top: 0; height: 10%; }
.p-grid .g-safe-bot { bottom: 0; height: 22%; }
.p-grid .g-safe span { font-size: .72rem; color: rgb(255 255 255 / .75); text-shadow: 0 1px 3px rgb(0 0 0 / .7); }
.p-grid .g-eye { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #F2C190; box-shadow: 0 0 0 2px rgb(0 0 0 / .45); }
.p-grid.ok .g-eye { background: #3DD68C; }
.prompter.recording .p-grid .g-safe span, .prompter.recording .p-grid .g-eye { display: none; }
.p-grid.picking { z-index: 6; pointer-events: auto; }
.prompter.grid-picking .p-top { z-index: 8; }
.p-grid.picking .g-cell { pointer-events: auto; cursor: pointer; border-color: rgb(255 255 255 / .7); }
.p-grid.picking .g-cell:active { background: rgb(242 193 144 / .3); }
.prompter.grid-picking .p-scroll, .prompter.grid-picking .p-line, .prompter.grid-picking .p-shade, .prompter.grid-picking .p-guide { visibility: hidden; }
.prompter.grid-picking .p-guide, .prompter.grid-on .p-guide { display: none !important; }
.g-status { position: absolute; z-index: 3; left: 50%; transform: translateX(-50%); bottom: calc(150px + env(safe-area-inset-bottom)); background: rgb(15 14 13 / .82); color: #F3EEE4; border: 1px solid #36312B; border-radius: 999px; padding: 7px 14px; font-size: .9rem; white-space: nowrap; pointer-events: none; }
.g-status.ok { background: rgb(22 70 46 / .9); border-color: #3DD68C; }
.prompter.recording .g-status, .prompter.playing .g-status { display: none; }
.g-pick { position: absolute; z-index: 7; inset-inline: 12px; bottom: calc(24px + env(safe-area-inset-bottom)); background: rgb(15 14 13 / .88); border: 1px solid #36312B; border-radius: 16px; padding: 12px; color: #F3EEE4; text-align: center; }
.g-pick p { margin: 0 0 10px; font-weight: 700; }
.g-pick-row { display: flex; gap: 8px; justify-content: center; }
.g-pick .g-done { background: #F2C190; color: #1A1816; border-color: #F2C190; font-weight: 700; }
.p-grid-btn svg { width: 22px; height: 22px; }
.p-grid-btn[aria-pressed="true"] { border-color: #F2C190; color: #F2C190; }
@media (max-width: 420px) { .p-grid-btn { min-width: 40px; } }

/* ▦ المربعات بكاميرا «مدرّبي» */
.co-grid svg { width: 22px; height: 22px; }
.co-grid[aria-pressed="true"] { color: #F2C190; box-shadow: inset 0 0 0 2px #F2C190; }
.co-rec.grid-picking .co-rec-top { z-index: 8; }
.co-rec.grid-picking .co-rec-topic, .co-rec.grid-picking .co-rec-bot, .co-rec.on .g-status { visibility: hidden; }
.co-rec.on .p-grid .g-eye, .co-rec.on .p-grid .g-safe span { display: none; }

/* 🎙️ فكرتي بصوتي (18/11/2026) */
.idea-help { color: var(--muted, #6B645B); margin: 4px 0 14px; line-height: 1.8; }
.idea-mic { width: 100%; min-height: 64px; font-size: 1.2rem; }
.idea-mic[aria-pressed="true"] { background: #E5484D; border-color: #E5484D; color: #fff; }
.idea-note { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: rgb(242 193 144 / .18); line-height: 1.8; }
.idea-live { min-height: 1.6em; margin: 10px 2px 6px; color: var(--muted, #6B645B); font-style: italic; }
.idea-text { width: 100%; box-sizing: border-box; font: inherit; font-size: 1.15rem; line-height: 1.9; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line, #DDD5C8); background: var(--surface); color: inherit; resize: vertical; }
.idea-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.idea-kinds .chip[aria-checked="true"] { background: var(--ink, #1A1816); color: var(--bg, #F6F3EC); }
.idea-save { width: 100%; min-height: 54px; }
.idea-h { font-size: 1.05rem; margin: 26px 0 8px; }
.idea-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.idea-item { border: 1px solid var(--line, #DDD5C8); border-radius: 14px; padding: 10px 12px; background: var(--surface); }
.idea-item.done { opacity: .7; }
.idea-body { margin: 0 0 6px; white-space: pre-wrap; line-height: 1.8; }
.idea-meta { margin: 0; font-size: .85rem; color: var(--muted, #6B645B); }
.idea-btn { margin-top: 8px; }
.idea-kinds .chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 0 14px; min-height: 44px; font: inherit; font-size: .95rem; }
.idea-item .link-btn { background: none; border: 0; padding: 6px 0 0; color: var(--muted); text-decoration: underline; font: inherit; font-size: .85rem; min-height: 36px; }

/* 🎧 الصوت و⚡ صلّح هسه (19/11/2026) */
.idea-rec { display: flex; gap: 8px; align-items: flex-start; margin: 4px 2px 10px; line-height: 1.7; font-size: .95rem; }
.idea-rec input { width: 20px; height: 20px; margin-top: 4px; flex: none; }
.idea-aud { margin: 0 2px 10px; padding: 8px 12px; border-radius: 12px; background: rgb(242 193 144 / .18); }
.idea-save-later { margin-top: 8px; }
.idea-acts { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.idea-acts .link-btn { min-height: 36px; }
.idea-aud .link-btn { background: none; border: 0; padding: 0 4px; color: var(--muted); text-decoration: underline; font: inherit; cursor: pointer; }
