/* ===========================================================================
   Pingwire — Telegram-style APP skin (authenticated pages ONLY).

   Loaded via render_app_skin() AFTER style.css, and every rule is scoped
   under .app-body — the public marketing/SEO pages never load this file and
   never carry that class, so they are pixel-identical with or without it.

   ACCENT SWAP: --accent below is the single token that shifts the whole
   app's accent (buttons, FAB, badges, outgoing bubbles, links derive from
   it). Default is the Pingwire brand indigo #6366F1 (PORTFOLIO-DESIGN-SYSTEM
   §6.1). TELEGRAM-STYLE OPTION: set it to a messaging blue e.g. #3390EC —
   that one change re-accents everything.
   =========================================================================== */

/* ---------- Tokens: dark (primary theme) ---------- */
.app-body {
  --accent: #6366F1;            /* ← the ONE swappable accent token */
  --accent-contrast: #ffffff;
  --accent-hover: #4F46E5;
  --accent-text: #818CF8;       /* accent for TEXT on dark surfaces (a11y) */
  --accent-soft: rgba(99, 102, 241, .16);

  --bg: #0E1621;
  --bg-dark: #0E1621;
  --surface: #17212B;
  --surface-2: #1F2C3A;
  --surface-3: #26374A;
  --surface-raised: #1F2C3A;
  --divider: rgba(255, 255, 255, .06);
  --border: var(--divider);
  --border-dark: var(--divider);
  --border-strong: rgba(255, 255, 255, .12);
  --text: #FFFFFF;
  --text-dark: #FFFFFF;
  --muted: #8D9AA6;
  --text-muted: #8D9AA6;
  --bubble-in: #1F2C3A;
  --bubble-out: #4A54B8;        /* accent, slightly desaturated */
  --bubble-out-text: #FFFFFF;

  /* Existing component rules key off these — remapping them inside .app-body
     re-skins every legacy rule without touching style.css. */
  --primary: var(--accent);
  --primary-dark: var(--accent-hover);
  --accent-ui: var(--accent);

  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-pill: 999px; --r-bubble: 16px;
  --radius-card: var(--r-md);
  --radius-bubble: var(--r-bubble);
  --radius-sm: var(--r-sm); --radius-md: var(--r-md); --radius-lg: var(--r-lg);

  --shadow-fab: 0 6px 18px rgba(0, 0, 0, .4);
  --motion: 180ms ease;

  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.35;
  background: var(--bg);
  color: var(--text);
}

/* ---------- Tokens: light theme (data-theme flips it; toggle in app-skin.js) ---------- */
.app-body[data-theme="light"] {
  --bg: #FFFFFF;
  --bg-dark: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F1F3F5;
  --surface-3: #E7EAEE;
  --surface-raised: #FFFFFF;
  --divider: #E7EAEC;
  --border-strong: #D5DADF;
  --text: #0B1620;
  --text-dark: #0B1620;
  --muted: #707579;
  --text-muted: #707579;
  --accent-text: #4F46E5;
  --bubble-in: #F1F3F5;
  --bubble-out: #E7E9FD;        /* accent tint */
  --bubble-out-text: #0B1620;
  --shadow-fab: 0 6px 18px rgba(11, 22, 32, .18);
}
/* Legacy app rules hardcode white text in a few spots — bring them back to
   tokens so light theme stays readable. */
.app-body[data-theme="light"] .conv-item__name,
.app-body[data-theme="light"] .chat__header-name,
.app-body[data-theme="light"] .chat__list-head h2,
.app-body[data-theme="light"] .msg__title,
.app-body[data-theme="light"] h1, .app-body[data-theme="light"] h2, .app-body[data-theme="light"] h3,
.app-body[data-theme="light"] .app-topbar .brand__name,
.app-body[data-theme="light"] .app-topbar__nav a.is-active,
.app-body[data-theme="light"] .text-strong { color: var(--text); }
.app-body[data-theme="light"] .app-topbar__nav a:hover { color: var(--text); }
.app-body[data-theme="light"] .field input, .app-body[data-theme="light"] .field select,
.app-body[data-theme="light"] .field textarea { background: var(--surface-2); color: var(--text); border-color: var(--divider); }

