/* ==========================================================================
   MHRS Mini App v3 — Telegram-Native Design System
   iOS Settings-style sections on tinted secondary background
   ========================================================================== */

:root {
  --tg-theme-bg-color: #ffffff;
  --tg-theme-secondary-bg-color: #efeff4;
  --tg-theme-text-color: #000000;
  --tg-theme-hint-color: #8e8e93;
  --tg-theme-link-color: #007aff;
  --tg-theme-button-color: #007aff;
  --tg-theme-button-text-color: #ffffff;
  --tg-theme-section-bg-color: #ffffff;
  --tg-theme-section-separator-color: #c8c7cc;
  --tg-theme-destructive-text-color: #ff3b30;
  --tg-theme-section-header-text-color: #6d6d72;
  --tg-theme-accent-text-color: #007aff;
  --tg-theme-subtitle-text-color: #8e8e93;
  --tg-theme-header-bg-color: #f7f7f7;
  --tg-theme-bottom-bar-bg-color: #f7f7f7;

  --bg: var(--tg-theme-secondary-bg-color);
  --surface: var(--tg-theme-section-bg-color);
  --text: var(--tg-theme-text-color);
  --hint: var(--tg-theme-hint-color);
  --accent: var(--tg-theme-button-color);
  --accent-text: var(--tg-theme-button-text-color);
  --separator: var(--tg-theme-section-separator-color);
  --destructive: var(--tg-theme-destructive-text-color);
  --section-header: var(--tg-theme-section-header-text-color);
  --control-bg: var(--bg);
  --chip-bg: var(--surface);
  --hairline: var(--separator);
  --pressed: rgba(120, 120, 128, 0.16);
  --scrim: rgba(0, 0, 0, 0.42);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.035);

  --green: #34c759;
  --orange: #ff9500;
  --red: #ff3b30;
  --green-bg: rgba(52, 199, 89, 0.12);
  --orange-bg: rgba(255, 149, 0, 0.12);
  --red-bg: rgba(255, 59, 48, 0.12);
  --accent-bg: rgba(0, 122, 255, 0.10);

  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
  --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);
  --radius: 12px;
  --tabbar-base-height: 60px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@supports (color: color-mix(in srgb, #000 50%, #fff)) {
  :root {
    --control-bg: color-mix(in srgb, var(--bg) 84%, var(--surface));
    --chip-bg: color-mix(in srgb, var(--surface) 84%, var(--bg));
    --hairline: color-mix(in srgb, var(--separator) 76%, transparent);
    --pressed: color-mix(in srgb, var(--bg) 74%, var(--separator));
    --accent-bg: color-mix(in srgb, var(--accent) 13%, transparent);
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([style]) {
    color-scheme: dark;
    --tg-theme-bg-color: #111113;
    --tg-theme-secondary-bg-color: #1c1c1e;
    --tg-theme-text-color: #f5f5f7;
    --tg-theme-hint-color: #98989f;
    --tg-theme-link-color: #64a8ff;
    --tg-theme-button-color: #0a84ff;
    --tg-theme-button-text-color: #ffffff;
    --tg-theme-section-bg-color: #242426;
    --tg-theme-section-separator-color: #3a3a3c;
    --tg-theme-destructive-text-color: #ff453a;
    --tg-theme-section-header-text-color: #98989f;
    --tg-theme-accent-text-color: #64a8ff;
    --tg-theme-subtitle-text-color: #98989f;
    --tg-theme-header-bg-color: #1c1c1e;
    --tg-theme-bottom-bar-bg-color: #1c1c1e;
  }
}

html {
  height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  background: var(--bg);
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-x: none;
}

html[data-color-scheme="dark"] {
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([style]) {
    color-scheme: dark;
  }
}

body {
  min-height: 100%;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  overscroll-behavior-x: none;
  -webkit-overflow-scrolling: touch;
}

button, input, textarea, select { min-width: 0; font: inherit; color: inherit; border: none; background: none; outline: none; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { opacity: 0.4; cursor: default; }
a { color: var(--accent); text-decoration: none; }
svg { display: block; flex-shrink: 0; }

button:focus-visible,
.field-tap:focus-visible,
.action-btn:focus-visible,
.section-action:focus-visible,
.tab:focus-visible,
.tab-add:focus-visible,
.sheet-bar-btn:focus-visible,
.pick-row:focus-visible,
.btn:focus-visible,
.browser-tool:focus-visible,
.browser-key:focus-visible,
.browser-send:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.field-input:focus-visible,
.pick-search:focus-visible,
.browser-text:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

body.sheet-open {
  overflow: hidden;
}

/* ==========================================================================
   Pages
   ========================================================================== */

.page {
  display: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
}

.page--active {
  display: block;
}

.page-scroll {
  width: 100%;
  max-width: 600px;
  overflow-x: hidden;
  margin: 0 auto;
  padding: 10px 0 18px;
}

/* ==========================================================================
   Hero Banner
   ========================================================================== */

.hero {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px 16px;
}

.hero-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-bg);
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.hero-icon.pulse {
  animation: heroPulse 2.5s ease-in-out infinite;
}

@keyframes heroPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.hero-body { flex: 1; min-width: 0; }

.hero-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
}

.hero-subtitle {
  margin-top: 2px;
  font-size: 13px;
  color: var(--hint);
  line-height: 1.35;
}

.dashboard-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  min-height: 18px;
  color: var(--hint);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

.dashboard-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.dashboard-status.tone-active { color: var(--green); }
.dashboard-status.tone-warning { color: var(--orange); }
.dashboard-status.tone-danger { color: var(--destructive); }
.dashboard-status.tone-muted { color: var(--hint); }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 40%;
  min-height: 40px;
  padding: 8px 12px 8px 8px;
  border-radius: 20px;
  background: var(--surface);
  border: 0.5px solid var(--hairline);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
  transition: transform 100ms ease;
}

