[hidden] { display: none !important; } /* "hidden" wins over any display rule below */
:root {
  /* One palette for the whole app and the landing page: calm teal, a warm sun-yellow accent, soft surfaces. */
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e5e9f0;
  --accent: #0f766e;
  --accent-2: #14b8a6;
  --accent-soft: #e6f6f3;
  --sun: #f59e0b;
  --sun-soft: #fef3c7;
  --warn: #b45309;
  --warn-soft: #fff4e5;
  --danger: #dc2626;
  --done: #94a3b8;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 20px 50px rgba(15, 118, 110, .16);
  --sidebar: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --surface: #131c2e;
    --surface-2: #0f1727;
    --ink: #e5eaf3;
    --muted: #93a0b8;
    --line: #23304a;
    --accent: #2dd4bf;
    --accent-2: #5eead4;
    --accent-soft: #0f2f2d;
    --sun: #fbbf24;
    --sun-soft: #3a2e10;
    --warn: #fbbf24;
    --warn-soft: #33270f;
    --danger: #f87171;
    --done: #64748b;
    --shadow: none;
    --shadow-lg: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 'Nunito', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body { font-family: 'Tajawal', system-ui, sans-serif; }
h1 { font-size: 1.7rem; margin: 0; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; font-weight: 800; }
a { color: var(--accent); }
p { margin: 0; }

/* App shell: a sidebar on wide screens, a tab bar at the bottom on phones */
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 1.25rem; color: var(--accent); text-decoration: none; }
.brand .logo { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
body.app { padding-inline-start: var(--sidebar); }
.sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--sidebar); background: var(--surface);
  border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; padding: 20px 14px; z-index: 20; overflow-y: auto; }
.side-links, .side-end { display: flex; flex-direction: column; gap: 4px; }
.side-end { margin-top: auto; }
.side-links a, .side-end a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--muted);
  text-decoration: none; font-weight: 700; transition: background .15s, color .15s; }
.side-links a:hover, .side-end a:hover { background: var(--surface-2); color: var(--ink); }
.side-links a.active, .side-end a.active { background: var(--accent-soft); color: var(--accent); }
.side-links .ico, .side-end .ico, .tabbar .ico { width: 24px; text-align: center; font-size: 1.15rem; }
.side-links .count { margin-inline-start: auto; background: var(--sun); color: #fff; border-radius: 999px; font-size: .75rem; padding: 0 8px; }
.child-chip { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--sun-soft); font-weight: 800; }
.child-chip small { color: var(--muted); font-weight: 600; font-size: .8rem; }
.child-pick select { width: 100%; font-weight: 800; background: var(--sun-soft); border-color: transparent; }
.side-end .lang-toggle { justify-content: center; margin-top: 8px; }
.lang-toggle { border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; text-decoration: none; font-weight: 700; color: var(--ink); background: var(--surface); }
.muted-link { color: var(--muted); font-size: .9rem; }
.tabbar { display: none; }
@media (max-width: 420px) { .sidebar .brand > span { display: none; } }
@media (max-width: 860px) {
  body.app { padding-inline-start: 0; padding-bottom: 72px; }
  .sidebar { position: sticky; top: 0; width: auto; height: auto; flex-direction: row; align-items: center; padding: 10px 16px;
    border-inline-end: 0; border-bottom: 1px solid var(--line); overflow: visible; gap: 10px; }
  .sidebar .side-links, .sidebar .side-end a:not(.lang-toggle):not(.top-action) { display: none; }
  /* sign-in / log out stay reachable on phones: an icon button next to the language toggle */
  .sidebar .side-end a.top-action { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; gap: 6px; color: var(--ink); }
  .sidebar .side-end a.top-action .ico { width: auto; font-size: 1rem; }
  .sidebar .side-end a.top-action span:last-child { font-size: .85rem; }
  .sidebar .side-end { gap: 8px; align-items: center; }
  .sidebar .side-end { margin: 0; margin-inline-start: auto; flex-direction: row; }
  .sidebar .side-end .lang-toggle { margin: 0; }
  .brand .logo { width: 36px; height: 36px; }
  .child-chip { padding: 4px 12px; flex-direction: row; align-items: center; gap: 8px; font-size: .9rem; }
  .child-chip small { display: none; }
  .child-pick select { padding: 6px 10px; }
  .tabbar { display: flex; position: fixed; inset-inline: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .72rem; font-weight: 700; color: var(--muted);
    text-decoration: none; padding: 4px 6px; border-radius: 12px; min-width: 58px; }
  .tabbar a.active { color: var(--accent); background: var(--accent-soft); }
}