/* ---------- Base rhythm ---------- */
.app-body h1 { font-size: 1.35rem; }
.app-body h2 { font-size: 1.05rem; font-weight: 600; }
.app-body .panel-lead, .app-body .card__desc { font-size: .9rem; }
.app-body .app-topbar { background: var(--surface); border-bottom: 1px solid var(--divider); }
.app-body a { color: var(--accent-text); }
.app-body .app-topbar__nav a { color: var(--muted); }

/* ---------- Buttons: pill, calm motion ---------- */
.app-body .btn { border-radius: var(--r-pill); transition: background var(--motion), transform var(--motion), box-shadow var(--motion), opacity var(--motion); }
.app-body .btn--primary { background: var(--accent); color: var(--accent-contrast); }
.app-body .btn--primary:hover { background: var(--accent-hover); box-shadow: none; }
.app-body .btn--ghost { color: var(--text); border-color: var(--border-strong); }
.app-body .btn:hover { transform: none; }
.app-body .btn:active { transform: scale(.97); }
.app-body :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Cards → section cards ---------- */
.app-body .card, .app-body .modal-card {
  background: var(--surface); border: 1px solid var(--divider);
  border-radius: var(--r-md); box-shadow: none;
}

/* ---------- Avatars: circular, deterministic gradient fills ---------- */
.app-body .avatar { border-radius: 50%; background: var(--surface-3); font-size: .95rem; }
.app-body .avatar--g0 { background: linear-gradient(135deg, #FF885E, #FF516A); }
.app-body .avatar--g1 { background: linear-gradient(135deg, #FFCD6A, #FFA85C); }
.app-body .avatar--g2 { background: linear-gradient(135deg, #82B1FF, #665FFF); }
.app-body .avatar--g3 { background: linear-gradient(135deg, #A0DE7E, #54CB68); }
.app-body .avatar--g4 { background: linear-gradient(135deg, #53EDD6, #28C9B7); }
.app-body .avatar--g5 { background: linear-gradient(135deg, #72D5FD, #2A9EF1); }
.app-body .avatar--g6 { background: linear-gradient(135deg, #E0A2F3, #D669ED); }

/* ---------- Chat list: search pill + breathing two-line rows ---------- */
.app-body .chat__list { border-right: 1px solid var(--divider); }
.app-body .chat__list-head { border-bottom: 0; padding-bottom: var(--s2); }
.app-body .chat__search input {
  min-height: 40px; border-radius: var(--r-pill); background: var(--surface-2);
  border: 1px solid transparent; padding: var(--s2) var(--s4); text-align: left;
}
.app-body .chat__search input:focus { border-color: var(--accent); box-shadow: none; background: var(--bg); }
.app-body .conv-item {
  align-items: center; min-height: 70px; padding: var(--s3) var(--s4);
  border-bottom: 0; position: relative; transition: background var(--motion);
}
.app-body .conv-item::after { /* inset divider that starts after the avatar */
  content: ""; position: absolute; left: 68px; right: 0; bottom: 0; height: 1px; background: var(--divider);
}
.app-body .conv-item:last-child::after { display: none; }
.app-body .conv-item .avatar { width: 48px; height: 48px; font-size: 1.1rem; }
.app-body .conv-item__name { font-size: 16px; color: var(--text); }
.app-body .conv-item__time { font-size: 12px; }
.app-body .conv-item__preview { font-size: 14px; margin-top: 2px; }
.app-body .conv-item.is-active { background: var(--accent); }
.app-body .conv-item.is-active::after { display: none; }
.app-body .conv-item.is-active .conv-item__name,
.app-body .conv-item.is-active .conv-item__preview,
.app-body .conv-item.is-active .conv-item__time { color: var(--accent-contrast); }
.app-body .conv-item__unread {
  background: var(--accent); align-self: center; min-width: 22px; height: 22px;
  border-radius: var(--r-pill); font-size: 12px;
}
.app-body .conv-item.is-active .conv-item__unread { background: rgba(255,255,255,.28); }
.app-body .conv-type-pill { border-radius: var(--r-pill); border-color: transparent; background: var(--accent-soft); color: var(--accent-text); }
.app-body .conv-item.is-active .conv-type-pill { background: rgba(255,255,255,.22); color: #fff; }

/* ---------- Thread: date pill, bubbles with tails, ticks, composer ---------- */
.app-body .chat__header { border-bottom: 1px solid var(--divider); }
.app-body .date-pill {
  align-self: center; margin: var(--s2) 0; padding: 3px 12px;
  background: rgba(0, 0, 0, .28); color: #fff;
  border-radius: var(--r-pill); font-size: 13px; user-select: none;
}
.app-body[data-theme="light"] .date-pill { background: rgba(11, 22, 32, .35); }

.app-body .msg { max-width: 78%; }
.app-body .msg__bubble {
  position: relative; background: var(--bubble-in); border: 0;
  border-radius: var(--r-bubble); border-bottom-left-radius: 4px;
  padding: var(--s2) var(--s3) 6px;
}
.app-body .msg__bubble::before { /* tail on the outer bottom corner */
  content: ""; position: absolute; bottom: 0; left: -5px; width: 10px; height: 12px;
  background: inherit; clip-path: path("M10 0 C10 7 6 11 0 12 L10 12 Z");
}
.app-body .msg--mine .msg__bubble {
  background: var(--bubble-out); border-radius: var(--r-bubble); border-bottom-right-radius: 4px;
}
.app-body .msg--mine .msg__bubble::before { left: auto; right: -5px; transform: scaleX(-1); }
.app-body .msg--system .msg__bubble::before, .app-body .feed-msg .msg__bubble::before { display: none; }
.app-body .msg--mine .msg__body, .app-body .msg--mine .msg__title { color: var(--bubble-out-text); }
.app-body[data-theme="light"] .msg--mine .msg__meta { color: rgba(11, 22, 32, .55); }
.app-body .msg__sender { color: var(--accent-text); }
.app-body .msg__body a { color: var(--accent-text); }
.app-body .msg--mine .msg__body a { color: var(--bubble-out-text); text-decoration: underline; }
.app-body .msg__meta { justify-content: flex-end; margin-top: 2px; font-size: 11px; }
.app-body .msg__ticks { letter-spacing: -2px; }
.app-body .msg__ticks--read { color: #6FE0F6; }
.app-body[data-theme="light"] .msg__ticks--read { color: var(--accent-hover); }

.app-body .composer {
  padding: var(--s2) var(--s3) calc(var(--s2) + env(safe-area-inset-bottom, 0px));
  background: var(--surface); border-top: 1px solid var(--divider);
  display: flex; align-items: flex-end; gap: var(--s2);
}
.app-body .composer textarea {
  background: var(--surface-2); border: 1px solid transparent; border-radius: var(--r-lg);
  padding: 11px var(--s4); color: var(--text); min-height: 44px; max-height: 140px;
  transition: border-color var(--motion);
}
.app-body .composer textarea:focus { outline: none; border-color: var(--accent); }
.app-body .composer__btn {
  width: 46px; height: 46px; min-width: 46px; border-radius: 50%; border: 0;
  background: var(--accent); color: var(--accent-contrast);
  display: grid; place-items: center; cursor: pointer;
  transition: background var(--motion), transform var(--motion);
}
.app-body .composer__btn:hover { background: var(--accent-hover); }
.app-body .composer__btn:active { transform: scale(.94); }
.app-body .composer__attach { width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted); border-radius: 50%; cursor: pointer; }
.app-body .composer__attach:hover { color: var(--text); background: var(--surface-2); }

/* ---------- FAB ---------- */
.app-body .fab {
  position: fixed; right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: var(--accent); color: var(--accent-contrast);
  box-shadow: var(--shadow-fab); display: none; place-items: center;
  cursor: pointer; z-index: 40;
  transition: background var(--motion), transform var(--motion);
}
.app-body .fab:hover { background: var(--accent-hover); }
.app-body .fab:active { transform: scale(.94); }
@media (max-width: 860px) { .app-body .fab { display: grid; } }

/* ---------- Settings rows (account) ---------- */
.app-body .settings-ico {
  width: 30px; height: 30px; border-radius: 8px; display: inline-grid; place-items: center;
  background: var(--tile, var(--accent)); color: #fff; margin-right: var(--s3);
  flex-shrink: 0; vertical-align: -8px;
}
.app-body .settings-ico svg { width: 17px; height: 17px; }
.app-body .card > h2, .app-body .card .row-between h2 { display: flex; align-items: center; font-size: 16px; }

/* ---------- Reminders: list rows replace the table ---------- */
.app-body .rem-row {
  display: flex; align-items: center; gap: var(--s3);
  min-height: 68px; padding: var(--s3) var(--s2); position: relative;
}
.app-body .rem-row::after { content: ""; position: absolute; left: 60px; right: 0; bottom: 0; height: 1px; background: var(--divider); }
.app-body .rem-row:last-child::after { display: none; }
.app-body .rem-row__body { flex: 1; min-width: 0; }
.app-body .rem-row__top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); }
.app-body .rem-row__title { font-weight: 600; font-size: 15px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-body .rem-row__when { font-size: 12px; color: var(--muted); flex-shrink: 0; text-align: right; }
.app-body .rem-row__sub { font-size: 13px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: var(--s2); align-items: center; }
.app-body .rem-chip {
  font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--muted); flex-shrink: 0;
}
.app-body .rem-chip--scheduled { background: var(--accent-soft); color: var(--accent-text); }
.app-body .rem-chip--sent { background: rgba(16, 185, 129, .16); color: #34D399; }
.app-body[data-theme="light"] .rem-chip--sent { color: #047857; }
.app-body .rem-chip--failed { background: rgba(244, 63, 94, .16); color: #FB7185; }
.app-body[data-theme="light"] .rem-chip--failed { color: #BE123C; }
.app-body .rem-row .btn--danger {
  background: transparent; border: 1px solid rgba(244, 63, 94, .45); color: #FB7185; border-radius: var(--r-pill);
}
.app-body[data-theme="light"] .rem-row .btn--danger { color: #BE123C; }
.app-body .rem-row .btn--danger:hover { background: rgba(244, 63, 94, .12); }
.app-body .rem-scroll { border: 0; }

/* ---------- Tabs, dialogs, toasts, tables (admin light touch) ---------- */
.app-body .tabs button { border-radius: var(--r-pill); transition: background var(--motion), color var(--motion); }
.app-body .tabs button.is-active { background: var(--accent); color: var(--accent-contrast); }
.app-body dialog.modal-card { border-radius: var(--r-lg); }
.app-body .toast { border-radius: var(--r-md); background: rgba(23, 33, 43, .92); backdrop-filter: blur(6px); }
.app-body[data-theme="light"] .toast { background: rgba(255, 255, 255, .95); color: var(--text); }
.app-body .table th { color: var(--muted); font-weight: 600; font-size: 13px; }
.app-body .table td, .app-body .table th { border-color: var(--divider); }
.app-body .kpi { border-radius: var(--r-md); }
.app-body .tag-chip { border-radius: var(--r-pill); }

/* ---------- Theme toggle (injected by app-skin.js) ---------- */
.app-body .theme-toggle {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.05rem; transition: background var(--motion), color var(--motion);
}
.app-body .theme-toggle:hover { background: var(--surface-2); color: var(--text); }

/* ---------- Forms: dark inputs (light overrides above win via [data-theme]) ---------- */
.app-body .field label { color: var(--muted); font-size: 13px; }
.app-body .field input, .app-body .field select, .app-body .field textarea {
  background: var(--surface-2); border: 1px solid transparent; color: var(--text);
  border-radius: var(--r-sm); transition: border-color var(--motion), background var(--motion);
}
.app-body .field input:focus, .app-body .field select:focus, .app-body .field textarea:focus {
  border-color: var(--accent); box-shadow: none; background: var(--bg);
}
.app-body .field input:disabled { opacity: .55; }

/* ---------- Auth (login/register): centered card, same skin ---------- */
.app-body.auth-body { background: var(--bg); }
.app-body .auth-card { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r-lg); box-shadow: none; }
.app-body .auth-card h1 { color: var(--text); font-size: 1.3rem; }
.app-body .auth-sub, .app-body .auth-alt { color: var(--muted); }
.app-body .auth-brand span { color: var(--text); }
.app-body .auth-alt a, .app-body .auth-card a { color: var(--accent-text); }

/* ---------- Tap targets: phone-first, everything ≥44px ---------- */
.app-body .btn--sm { min-height: 44px; padding: var(--s2) var(--s4); }
.app-body .chat__back { min-width: 44px; min-height: 44px; }

/* ===========================================================================
   LAYOUT PASS — mockup alignment. Presentational only.
   Placed LAST so these rules win over the base skin above.
   =========================================================================== */

/* --- 1. Buttons: one system, ~48px, pill, clear separation. Canonical hooks
       stay the existing .btn--primary/.btn--ghost/.btn--danger (renaming them
       would churn every template/JS); .btn-primary/.btn-secondary/.btn-danger
       are first-class aliases of the same three styles. --- */
.app-body .btn, .app-body .btn-primary, .app-body .btn-secondary, .app-body .btn-danger {
  min-height: 48px; padding: 12px 20px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer;
}
.app-body .btn-primary { background: var(--accent); color: var(--accent-contrast); }
.app-body .btn-primary:hover { background: var(--accent-hover); }
.app-body .btn-secondary, .app-body .btn--ghost { background: var(--surface-2); color: var(--text); border-color: transparent; }
.app-body .btn-secondary:hover, .app-body .btn--ghost:hover { background: var(--surface-3); color: var(--text); }
.app-body .btn-danger, .app-body .btn--danger { background: #F43F5E; color: #fff; border-color: transparent; }
.app-body .btn-danger:hover, .app-body .btn--danger:hover { background: #E11D48; }
.app-body .btn--sm { min-height: 44px; padding: 8px 16px; font-size: 14px; }

/* Separation: a button following form content gets clear air (rule #1). */
.app-body form button[type="submit"], .app-body form > .btn { margin-top: 20px; }
.app-body .field + .btn, .app-body .field + button { margin-top: 20px; }
.app-body .card > .btn, .app-body .card__desc + .btn, .app-body p + .btn { margin-top: 16px; }
/* Aligned control contexts are exempt (headers, list rows, composer, banners, dialogs). */
.app-body .row-between .btn, .app-body .rem-row .btn, .app-body .push-banner .btn,
.app-body .composer button, .app-body .tabs button { margin-top: 0; }

/* --- 2. Conversations list: hard width containment + truncation --- */
.app-body { overflow-x: clip; }
.app-body .chat, .app-body .chat__list, .app-body .chat__main, .app-body .conv-list { min-width: 0; max-width: 100%; }
.app-body .conv-item { max-width: 100%; overflow: hidden; min-height: 70px; }
.app-body .conv-item__body { min-width: 0; flex: 1 1 0; }
.app-body .conv-item__top { min-width: 0; }
.app-body .conv-item__name { min-width: 0; flex: 1 1 auto; }
.app-body .conv-item__time { flex: 0 0 auto; }
.app-body .conv-item__preview { min-width: 0; display: flex; align-items: center; gap: 6px; overflow: hidden; }
.app-body .conv-item__preview .badge, .app-body .conv-item__preview .conv-type-pill,
.app-body .conv-item__preview .muted { flex: 0 0 auto; } /* tags never pushed off; preview text truncates */
.app-body .conv-item__ptext { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* FAB never covers the last rows: scroll containers get clearance where it shows. */
@media (max-width: 860px) {
  .app-body .conv-list { padding-bottom: 96px; }
  .app-body .chat__messages { padding-bottom: var(--s6); }
}

/* --- 3. Section nav: horizontal scrollable pill tab bar (mockup Option A) --- */
.app-body .tabs {
  display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto;
  border-bottom: 0; margin: 16px 0; padding: 2px 2px 6px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.app-body .tabs::-webkit-scrollbar { display: none; }
.app-body .tabs button {
  flex: 0 0 auto; min-height: 44px; padding: 10px 18px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--muted); border: 0; font-weight: 500; font-size: 14px;
}
.app-body .tabs button:hover { background: var(--surface-3); color: var(--text); }
.app-body .tabs button.is-active { background: var(--accent); color: var(--accent-contrast); }

/* --- 4. Rhythm: page padding, card gaps, form spacing --- */
.app-body .panel-wrap { padding: 16px 12px 40px; }
.app-body .panel-lead { margin-bottom: 16px; }
.app-body .card { padding: 16px; margin-bottom: 16px; box-shadow: none; }
.app-body .field { margin-bottom: 14px; }
.app-body .grid-2 { gap: 12px 16px; }
@media (max-width: 560px) { .app-body .grid-2 { grid-template-columns: 1fr; } }
@media (min-width: 700px) {
  .app-body .panel-wrap { padding: 24px 16px 48px; }
  .app-body .card { padding: 20px; }
}

/* ===========================================================================
   SETTINGS LIST (Telegram vertical pattern) — account home + premium page.
   =========================================================================== */
.app-body .acct-hero { text-align: center; padding: var(--s4) 0 var(--s5); }
.app-body .acct-hero .avatar { width: 84px; height: 84px; font-size: 2rem; margin: 0 auto var(--s3); }
.app-body .acct-hero__name { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.app-body .acct-hero__handle { font-size: .9rem; color: var(--muted); margin-top: 2px; }

.app-body .set-group {
  background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r-md);
  padding: 4px 16px; margin-bottom: 16px;
}
.app-body .set-label {
  font-size: 13px; font-weight: 600; color: var(--accent-text);
  text-transform: uppercase; letter-spacing: .04em; margin: 20px 4px 6px;
}
.app-body .set-row {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 58px; padding: 8px 0; position: relative;
  background: none; border: 0; color: var(--text); text-align: left;
  font: inherit; cursor: pointer; text-decoration: none;
}
.app-body .set-row::after { /* inset divider, starts after the icon tile */
  content: ""; position: absolute; left: 46px; right: 0; bottom: 0; height: 1px; background: var(--divider);
}
.app-body .set-row:last-child::after { display: none; }
.app-body .set-row:hover { text-decoration: none; }
.app-body .set-row:hover .set-row__title { color: var(--text); }
.app-body .set-row__tile {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  background: var(--tile, var(--accent)); color: #fff; display: grid; place-items: center;
}
.app-body .set-row__tile svg { width: 18px; height: 18px; }
.app-body .set-row__main { flex: 1; min-width: 0; }
.app-body .set-row__title { font-size: 16px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-body .set-row__sub { font-size: 13px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-body .set-row__value { color: var(--muted); font-size: 14px; flex-shrink: 0; }
.app-body .set-row__chev { color: var(--muted); flex-shrink: 0; font-size: 1.15rem; line-height: 1; opacity: .7; }
.app-body .set-row--danger .set-row__title { color: #FB7185; }
.app-body[data-theme="light"] .set-row--danger .set-row__title { color: #BE123C; }

/* Drill-in panel header (back to the list) */
.app-body .set-back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  background: none; border: 0; color: var(--accent-text); font: inherit; font-weight: 600;
  cursor: pointer; padding: 0 4px; margin-bottom: 8px;
}

/* ---------- Premium page ---------- */
.app-body .prem-hero { text-align: center; padding: var(--s5) 0; }
.app-body .prem-hero__emblem {
  width: 96px; height: 96px; margin: 0 auto var(--s4); border-radius: 28px;
  background: linear-gradient(135deg, var(--accent), #22D3EE);
  display: grid; place-items: center; box-shadow: var(--shadow-fab);
}
.app-body .prem-hero h1 { font-size: 1.5rem; margin-bottom: var(--s2); }
.app-body .prem-hero p { color: var(--muted); max-width: 40ch; margin: 0 auto; }
.app-body .plan-row { min-height: 64px; }
.app-body .plan-row__radio {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong);
  flex-shrink: 0; display: grid; place-items: center; transition: border-color var(--motion);
}
.app-body .plan-row[aria-checked="true"] .plan-row__radio { border-color: var(--accent); }
.app-body .plan-row[aria-checked="true"] .plan-row__radio::before {
  content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--accent);
}
.app-body .plan-row__save {
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: var(--r-pill); padding: 2px 8px; margin-left: 8px; vertical-align: 2px;
}
.app-body .plan-row__strike { text-decoration: line-through; opacity: .6; margin-right: 6px; }
.app-body .prem-cta-space { height: 96px; } /* keeps content clear of the sticky CTA */
.app-body .prem-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bg) 65%, transparent);
}
.app-body .prem-cta .btn {
  width: 100%; max-width: 560px; margin: 0 auto; display: flex;
  background: linear-gradient(90deg, var(--accent), #22D3EE); color: #fff; border: 0;
}

/* ---------- Motion discipline ---------- */
@media (prefers-reduced-motion: reduce) {
  .app-body *, .app-body *::before, .app-body *::after {
    transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important;
  }
}