.hero-badge span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-badge:active { transform: scale(0.96); }

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hint);
  flex-shrink: 0;
}

.hero-badge.active .hero-badge-dot { background: var(--green); animation: dotPulse 2s ease-in-out infinite; }
.hero-badge.warning .hero-badge-dot { background: var(--orange); }
.hero-badge.danger .hero-badge-dot { background: var(--red); }

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.25); }
}

/* ==========================================================================
   Telegram-style Sections
   ========================================================================== */

.tg-section {
  margin-bottom: 20px;
}

.tg-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 16px 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--section-header);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.section-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 7px 12px 7px 8px;
  border-radius: 20px;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 100ms ease;
}

.section-action:active { transform: scale(0.95); }

.tg-section-body {
  margin: 0 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 0.5px solid var(--hairline);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

/* ==========================================================================
   Rule Cards
   ========================================================================== */

#rules-list {
  display: grid;
  gap: 10px;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

#session-content {
  display: grid;
  gap: 10px;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

#rules-list .skeleton {
  border-radius: var(--radius);
  background: var(--surface);
}

.rule-cell-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  flex-shrink: 0;
  background: var(--accent-bg);
  color: var(--accent);
}

.rule-cell-icon i,
.rule-cell-icon svg {
  width: 22px;
  height: 22px;
}

.rule-cell-icon.tone-active { background: var(--green-bg); color: var(--green); }
.rule-cell-icon.tone-warning { background: var(--orange-bg); color: var(--orange); }
.rule-cell-icon.tone-danger { background: var(--red-bg); color: var(--red); }
.rule-cell-icon.tone-muted { background: var(--accent-bg); color: var(--accent); }

.rule-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 0.5px solid var(--hairline);
  box-shadow: var(--card-shadow);
}

.rule-card-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 10px 8px;
}

.rule-card-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.rule-cell-main {
  flex: 1;
  min-width: 0;
}

.rule-cell-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.22;
  overflow-wrap: anywhere;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rule-cell-desc {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--hint);
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.rule-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  max-width: 42%;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rule-status-pill.tone-active { background: var(--green-bg); color: var(--green); }
.rule-status-pill.tone-warning { background: var(--orange-bg); color: var(--orange); }
.rule-status-pill.tone-danger { background: var(--red-bg); color: var(--red); }
.rule-status-pill.tone-muted { background: var(--control-bg); color: var(--hint); }

.rule-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.rule-chip {
  min-width: 0;
  max-width: 100%;
  min-height: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--control-bg);
  color: var(--hint);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rule-card-body {
  display: grid;
  gap: 7px;
  padding: 0 10px 8px 60px;
}