/* Sign-in pages */
.bare-head { max-width: 1100px; margin: 0 auto; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; }
.narrow-page { max-width: 520px; }
.auth-card { padding: 28px; }
.auth-card h1 { margin-bottom: 6px; }
.auth-card .stack { margin-top: 18px; }
.auth-switch { margin-top: 18px; text-align: center; font-weight: 600; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }
.mini-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 14px 0 0; }
.mini-steps li { flex: 1; font-size: .8rem; font-weight: 700; color: var(--muted); border-top: 4px solid var(--line); padding-top: 6px; }
.mini-steps li.on { color: var(--accent); border-color: var(--accent); }
.mini-steps li.done { color: var(--accent); border-color: var(--accent-2); }

.container { max-width: 1080px; margin: 0 auto; padding: 28px 24px 80px; }
@media (max-width: 600px) { .container { padding: 20px 16px 40px; } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.subtle { color: var(--muted); font-size: .92rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.narrow { max-width: 380px; margin: 40px auto; }
.empty { text-align: center; color: var(--muted); padding: 40px 18px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Forms */
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .92rem; }
input, select, textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { resize: vertical; }
.date-field { max-width: 220px; }

.btn {
  font: inherit; font-weight: 600; border: 1px solid transparent; border-radius: 10px;
  padding: 9px 18px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--line); }
.btn.small { padding: 5px 12px; font-size: .88rem; }
.btn.big { padding: 12px 28px; font-size: 1.05rem; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.loading::before {
  content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error { color: var(--danger); }
.success { color: var(--accent); font-weight: 600; }
.warn { color: var(--warn); font-weight: 500; }
.needs-input select { border-color: var(--warn); background: var(--warn-soft); }

/* Day navigation — arrows point the reading direction */
.day-nav { display: flex; gap: 6px; align-items: center; }
.day-nav input { width: auto; }
.day-nav .btn { padding: 6px 12px; font-size: 1.2rem; line-height: 1; }
[dir="rtl"] .flip { display: inline-block; transform: scaleX(-1); }

/* Summary */
.progress { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.progress .bar { flex: 1; min-width: 120px; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress .bar > div { height: 100%; background: var(--accent); transition: width .3s; }
.subject h2 { color: var(--accent); }
.subject { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 12px; }
.subject h2 { margin: 0; }
.subject-tools { justify-content: flex-end; margin-bottom: 10px; }
.subject > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.subject > summary::-webkit-details-marker { display: none; }
.subject > summary h2::before { content: '▸'; display: inline-block; margin-inline-end: 8px; transition: transform .2s; }
[dir="rtl"] .subject > summary h2::before { content: '◂'; }
.subject[open] > summary h2::before { transform: rotate(90deg); }
[dir="rtl"] .subject[open] > summary h2::before { transform: rotate(-90deg); }
.subject-counts { display: flex; gap: 10px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.subject-counts .all-done { color: var(--accent); }
.topics { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.topic { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 10px; font-size: .85rem; }
.subject[open] .topics { display: none; }
.subject[open] > summary { margin-bottom: 4px; }
.subject:not([open]) { gap: 0; }
.covered { margin: 6px 0 10px; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 8px; }
.covered li p { margin: 0; }
.covered .lesson-activity { margin-top: 6px; padding-top: 6px; }
.subject .field.hw { display: flex; flex-direction: column; gap: 8px; }
.field > .chip { display: inline-block; margin-top: 4px; }
.check .chip { display: inline-block; font-size: .75rem; padding: 0 8px; margin-inline-end: 4px; }
.entry { padding: 12px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.entry:first-of-type { border-top: 0; padding-top: 0; }
.chip { align-self: flex-start; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 12px; font-size: .85rem; font-weight: 600; }
.field .label { display: block; font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
[dir="rtl"] .field .label { text-transform: none; letter-spacing: 0; }
.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 1rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex-shrink: 0; accent-color: var(--accent); }
.check.is-done span { text-decoration: line-through; color: var(--done); }

/* Entry */
.item { display: flex; flex-direction: column; gap: 12px; }
.item [data-remove] { align-self: flex-end; }
.item-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sticky-save { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; }
.existing { list-style: none; margin: 0; padding: 0; }
.existing li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.existing li:first-child { border-top: 0; }

/* Archive */
.filters { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; flex-direction: column; gap: 8px; }
.timeline-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; flex-wrap: wrap; }

/* Catalog */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.catalog-grid .card { margin: 0; }
.book-list { margin: 0 0 12px; padding-inline-start: 20px; }
.inline-add { display: flex; flex-direction: column; gap: 6px; }
.name-edit { display: flex; flex-direction: column; gap: 6px; }
.name-edit .row { gap: 8px; align-items: center; }
.subject-edit { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.subject-edit input[name=name_ar] { font-weight: 600; font-size: 1.05rem; }
.book-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.flash { margin: 0 0 12px; }

@media (max-width: 640px) {
  .item-grid, .filters { grid-template-columns: 1fr; }
  .links { order: 3; flex-basis: 100%; }
  h1 { font-size: 1.35rem; }
}

/* WhatsApp */
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--line); color: var(--muted); vertical-align: middle; margin-inline-start: 6px; }
.badge.ok { background: var(--accent-soft); color: var(--accent); }
.badge.wait { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.code { direction: ltr; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow-x: auto; font-size: .9rem; }
#wa-qr { background: #fff; padding: 14px; border-radius: 12px; display: inline-block; margin-top: 10px; }
.group-list { display: flex; flex-direction: column; gap: 10px; }
.table-wrap { overflow-x: auto; }
.senders { width: 100%; border-collapse: collapse; }
.senders th { text-align: start; font-size: .8rem; color: var(--muted); padding: 6px 8px; }
.senders td { padding: 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.senders select { min-width: 140px; }
.senders input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.senders tr.is-ignored td:not(:last-child) { opacity: .45; }
.inbox { list-style: none; margin: 0; padding: 0; }
.inbox li { padding: 12px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.inbox li:first-child { border-top: 0; }
.inbox-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inbox-head .badge { margin: 0; }
.inbox-text { white-space: normal; }
.small-text { font-size: .85rem; }
.notice { background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; }
.mode-row { display: flex; gap: 18px; flex-wrap: wrap; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
h3 { font-size: 1rem; margin: 0 0 6px; }
.relink { margin-top: 10px; }
.relink summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.relink p { margin: 6px 0 10px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.thumbs a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.thumbs img { display: block; width: 120px; height: 120px; object-fit: cover; }
@media (max-width: 640px) { .thumbs img { width: 96px; height: 96px; } }
.senders .name-input { min-width: 150px; font-weight: 600; }
.sender-links { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.sender-link { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sender-link select { min-width: 130px; flex: 1; }
.thumbs video { display: block; width: 240px; max-width: 100%; height: 160px; border-radius: 10px; background: #000; border: 1px solid var(--line); }
@media (max-width: 640px) { .thumbs video { width: 100%; height: auto; } }
.steps { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 8px; }
.steps li { display: list-item; }
.steps .bar { margin-top: 6px; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; max-width: 420px; }
.steps .bar > div { height: 100%; background: var(--accent); transition: width .3s; }
.steps li.is-done { color: var(--muted); }
.narrow-form { max-width: 360px; }
.choice { border: 0; padding: 0; margin: 0; display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.choice legend { padding: 0; margin-bottom: 6px; }
.choice label { display: inline-flex; gap: 6px; align-items: center; }
/* AI activities */
.activity h2 { margin-top: 0; }
.preview { display: flex; gap: 14px; flex-wrap: wrap; margin: 6px 0 10px; }
.pic { margin: 0; width: 120px; text-align: center; }
.pic-art { position: relative; height: 96px; display: flex; align-items: center; justify-content: center; gap: 2px; background: var(--accent-soft); border-radius: 16px; }
.pic-art img { max-height: 80px; max-width: 80px; }
.pic-art .times { position: absolute; bottom: 4px; inset-inline-end: 8px; font-weight: 700; }
.pic figcaption { font-weight: 700; margin-top: 4px; }
.note { background: var(--warn-soft); border-radius: 10px; padding: 8px 12px; }
.build-steps { margin-top: 12px; }
.build-steps li.is-active { font-weight: 700; }
.lesson-activity { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }
.lesson-activity-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* A lesson's activities: one card per line, always in the same order, each with its own colour and picture. */
.act-card { --k: #0f766e; --k-soft: #e6f6f3; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px;
  background: var(--surface); border: 1px solid var(--line); border-inline-start: 5px solid var(--k); border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow); }
.act-card.kind-lesson { --k: #4f46e5; --k-soft: #eef0ff; }
.act-card.kind-learn { --k: #0f766e; --k-soft: #e3f5f1; }
.act-card.kind-talk { --k: #db2777; --k-soft: #fde9f3; }
.act-card.kind-memory { --k: #7c3aed; --k-soft: #f1e9ff; }
.act-card.kind-find { --k: #ea580c; --k-soft: #ffeedd; }
@media (prefers-color-scheme: dark) {
  .act-card.kind-lesson { --k: #818cf8; --k-soft: #1e2347; }
  .act-card.kind-learn { --k: #2dd4bf; --k-soft: #0f2f2d; }
  .act-card.kind-talk { --k: #f472b6; --k-soft: #3a1529; }
  .act-card.kind-memory { --k: #a78bfa; --k-soft: #2a1d4a; }
  .act-card.kind-find { --k: #fb923c; --k-soft: #3a2010; }
}
.act-logo { width: 52px; height: 52px; border-radius: 15px; background: var(--k-soft); display: grid; place-items: center; font-size: 28px; line-height: 1; }
.act-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.act-text b { font-size: 1.02rem; color: var(--ink); }
.act-topic { color: var(--muted); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-text .badge { align-self: flex-start; }
.act-actions { display: flex; align-items: center; gap: 6px; }
.act-play { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--k); color: #fff; font-weight: 800; text-decoration: none; white-space: nowrap; transition: transform .12s, filter .12s; }
@media (prefers-color-scheme: dark) { .act-play { color: #0b1120; } }
.act-play:hover { filter: brightness(1.06); }
.act-play:active { transform: scale(.96); }
.act-play.locked { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.act-gear { text-decoration: none; padding: 6px; opacity: .7; }
.act-card.kind-spell { --k: #0284c7; --k-soft: #e0f2fe; }
.act-card.kind-write { --k: #ca8a04; --k-soft: #fef6d8; }
@media (prefers-color-scheme: dark) {
  .act-card.kind-spell { --k: #38bdf8; --k-soft: #0c2a3d; }
  .act-card.kind-write { --k: #facc15; --k-soft: #332a0c; }
}
.act-card.not-ready { opacity: .7; box-shadow: none; }
@media (max-width: 420px) {
  .act-card { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 4px 10px; padding: 10px; }
  .act-logo { width: 44px; height: 44px; font-size: 24px; border-radius: 13px; }
  .act-play { width: 48px; height: 48px; padding: 0; font-size: 1.1rem; }
  .act-play span { display: none; }
}
.voice-choice { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.voice-choice audio { height: 36px; max-width: 100%; }
.kind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 8px; }
.kind-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card, #fff); cursor: pointer; font: inherit; color: inherit; }
.kind-card:hover { border-color: var(--accent); }
.kind-card:disabled { opacity: .5; }
.kind-icon { font-size: 1.8rem; }

/* revision: what the child should know, per subject */
.subject-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.subject-tabs .chip { text-decoration: none; padding: 6px 16px; font-size: 1rem; }
.subject-tabs .chip.active { background: var(--accent); color: #fff; }
.subject-tabs.books .chip { font-size: .85rem; padding: 3px 12px; }
.view-switch { margin-bottom: 14px; gap: 8px; }
.revision-summary p { margin: 0; font-size: 1.05rem; line-height: 1.7; }
.revision-section h2 { margin-top: 0; }
.know-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.know { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-soft); border-radius: 14px; padding: 10px 12px; }
.know img { width: 44px; height: 44px; flex-shrink: 0; }
.know-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.know-text strong { font-size: 1.15rem; overflow-wrap: anywhere; }
.know-text small a { color: inherit; }
.kind-letters .know-text strong { font-size: 1.6rem; }
.examples { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.ex { background: var(--card, #fff); border-radius: 999px; padding: 0 8px; font-size: .85rem; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Cards and the account, children, schools and admin pages */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.grid-cards .card { margin: 0; }
.child-card { display: flex; flex-direction: column; gap: 12px; }
.child-card .avatar { width: 64px; height: 64px; border-radius: 20px; background: var(--sun-soft); display: grid; place-items: center; font-size: 2.2rem; }
.school-card .stats { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 10px 0 14px; font-weight: 700; color: var(--muted); font-size: .9rem; }
.school-card.inactive { opacity: .6; }
.narrow-form-card { max-width: 640px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; margin-bottom: 16px; }
.settings-grid .card { margin: 0; }
.school-pick { margin-bottom: 14px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.stat b { font-size: 1.8rem; color: var(--accent); line-height: 1.1; }
.stat span { color: var(--muted); font-weight: 700; font-size: .9rem; }
.stat.hot b { color: var(--sun); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: start; color: var(--muted); font-size: .8rem; font-weight: 800; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table select { padding: 4px 8px; }
.plan-now { display: flex; gap: 16px; align-items: center; }
.plan-now .plan-badge { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 1.8rem; background: var(--accent-soft); flex-shrink: 0; }
.plan-now.is-premium .plan-badge { background: var(--sun-soft); }
.plan-now h2 { margin: 0; }
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; margin-bottom: 16px; }
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); position: relative; }
.price-card.featured { border: 2px solid var(--accent); box-shadow: var(--shadow-lg); }
.price-card h3 { margin: 0 0 6px; font-size: 1.2rem; }
.price-card .price { font-size: 2rem; font-weight: 800; color: var(--ink); line-height: 1.2; }
.price-card .price small { font-size: .9rem; color: var(--muted); font-weight: 700; }
.price-card ul { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 8px; }
.price-card li::before { content: '✓'; color: var(--accent); font-weight: 900; margin-inline-end: 8px; }

/* "Install as an app" banner */
.banner-stack { position: fixed; z-index: 40; inset-inline: 16px; bottom: 16px; max-width: 520px; margin-inline: auto; display: flex; flex-direction: column; gap: 10px; }
.pwa-banner { display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow-lg); animation: pwa-in .3s ease-out; }
.pwa-banner img { width: 44px; height: 44px; flex-shrink: 0; }
.pwa-banner div { flex: 1; min-width: 0; }
.pwa-banner b { display: block; }
.pwa-banner p { color: var(--muted); font-size: .88rem; }
.pwa-actions { display: flex; align-items: center; gap: 6px; }
.pwa-later { border: 0; background: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: 6px; }
@media (max-width: 860px) { .banner-stack { bottom: calc(80px + env(safe-area-inset-bottom)); } }
@keyframes pwa-in { from { transform: translateY(20px); opacity: 0; } }

/* Activity page: the English/French words, to listen to and approve */
.word-check { margin: 16px 0; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; background: var(--surface-2); }
.word-check summary { cursor: pointer; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.word-check .badge.warn { background: var(--sun-soft); color: #92400e; }
.word-check .badge.ok { background: var(--accent-soft); color: var(--accent); }
.word-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.word-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 10px; }
.word-list li.is-check { border-color: var(--sun); }
.word-list .word { font-weight: 800; font-size: 1.05rem; }
.word-list .acts { margin-inline-start: auto; display: flex; gap: 6px; }
.word-list .icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; cursor: pointer; font-size: .95rem; }

/* Today's review (the word bank) */
.review-today { display: flex; align-items: center; gap: 14px; }
.review-today .review-icon { font-size: 2rem; }
.review-today > div { flex: 1; }
.review-today p { margin: 2px 0 0; }
.path-today { display: flex; flex-direction: column; gap: 12px; border: 2px solid var(--accent); }
.path-head { display: flex; align-items: center; gap: 14px; }
.path-head p { margin: 2px 0 0; }
.path-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.path-steps span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem; background: var(--line); opacity: .75; }
.path-steps span.done { background: #d8f3e3; opacity: 1; box-shadow: inset 0 0 0 2px #33b679; }
.path-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.path-go { font-size: 1.1rem; padding-inline: 22px; }

/* 📈 Progress */
.skill-bars { display: flex; flex-direction: column; gap: 10px; }
.skill-bar .bar { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.skill-bar .bar > div { height: 100%; background: var(--accent); }
.skill-bar { display: grid; grid-template-columns: minmax(150px, 13em) 1fr auto; align-items: center; gap: 12px; }
@media (max-width: 640px) { .skill-bar { grid-template-columns: 1fr auto; } .skill-bar .bar { grid-column: 1 / -1; order: 3; } }
.hw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.hw-card { margin: 0; border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.hw-card figcaption { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.hw-card figcaption strong { font-size: 1.5rem; }
.hw-pair { display: flex; gap: 8px; }
.hw-pair > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.hw-svg { width: 100%; height: 110px; background: #fffdf9; border-radius: 10px; } /* paper, in both themes */
.word-progress { list-style: none; margin: 0; padding: 0; }
.word-progress li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.word-progress li:first-child { border-top: 0; }
.game-results { list-style: none; margin: 0; padding: 0; }
.game-results li { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 4px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.game-results li:first-child { border-top: 0; }
.gr-kind { font-size: 1.5rem; text-align: center; }
.gr-text { display: flex; flex-direction: column; min-width: 0; }
.gr-stats { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.wp-pic img { width: 40px; height: 40px; object-fit: contain; }
.wp-word { font-weight: 700; font-size: 1.1rem; }
.wp-word { display: flex; flex-direction: column; gap: 3px; }
.wp-ladder { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; font-weight: 400; }
.wp-ladder i { width: 14px; height: 6px; border-radius: 3px; background: var(--line); }
.wp-ladder i.passed { background: #33b679; }
.wp-ladder i.now { background: #fda41c; }
.wp-ladder small { font-size: .72rem; color: var(--muted, #6b7280); margin-inline-start: 4px; }
.wp-skills { display: flex; gap: 4px; }
@media (max-width: 640px) { .word-progress li { grid-template-columns: 40px minmax(0, 1fr) auto; } .wp-due { grid-column: 2 / -1; } }
.skill-chip { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: .85rem; border: 2px solid transparent; }
.skill-chip.lv-new { background: var(--surface-2); border-color: var(--line); opacity: .75; }
.skill-chip.lv-learning { background: var(--sun-soft); border-color: var(--sun); }
.skill-chip.lv-solid { background: var(--accent-soft); border-color: var(--accent-2); }
.skill-chip.lv-known { background: var(--accent-2); border-color: var(--accent); }
.legend .skill-chip { width: 18px; height: 18px; font-size: .6rem; vertical-align: middle; }

/* Help & messages (views/help.php): the WhatsApp button, the conversation, the inbox list, and the day's notes. */
.wa-btn { background: #25d366; color: #fff; border-color: #25d366; }
.wa-btn:hover { background: #1fb457; color: #fff; }
.help-card .wa-btn { width: 100%; justify-content: center; margin-top: 14px; }
.or-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 18px 0 0; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.chat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.chat li { max-width: 85%; padding: 10px 14px; border-radius: 16px; background: var(--line); }
.chat li.mine { align-self: flex-end; background: var(--accent-soft); }
.chat li.theirs { align-self: flex-start; }
.chat .who { display: block; font-size: .75rem; color: var(--muted); margin-bottom: 2px; }
.chat p { margin: 0; white-space: normal; overflow-wrap: anywhere; }
.chat-reply { margin-top: 14px; }
.help-who p { margin: 0 0 6px; }
.help-who .row { margin-top: 10px; flex-wrap: wrap; gap: 8px; }
.thread-list { list-style: none; margin: 0; padding: 0; }
.thread-list li + li { border-top: 1px solid var(--line); }
.thread-list a { display: flex; flex-direction: column; gap: 3px; padding: 10px 4px; color: inherit; text-decoration: none; }
.thread-list li.unread a { font-weight: 700; }
.thread-list li.unread .tl-top::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--sun); margin-inline-end: 6px; }
.tl-last { color: var(--muted); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-card { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; border: 2px solid var(--sun); }
.note-card span { flex: 1; }
.note-card .count { background: var(--sun); color: #fff; border-radius: 999px; font-size: .75rem; padding: 0 8px; margin-inline-start: 6px; }
.renew-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border: 2px solid var(--sun); }
.renew-card > div { flex: 1; min-width: 180px; }
.renew-card p { margin: 2px 0 0; }
.renew-card.ended { border-color: var(--danger); }
.lp-contact a { color: inherit; }
@media (max-width: 560px) { .help-card .two, .narrow-form .two { grid-template-columns: 1fr; } }

/* The admin's visitor statistics (views/visitors.php). */
.visits-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.visits-card { display: flex; flex-direction: column; gap: 2px; }
.visits-card b { font-size: 2rem; line-height: 1.1; color: var(--accent); }
.visits-chart { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; align-items: end; height: 220px; padding-top: 18px; direction: ltr; }
.vc-col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.vc-bar { width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--accent); opacity: .85; }
.vc-col:hover .vc-bar { opacity: 1; }
.vc-num { font-size: .62rem; color: var(--muted); }
.vc-signup, .vc-legend { color: #fda41c; font-size: .7rem; line-height: 1; }
.vc-legend { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--accent); vertical-align: middle; }
.vc-day { font-size: .58rem; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; max-width: 100%; }
.visits-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 4px; }
.visits-list { list-style: none; margin: 0; padding: 0; }
.visits-list li { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 7px 8px; border-radius: 8px; overflow: hidden; }
.visits-list li > * { position: relative; z-index: 1; }
.vl-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visits-list li > .vl-bar { position: absolute; inset-block: 0; inset-inline-start: 0; z-index: 0; background: var(--accent-soft); border-radius: 8px; }
@media (max-width: 720px) {
  .visits-cards { grid-template-columns: 1fr; }
  .visits-lists { grid-template-columns: 1fr; }
  .visits-chart { height: 170px; gap: 1px; }
  .vc-num, .vc-day { display: none; }
}

/* Moving between pages (with assets/nav-loader.js): the new page fades in where the browser can (Chrome, Edge…). */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .16s ease both; }
::view-transition-new(root) { animation: vt-in .26s ease both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

/* Compact headers on phones: the language button as "EN"/"ع", sign-out as a round icon, smaller logo and child chip. */
.lt-short { display: none; }
@media (max-width: 860px) {
  .sidebar { padding: 8px 12px; gap: 8px; }
  .sidebar .brand { font-size: 1.02rem; gap: 6px; }
  .brand .logo { width: 32px; height: 32px; }
  .child-chip { padding: 3px 10px; font-size: .82rem; border-radius: 999px; }
  .lang-toggle { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; font-size: .78rem; line-height: 1; }
  .lt-long { display: none; }
  .lt-short { display: inline; }
  .sidebar .side-end { gap: 6px; }
  .sidebar .side-end a.top-action { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 50%; }
  .sidebar .side-end a.top-action span:last-child { display: none; }
  .bare-head { padding: 10px 14px; }
}

/* Phones: "More" in the bottom bar opens a sheet with every page that doesn't fit in the bar. */
.more-sheet { display: none; }
@media (max-width: 860px) {
  .tabbar a, .tabbar .tab-more { position: relative; }
  .tabbar .tab-more { display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; font-size: .72rem; font-weight: 700;
    color: var(--muted); background: none; border: 0; padding: 4px 6px; border-radius: 12px; min-width: 58px; cursor: pointer; }
  .tabbar .tab-more.active, .tabbar .tab-more[aria-expanded="true"] { color: var(--accent); background: var(--accent-soft); }
  .tab-count { position: absolute; top: 0; inset-inline-end: 8px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
    background: var(--sun); color: #fff; font-size: .66rem; line-height: 17px; text-align: center; }
  .more-sheet:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 19; background: rgba(15, 23, 42, .38); animation: more-fade .2s ease; }
  .more-panel { position: absolute; inset-inline: 0; bottom: 0; padding: 10px 14px calc(86px + env(safe-area-inset-bottom));
    background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .15); animation: more-up .25s ease; }
  .more-grip { display: block; width: 44px; height: 5px; border-radius: 99px; background: var(--line); margin: 0 auto 12px; }
  .more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .more-grid a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 16px;
    background: var(--surface-2); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .85rem; text-align: center; }
  .more-grid a .ico { font-size: 1.6rem; width: auto; }
  .more-grid a.active { background: var(--accent-soft); color: var(--accent); }
  .more-grid a .count { position: absolute; top: 6px; inset-inline-end: 8px; background: var(--sun); color: #fff; border-radius: 999px; font-size: .7rem; padding: 0 7px; }
  body.sheet-open { overflow: hidden; }
}
@keyframes more-up { from { transform: translateY(100%); } }
@keyframes more-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .more-sheet:not([hidden]), .more-panel { animation: none; } }
/* (The install / notification banners step aside while the "More" sheet is open.) */
body.sheet-open .banner-stack { display: none; }

/* The admin's parents (views/admin.php): a card each, two per row on wide screens, one on phones. */
.parent-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.parent-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.pc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pc-head .badge { margin: 0; white-space: nowrap; flex: none; }
.pc-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pc-who strong { font-size: 1.02rem; }
.pc-who span, .pc-who a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: end; }
.pc-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.pc-facts div { background: var(--surface); border-radius: 10px; padding: 6px 8px; min-width: 0; }
.pc-facts dt { font-size: .72rem; color: var(--muted); }
.pc-facts dd { margin: 2px 0 0; font-weight: 700; font-size: .88rem; overflow-wrap: anywhere; }
.pc-actions { display: flex; gap: 8px; align-items: center; }
.pc-actions select { flex: 1; min-width: 0; }
@media (max-width: 760px) { .parent-cards { grid-template-columns: 1fr; } }

/* The admin's latest visitors (views/visitors.php): a card each, robots dimmed. */
.visit-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.visit-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); min-width: 0; }
.visit-card.is-robot { opacity: .72; }
.vcard-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vcard-head .badge { margin: 0; }
.vcard-facts { display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.vcard-facts code { display: block; font-size: .72rem; color: var(--muted); white-space: normal; margin-top: 4px; }
.vcard-trail { margin: 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 2px; color: var(--muted); }
.vcard-trail span { font-variant-numeric: tabular-nums; color: var(--ink); }
@media (max-width: 760px) { .visit-cards { grid-template-columns: 1fr; } }

/* The admin's students (views/students.php): a card per child, two per row on wide screens. */
.usage-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.usage-card { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.uc-head { display: flex; align-items: center; gap: 10px; }
.uc-avatar { font-size: 1.8rem; }
.uc-who { display: flex; flex-direction: column; min-width: 0; }
.uc-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.uc-facts dd small { font-weight: 400; }
.uc-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.uc-kinds .chip b { margin-inline-start: 4px; }
.uc-sessions summary { cursor: pointer; color: var(--accent); font-weight: 700; font-size: .9rem; }
.uc-sessions ul { list-style: none; margin: 8px 0 0; padding: 0; }
.uc-sessions li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: .86rem; }
.us-what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.us-meta { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.us-meta .badge { margin: 0; }
@media (max-width: 860px) { .usage-cards { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .uc-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .uc-sessions li { grid-template-columns: 1fr auto; }
  .uc-sessions li > .subtle { grid-column: 1 / -1; }
}

/* The admin's news (views/news.php) and the families' news cards on "Today". */
.news-list { display: flex; flex-direction: column; gap: 10px; }
.news-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.news-item p { margin: 6px 0; }
.ni-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ni-head .badge { flex: none; margin: 0; }
.ni-actions { flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.ni-actions form { margin: 0; }
.news-card { position: relative; display: flex; gap: 12px; align-items: flex-start; border: 2px solid var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); transition: opacity .25s, transform .25s; }
.news-card.closing { opacity: 0; transform: translateY(-6px); }
.news-card .news-icon { font-size: 1.8rem; line-height: 1; }
.news-card > div { flex: 1; min-width: 0; }
.news-card p { margin: 4px 0 8px; }
.news-close { position: absolute; top: 8px; inset-inline-end: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--surface); color: var(--muted); cursor: pointer; font-size: .9rem; }
.news-card > div { padding-inline-end: 28px; }

/* The admin's live presence (views/admin.php, presence.php). */
.live-now { border: 2px solid #33b679; }
.live-list { display: flex; flex-wrap: wrap; gap: 8px; }
.live-chip { background: #e3f8ec; color: #136c43; border-radius: 999px; padding: 4px 12px; font-size: .88rem; }
.presence { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: .78rem; color: var(--muted); }
.presence i { width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; flex: none; }
.presence.pr-online i { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .25); animation: pr-pulse 1.6s infinite; }
.presence.pr-online .pr-text { color: #15803d; font-weight: 800; }
.presence.pr-recent i { background: #f59e0b; }
.presence .pr-page:empty, .presence .pr-play:empty { display: none; }
.presence .pr-play { color: #7c3aed; font-weight: 700; }
@keyframes pr-pulse { 50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); } }
@media (prefers-reduced-motion: reduce) { .presence.pr-online i { animation: none; } }
.pc-who .presence, .pc-who .presence span { white-space: normal; text-align: start; overflow: visible; }