.rule-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
  padding-top: 7px;
  border-top: 0.5px solid var(--hairline);
}

.rule-summary-item {
  min-width: 0;
  min-height: 38px;
  padding: 6px 7px;
  border-radius: 8px;
  background: var(--control-bg);
}

.rule-summary-item span {
  display: block;
  margin-bottom: 2px;
  color: var(--hint);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.rule-summary-item strong {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.22;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 0.5px solid var(--hairline);
}

.rule-meta-item {
  display: grid;
  grid-template-columns: minmax(70px, 31%) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 34px;
  padding: 7px 0;
  border-radius: 0;
  background: transparent;
}

.rule-meta-item + .rule-meta-item {
  border-top: 0.5px solid var(--hairline);
}

.rule-meta-item span,
.rule-result span {
  display: block;
  color: var(--hint);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  text-transform: none;
  letter-spacing: 0;
}

.rule-meta-item strong,
.rule-result strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.rule-meta-item strong {
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-result {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 2px;
  min-width: 0;
  min-height: 38px;
  padding: 6px 7px;
  border-top: 0;
  border-radius: 8px;
  background: var(--control-bg);
}

.rule-result strong {
  text-align: left;
}

.rule-result.tone-active strong { color: var(--green); }
.rule-result.tone-warning strong { color: var(--orange); }
.rule-result.tone-danger strong { color: var(--destructive); }
.rule-result.tone-muted { color: var(--hint); }

.rule-detail-list {
  display: grid;
  border-top: 0.5px solid var(--hairline);
}

.rule-detail-row {
  display: grid;
  grid-template-columns: minmax(72px, 34%) minmax(0, 1fr);
  gap: 10px;
  padding: 8px 12px;
  min-width: 0;
  min-height: 36px;
  font-size: 12px;
  line-height: 1.35;
}

.rule-detail-row + .rule-detail-row {
  border-top: 0.5px solid var(--hairline);
}

.rule-detail-row span {
  color: var(--hint);
  min-width: 0;
  overflow-wrap: anywhere;
}

.rule-detail-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
  font-weight: 600;
}

.rule-cell-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 10px 8px;
  border-radius: 8px;
  background: var(--control-bg);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
  transition: transform 80ms ease;
}

.action-btn:active { transform: scale(0.97); }

.action-btn--primary {
  background: var(--accent-bg);
  color: var(--accent);
}

.action-btn--danger {
  color: var(--destructive);
}

.rule-card .rule-cell-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(56px, 0.72fr);
  gap: 0;
  padding: 0;
  border-top: 0.5px solid var(--hairline);
}

.rule-card .action-btn {
  gap: 5px;
  min-height: 40px;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rule-card .action-btn i,
.rule-card .action-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.rule-card .action-btn span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rule-card .action-btn + .action-btn {
  border-left: 0.5px solid var(--hairline);
}

.rule-card .action-btn--primary {
  color: var(--accent);
}

.rule-card .action-btn--danger {
  background: transparent;
}

.session-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(104px, 0.48fr);
  gap: 8px;
  padding: 0;
}

.session-actions .action-btn {
  min-height: 46px;
  padding: 8px 10px;
  border: 0.5px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  font-size: 14px;
  white-space: normal;
}

.session-actions .action-btn--primary {
  background: var(--accent-bg);
  color: var(--accent);
}

.session-action-btn {
  flex-direction: column;
  gap: 1px;
}

.session-action-title {
  display: block;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.15;
}

.session-action-subtitle {
  display: block;
  color: var(--hint);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
}

/* ==========================================================================
   Session Screen
   ========================================================================== */

.session-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 24px 24px;
}

.session-hero-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin-bottom: 14px;
}

.session-hero-icon.active { background: var(--green-bg); color: var(--green); }
.session-hero-icon.warning { background: var(--orange-bg); color: var(--orange); }
.session-hero-icon.danger { background: var(--red-bg); color: var(--red); }
.session-hero-icon.unknown { background: var(--bg); color: var(--hint); }

.session-hero-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.session-hero-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--hint);
  line-height: 1.4;
  max-width: 300px;
}

.info-table {
  border-top: 0.5px solid var(--hairline);
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  font-size: 14px;
  min-height: 44px;
}

.info-row + .info-row {
  border-top: 0.5px solid var(--hairline);
  margin-left: 0;
  padding-left: 16px;
}

.info-row span { color: var(--hint); }
.info-row strong { min-width: 0; overflow-wrap: anywhere; font-weight: 600; text-align: right; }

.telegram-session-body {
  display: grid;
}

.telegram-identity {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px 9px;
}

.telegram-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 17px;
  font-weight: 800;
}

.telegram-identity-main {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.telegram-identity-main strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telegram-identity-main span,
.telegram-identity-meta {
  color: var(--hint);
  font-size: 12px;
  line-height: 1.25;
}

.telegram-identity-meta {
  max-width: 84px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-card {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 12px;
  padding: 9px 0;
  border: 0;
  border-top: 0.5px solid var(--hairline);
  border-radius: 0;
  background: transparent;
  min-width: 0;
  overflow: hidden;
}

.sync-card--active { border-color: rgba(52, 199, 89, 0.22); }
.sync-card--active { border-color: color-mix(in srgb, var(--green) 34%, var(--hairline)); }
.sync-card--warning { border-color: rgba(255, 149, 0, 0.24); }
.sync-card--warning { border-color: color-mix(in srgb, var(--orange) 36%, var(--hairline)); }
.sync-card--danger { border-color: rgba(255, 59, 48, 0.24); }
.sync-card--danger { border-color: color-mix(in srgb, var(--red) 36%, var(--hairline)); }
.sync-card--active,
.sync-card--warning,
.sync-card--danger {
  border-color: var(--hairline);
}

.sync-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 8px;
  flex: 0 0 26px;
}

.sync-card-icon svg {
  width: 17px;
  height: 17px;
}

.sync-card-icon.active { background: var(--green-bg); color: var(--green); }
.sync-card-icon.warning { background: var(--orange-bg); color: var(--orange); }
.sync-card-icon.danger { background: var(--red-bg); color: var(--red); }

.sync-card-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.sync-card-title {
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.sync-card-detail,
.sync-card-issues {
  color: var(--hint);
  font-size: 11.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sync-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.sync-card-chips span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 4px 7px;
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.sync-card-issues {
  display: grid;
  gap: 4px;
}

.sync-card-issues span {
  padding: 5px 7px;
  border-radius: 8px;
  background: var(--red-bg);
  color: var(--destructive);
  font-weight: 700;
}

.session-group + .session-group {
  border-top: 0;
}

.session-group {
  overflow: hidden;
  border: 0.5px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.session-group-title {
  padding: 11px 12px 7px;
  color: var(--section-header);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.profile-list {
  display: grid;
}

.profile-row,
.profile-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 10px 12px;
  text-align: left;
}

.profile-row + .profile-row,
.profile-choice + .profile-choice {
  border-top: 0.5px solid var(--hairline);
}

.profile-row-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex: 0 0 32px;
}

.profile-row-icon svg {
  width: 19px;
  height: 19px;
}

.profile-row-icon.active { background: var(--green-bg); color: var(--green); }
.profile-row-icon.danger { background: var(--red-bg); color: var(--red); }

.profile-row-main,
.profile-choice-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.profile-row-main strong,
.profile-choice-main strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}

.profile-row-main span,
.profile-choice-main span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--hint);
  font-size: 12px;
}

.profile-row-status {
  flex: 0 1 auto;
  max-width: 30%;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
}

.profile-row-status.active { color: var(--green); }
.profile-row-status.danger { color: var(--red); }

.profile-row-delete {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--red-bg);
  color: var(--destructive);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  transition: transform 80ms ease;
}

.profile-row-delete:active {
  transform: scale(0.96);
}

.profile-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 24px 16px 28px;
  text-align: center;
}

.profile-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--red-bg);
  color: var(--red);
}

.profile-empty-icon svg {
  width: 26px;
  height: 26px;
}

.profile-empty strong {
  font-size: 15px;
  font-weight: 700;
}

.profile-empty span {
  max-width: 240px;
  color: var(--hint);
  font-size: 13px;
  line-height: 1.35;
}

.profile-choice-list {
  border-radius: var(--radius);
  background: var(--control-bg);
  border: 0.5px solid var(--hairline);
  overflow: hidden;
}

.profile-choice {
  min-height: 60px;
  transition: background 80ms ease;
}

.profile-choice:active {
  background: var(--pressed);
}

.profile-choice--selected .profile-choice-main strong {
  color: var(--accent);
}

.jwt-box {
  display: none;
  padding: 16px;
  border-top: 0.5px solid var(--hairline);
}

.jwt-box.open { display: block; }

.jwt-box h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.jwt-box p {
  font-size: 12px;
  color: var(--hint);
  margin-bottom: 12px;
}

.manual-help {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 0.5px solid var(--hairline);
}

.manual-help-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.manual-help p {
  margin-bottom: 8px;
  line-height: 1.45;
}

/* ==========================================================================
   Tab Bar
   ========================================================================== */

.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  right: auto;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100vw, 600px);
  max-width: none;
  height: calc(var(--tabbar-base-height) + env(safe-area-inset-bottom, 0px));
  min-height: calc(var(--tabbar-base-height) + env(safe-area-inset-bottom, 0px));
  margin: 0;
  padding: 4px 12px calc(4px + env(safe-area-inset-bottom, 0px));
  transform: translate3d(-50%, 0, 0);
  background: var(--surface);
  background: color-mix(in srgb, var(--tg-theme-bottom-bar-bg-color) 90%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--hairline);
  contain: layout paint;
}

.tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  height: 52px;
  min-height: 52px;
  max-height: 52px;
  padding: 4px 0 2px;
  color: var(--hint);
  transition: color 150ms ease;
}

.tab-add {
  align-self: center;
  flex: 0 0 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0 14px;
  border: 0.5px solid color-mix(in srgb, var(--accent) 16%, var(--hairline));
  border-radius: 14px;
  background: var(--accent-bg);
  color: var(--accent);
  box-shadow: none;
  transition: transform 100ms ease, background 120ms ease;
}

.tab-add:active {
  transform: scale(0.94);
  background: color-mix(in srgb, var(--accent-bg) 78%, var(--accent) 22%);
  box-shadow: none;
}

.tab--active { color: var(--accent); }

.tab-icon {
  opacity: 0.82;
  transition: opacity 120ms ease;
}

.tab--active .tab-icon { opacity: 1; }

.tab-label {
  display: block;
  min-width: 54px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

/* ==========================================================================
   Bottom Sheets
   ========================================================================== */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 0ms 200ms;
}

.sheet.open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transition: opacity 200ms ease, visibility 0ms;
}

.sheet-scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
}

.sheet-surface {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  max-height: min(88dvh, 760px);
  display: flex;
  flex-direction: column;
  border-radius: 14px 14px 0 0;
  background: var(--surface);
  border: 0.5px solid var(--hairline);
  border-bottom: 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(100%);
  transition: transform 380ms var(--ease-ios);
  overflow: hidden;
}

.sheet.open .sheet-surface {
  transform: translateY(0);
}

.sheet-surface--tall {
  max-height: 92vh;
  max-height: min(94dvh, 840px);
}

.sheet-drag-handle {
  display: flex;
  justify-content: center;
  padding: 10px 0 2px;
}

.sheet-drag-handle::after {
  content: '';
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--hint);
  opacity: 0.28;
}

.sheet-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 56px;
  flex-shrink: 0;
  padding: 4px 8px 8px;
}

.sheet-bar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--hint);
  transition: background 100ms ease;
}

.sheet-bar-btn:active { background: var(--bg); }

.sheet-bar-center {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.sheet-bar-sup {
  font-size: 11px;
  font-weight: 600;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.sheet-bar-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wiz-progress {
  height: 2px;
  background: var(--control-bg);
}

.wiz-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 0 1px 1px 0;
  transition: width 250ms var(--ease-ios);
}

.sheet-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px 18px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sheet-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex-shrink: 0;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 0.5px solid var(--hairline);
}

.has-tg .sheet-footer { display: none; }

/* ==========================================================================
   Live Browser
   ========================================================================== */

.sheet-surface--browser {
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  border-radius: 0;
  border: 0;
  background: #111;
  color: #fff;
}

.browser-bar {
  padding-top: calc(6px + env(safe-area-inset-top, 0px));
  padding-bottom: 8px;
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.12);
}

.browser-bar .sheet-bar-btn {
  color: #fff;
}

.browser-bar .sheet-bar-btn:active {
  background: rgba(255, 255, 255, 0.12);
}

.browser-bar .sheet-bar-sup {
  color: rgba(255, 255, 255, 0.64);
  text-transform: none;
  letter-spacing: 0;
}

.browser-bar .sheet-bar-title {
  color: #fff;
}

.browser-toolbar,
.browser-keybar {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  background: #111;
}

.browser-toolbar {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.browser-keybar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.browser-tool,
.browser-key,
.browser-send {
  min-width: 0;
  min-height: 44px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-tool:active,
.browser-key:active,
.browser-send:active {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(0.98);
}

.browser-viewport-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #1c1c1e;
}

.browser-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.browser-placeholder {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  padding: 16px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.browser-inputbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(64px, 76px);
  gap: 8px;
  padding: 10px 12px 0;
  background: #111;
}

.browser-text {
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  font-size: 16px;
}

.browser-text::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

.browser-send {
  background: var(--accent);
  color: var(--accent-text);
}

/* ==========================================================================
   Picker
   ========================================================================== */

.pick-search-box {
  position: relative;
  flex-shrink: 0;
  padding: 0 16px 12px;
  background: var(--surface);
}

.pick-search-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(calc(-50% - 6px));
  color: var(--hint);
  pointer-events: none;
}

.pick-search {
  width: 100%;
  height: 42px;
  padding: 0 12px 0 40px;
  border-radius: 10px;
  background: var(--control-bg);
  border: none;
  font-size: 16px;
  color: var(--text);
}

.pick-search::placeholder { color: var(--hint); }
.pick-search:focus { outline: 2px solid var(--accent); outline-offset: -2px; }

.pick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  text-align: left;
  transition: background 80ms ease;
}

.pick-row:active { background: var(--bg); }

.pick-row + .pick-row {
  border-top: 0.5px solid var(--hairline);
  margin-left: 0;
  padding-left: 16px;
}

.pick-row-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.pick-row-main strong {
  min-width: 0;
  font-size: 15px;
  font-weight: 500;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.25;
}

.pick-row-main small {
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--hint);
  font-size: 12px;
  line-height: 1.25;
}

.pick-row--selected .pick-row-main strong { color: var(--accent); font-weight: 600; }

.pick-check { color: var(--accent); flex-shrink: 0; }

.pick-section-title {
  padding: 14px 16px 6px;
  color: var(--section-header);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ==========================================================================
   Form Fields
   ========================================================================== */

.field-group { display: grid; gap: 14px; }

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--section-header);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.field-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--control-bg);
  border: none;
  font-size: 16px;
  color: var(--text);
}

.field-input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.field-input::placeholder { color: var(--hint); }

textarea.field-input {
  height: 112px;
  padding: 12px 14px;
  resize: vertical;
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 16px;
  line-height: 1.42;
}

.field-tap {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 10px 14px;
  border-radius: 10px;
  background: var(--control-bg);
  text-align: left;
  transition: background 80ms ease;
}

.field-tap:active {
  background: var(--pressed);
}

.field-tap-label {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: auto;
  align-self: center;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  max-height: 2.6em;
  overflow: hidden;
}

.field-tap-label.is-empty { color: var(--hint); font-weight: 400; }

.field-tap-chevron {
  flex-shrink: 0;
  color: var(--hint);
  transition: transform 80ms ease;
}

.field-tap:active .field-tap-chevron { transform: translateX(2px); }

.field-hint {
  margin-top: 4px;
  font-size: 12px;
  color: var(--hint);
  line-height: 1.35;
}

.field-hint.warn { color: var(--orange); font-weight: 500; }

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

/* ==========================================================================
   Quick Clinic Chips
   ========================================================================== */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0;
  overflow: visible;
}

.chip {
  flex: 0 1 auto;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 16px;
  background: var(--control-bg);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: all 100ms ease;
}

.chip:active { transform: scale(0.96); }

.chip--active {
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 600;
}

/* ==========================================================================
   Toggle Switch (iOS)
   ========================================================================== */

.cell-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--control-bg);
  min-height: 52px;
}

.cell-toggle-body {
  flex: 1;
  min-width: 0;
}

.cell-toggle-body strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.cell-toggle-body span {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  color: var(--hint);
  line-height: 1.3;
}

.tgl {
  position: relative;
  width: 51px;
  height: 31px;
  flex: 0 0 51px;
}

.tgl input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 1;
}

.tgl span {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: rgba(120, 120, 128, 0.16);
  transition: background 200ms ease;
}

.tgl span::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.1);
  transition: transform 200ms var(--ease-ios);
}

.tgl input:checked + span { background: var(--green); }
.tgl input:checked + span::after { transform: translateX(20px); }

.mode-info {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--control-bg);
  min-height: 52px;
}

.mode-info strong { font-size: 14px; font-weight: 600; }
.mode-info span { font-size: 12px; color: var(--hint); }

.mode-badge {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--chip-bg);
  font-size: 11px;
  font-weight: 600;
  color: var(--hint);
}

/* ==========================================================================
   Review Table
   ========================================================================== */

.review-table {
  border-radius: var(--radius);
  background: var(--control-bg);
  border: 0.5px solid var(--hairline);
  overflow: hidden;
}

.review-row {
  display: grid;
  grid-template-columns: minmax(76px, 34%) minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 10px 14px;
  font-size: 14px;
  min-height: 40px;
}

.review-row + .review-row {
  border-top: 0.5px solid var(--hairline);
}

.review-row span { color: var(--hint); font-weight: 500; }

.review-row strong {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
  font-weight: 600;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition: transform 80ms ease, opacity 80ms ease;
}

.btn:active { transform: scale(0.97); }

.btn--accent {
  background: var(--accent);
  color: var(--accent-text);
}

.btn--ghost {
  background: var(--control-bg);
  color: var(--text);
}

/* ==========================================================================
   Empty & Error States
   ========================================================================== */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 20px;
}

.empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--accent);
  margin-bottom: 16px;
}

.empty h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

.empty p {
  font-size: 14px;
  color: var(--hint);
  max-width: 260px;
  margin-bottom: 20px;
  line-height: 1.45;
}

/* ==========================================================================
   Skeleton Loading
   ========================================================================== */

.skeleton {
  height: 72px;
  border-radius: 0;
  background: var(--control-bg);
  position: relative;
  overflow: hidden;
}

.skeleton + .skeleton {
  border-top: 0.5px solid var(--hairline);
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.03), transparent);
  animation: shimmer 1.4s ease-in-out infinite;
  background-size: 200% 100%;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton--short { height: 44px; }

/* ==========================================================================
   Toast
   ========================================================================== */

.toast-region {
  position: fixed;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  left: 16px;
  right: 16px;
  z-index: 80;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.toast {
  max-width: min(340px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--text);
  color: var(--surface);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  animation: toastIn 250ms var(--ease-ios) both;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.hidden { display: none !important; }

@media (max-width: 380px) {
  .page-scroll { padding-top: 8px; }
  .hero { gap: 10px; padding: 12px 12px 14px; }
  .hero-icon { width: 48px; height: 48px; }
  .hero-badge { max-width: 42%; }
  .tg-section-header { padding: 0 12px 6px; }
  .tg-section-body { margin: 0 12px; }
  .two-col { grid-template-columns: 1fr; }
  .rule-cell-actions { flex-wrap: wrap; }
  .rule-card .rule-cell-actions { gap: 0; }
  .rule-card-head {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    padding: 11px 10px;
  }
  .rule-cell-icon {
    width: 34px;
    height: 34px;
  }
  .rule-card-body { padding: 0 10px 9px 53px; }
  .rule-detail-row {
    grid-template-columns: minmax(64px, 38%) minmax(0, 1fr);
    padding: 8px 10px;
  }
  .action-btn { font-size: 12.5px; }
  .sheet-scroll { padding: 12px 12px 16px; }
  .sheet-footer { padding-left: 12px; padding-right: 12px; }
  .browser-toolbar,
  .browser-keybar,
  .browser-inputbar {
    gap: 6px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .browser-tool,
  .browser-key,
  .browser-send {
    font-size: 13px;
  }
  .profile-row-status { max-width: 34%; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
