:root {
  --bg: #0a0a0a;
  --ink: #ffffff;
  --paper: #ffffff;
  --paper-text: #0a0a0a;
  --hint: #8a8a8a;
  --border: rgba(255, 255, 255, .25);
  --border-strong: #ffffff;
  --surface: rgba(255, 255, 255, .06);
  --surface-strong: rgba(255, 255, 255, .1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Mono", "Space Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding-bottom: 96px;
  letter-spacing: 0;
}

/* ASCII-фон: дерево сакуры + падающие лепестки */
#sakura {
  position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: .9;
}
.app-header, #app { position: relative; z-index: 1; }

.hidden { display: none !important; }
.app-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 760px; margin: 0 auto; padding: calc(12px + env(safe-area-inset-top)) 18px 10px;
  background: var(--bg);
  border-bottom: 2px solid var(--border-strong);
}
.brand { display: flex; align-items: center; gap: 10px; }
img.brand-mark {
  width: 44px; height: 40px; display: block;
  filter: grayscale(1) contrast(1.1);
}
.brand div { display: flex; flex-direction: column; line-height: 1.1; }
.brand b {
  font-size: 17px; font-weight: 700; letter-spacing: .02em;
  background: var(--paper); color: var(--paper-text);
  padding: 1px 7px 2px; margin-left: -7px; width: fit-content;
}
.brand small { color: var(--hint); font-size: 9px; margin-top: 3px; letter-spacing: .1em; }

#app { padding: 22px 16px 32px; max-width: 612px; margin: 0 auto; }
h1 {
  display: inline;
  font-size: clamp(24px, 7.5vw, 38px);
  line-height: 1.12;
  margin: 5px 0 18px;
  font-weight: 700;
  letter-spacing: -.01em;
}
h1, .hero h1 {
  background: var(--paper); color: var(--paper-text);
  padding: 2px 10px 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
h2 {
  display: inline-block;
  font-size: 13px; margin: 26px 0 12px;
  background: var(--paper); color: var(--paper-text);
  padding: 2px 9px 3px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
}
p { color: var(--hint); font-size: 13px; line-height: 1.6; margin: 10px 0 0; }
.hero { padding: 8px 0 22px; }
.hero h1 { max-width: 480px; margin-bottom: 12px; }
.hero p {
  max-width: 420px;
  background: var(--paper); color: var(--paper-text);
  display: inline; padding: 1px 6px 2px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
  font-size: 11.5px; line-height: 1.9;
}
.eyebrow {
  display: inline-block;
  color: var(--paper-text); background: var(--paper);
  font-size: 10px; font-weight: 700; letter-spacing: .2em;
  padding: 2px 8px 3px; margin-bottom: 8px;
}

.card {
  overflow: hidden;
  background: var(--paper); color: var(--paper-text);
  border: 0; border-radius: 0;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 6px 6px 0 rgba(255,255,255,.12);
}
.card-title { font-weight: 700; font-size: 16px; margin-bottom: 6px; letter-spacing: -.01em; }
.card-sub { color: #4a4a4a; font-size: 12px; line-height: 1.55; margin-bottom: 10px; word-break: break-word; }
.tariff-description { white-space: pre-wrap; tab-size: 4; }
.profile-disclosure > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; cursor: pointer; list-style: none; }
.profile-disclosure > summary::-webkit-details-marker { display: none; }
.profile-disclosure[open] > summary { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--bg); }
.profile-disclosure[open] > summary b { font-size: 0; }
.profile-disclosure[open] > summary b::after { content: "[-]"; font-size: 12px; }
.monitor-card { border: 2px solid var(--bg); }
.monitor-card.monitor-down { border-color: #ff3b30; box-shadow: 6px 6px 0 rgba(255,59,48,.28); }
.monitor-card.monitor-down .row > span { color: #b00020; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 9px; }
.row > * { min-width: 0; }
.action-row { margin-top: 10px; }

.tariff-card { padding: 0; position: relative; }
#tariff-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; max-width: calc(100% - 28px); margin: 0 auto; }
#tariff-list .tariff-card { margin: 0; min-width: 0; }
#tariff-list .tariff-card:only-child { grid-column: 1 / -1; }
.tariff-image, .purchase-image { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; filter: grayscale(1) contrast(1.35) brightness(.92); background: #111; }

.tariff-content { padding: 15px 16px 16px; }
.tariff-footer { margin-top: 15px; }
.tariff-footer small, .purchase-summary small { display: block; color: #6a6a6a; margin-top: 3px; font-size: 10px; }
.tariff-placeholder {
  display: grid; place-items: center;
  background: repeating-conic-gradient(#e2e2e2 0% 25%, #cfcfcf 0% 50%) 0 0/14px 14px;
}
.tariff-placeholder span { font-size: 40px; font-weight: 900; color: #0a0a0a; letter-spacing: .04em; }
.period-chip { flex: 0 0 auto; padding: 3px 9px; background: var(--bg); color: var(--paper); font-size: 10px; font-weight: 700; }
.price { font-size: 21px; letter-spacing: -.01em; }
button, .btn {
  min-height: 44px;
  background: var(--bg); color: var(--paper);
  border: 2px solid var(--bg);
  border-radius: 0;
  padding: 10px 16px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .1s ease, opacity .15s ease;
  letter-spacing: .02em;
}
.card button, .card .btn { background: var(--bg); color: var(--paper); }
button:active { transform: translate(2px, 2px); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--bg); outline-offset: 2px; }
button.secondary {
  background: transparent; border: 2px solid var(--bg);
  color: var(--paper-text);
}
.card button.secondary { background: transparent; }
button.danger { background: transparent; border: 2px solid var(--bg); color: var(--paper-text); }
button:disabled { opacity: .35; cursor: wait; }
.icon-button { min-height: 36px; padding: 6px 12px; background: var(--paper); border: 2px solid var(--bg); color: var(--paper-text); font-size: 11px; }
.app-header .icon-button { background: var(--bg); color: var(--paper); border-color: var(--paper); }
.back-link { background: transparent; color: var(--paper); border: 0; padding: 7px 0; min-height: auto; margin-bottom: 14px; }
.back-link::before { content: "< "; }

input, textarea, select {
  width: 100%;
  background: #f2f2f2;
  border: 2px solid var(--bg);
  color: var(--paper-text);
  border-radius: 0;
  padding: 11px 13px;
  font: inherit;
  font-size: 13px;
  margin-bottom: 10px;
}
input::placeholder, textarea::placeholder { color: #8a8a8a; }
textarea { min-height: 92px; resize: vertical; }
input[type="checkbox"] { width: auto; margin: 0 7px 0 0; accent-color: #0a0a0a; }
input[type="file"] { padding: 9px; font-size: 11px; background: #f2f2f2; }
label { display: block; color: #4a4a4a; font-size: 11px; margin: 8px 0 5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

.purchase-card { overflow: hidden; background: var(--paper); color: var(--paper-text); border-radius: 0; box-shadow: 8px 8px 0 rgba(255,255,255,.14); }
.purchase-image { height: auto; }
.purchase-body { padding: 22px 18px 19px; }
.purchase-body h1 { margin: 0 0 10px; font-size: clamp(20px, 6vw, 30px); }
.slider-block { padding: 16px 0 10px; border-top: 2px solid var(--bg); margin-top: 18px; }
.slider-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 700; }
.slider-label > span:first-child { flex: 1; min-width: 0; padding-right: 6px; }
.slider-label strong { flex: 0 0 auto; display: grid; place-items: center; min-width: 46px; height: 34px; padding: 0 10px; background: var(--bg); color: var(--paper); border-radius: 0; }
.quantity-presets { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.quantity-presets button { min-width: 0; min-height: 40px; padding: 7px 4px; font-size: 11px; }
.quantity-presets button.active { background: var(--paper); color: var(--paper-text); outline: 2px solid var(--bg); outline-offset: -4px; }
.purchase-quantity-block label { margin-top: 10px; }
.range { display: block; width: 100%; height: 24px; appearance: none; padding: 0; margin: 14px 0 8px; border: 0; border-radius: 0; background: transparent; }
.range::-webkit-slider-runnable-track { height: 3px; background: var(--bg); }
.range::-moz-range-track { height: 3px; background: var(--bg); }
.range::-webkit-slider-thumb { appearance: none; width: 16px; height: 22px; margin-top: -9px; border-radius: 0; background: var(--bg); border: 2px solid var(--paper); box-shadow: 0 0 0 2px var(--bg); }
.range::-moz-range-thumb { width: 16px; height: 22px; border-radius: 0; background: var(--bg); border: 2px solid var(--paper); box-shadow: 0 0 0 2px var(--bg); }
.range-marks { display: flex; justify-content: space-between; padding-top: 4px; min-height: 18px; color: #6a6a6a; font-size: 9px; line-height: 1.4; }
.period-definition { margin-top: 7px; padding: 7px 9px; border: 2px solid var(--bg); color: var(--bg); font-size: 9px; font-weight: 700; line-height: 1.4; text-align: center; }
.purchase-summary { display: flex; justify-content: space-between; align-items: flex-end; padding: 15px 17px; margin: 18px 0 12px; border: 2px solid var(--bg); border-radius: 0; background: #fff; }
.purchase-summary span { font-size: 11px; color: #4a4a4a; font-weight: 700; text-transform: uppercase; }
.purchase-summary strong { font-size: 27px; letter-spacing: -.02em; }
.purchase-button { width: 100%; min-height: 52px; font-size: 14px; }
.trust-line { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 14px; color: #4a4a4a; font-size: 9.5px; margin-top: 14px; font-weight: 700; }
.trust-line span::before { content: "[+] "; }

.faq-section { margin-top: 30px; min-width: 0; }
.tariff-resource-links { display: flex; justify-content: center; align-items: center; gap: 9px; flex-wrap: wrap; margin: 26px 0 0; color: var(--paper); font-size: 10px; line-height: 1.5; text-align: center; }
.tariff-resource-links a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.tariffs-help { margin-top: 26px; }
.tariffs-help-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tariffs-help-links .help-contact-button { display: inline-flex; align-items: center; justify-content: center; min-width: 168px; background: transparent; border-color: var(--paper); color: var(--paper); text-decoration: none; }
.help-empty { color: var(--hint); font-size: 10px; font-weight: 700; }
.faq-heading { margin-bottom: 11px; color: var(--paper); font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.faq-list { display: grid; gap: 9px; }
.faq-item { background: var(--paper); color: var(--paper-text); border: 2px solid var(--paper); box-shadow: 4px 4px 0 rgba(255,255,255,.11); }
.faq-item summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 13px 14px; cursor: pointer; list-style: none; font-size: 11px; font-weight: 700; line-height: 1.5; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary b { flex: 0 0 auto; font-size: 10px; }
.faq-item[open] summary { border-bottom: 2px solid var(--bg); }
.faq-item[open] summary b { font-size: 0; }
.faq-item[open] summary b::after { content: "[-]"; font-size: 10px; }
.faq-item p { margin: 0; padding: 13px 14px; color: #4a4a4a; font-size: 10.5px; line-height: 1.65; }
.faq-item summary:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }
.faq-editor { display: grid; gap: 12px; margin: 10px 0; }
.faq-editor-row { padding: 12px; border: 2px solid var(--bg); background: #f2f2f2; }
.faq-editor-row textarea { min-height: 92px; }

.badge { display: inline-block; font-size: 10px; padding: 4px 9px; background: var(--bg); color: var(--paper); border-radius: 0; letter-spacing: .08em; font-weight: 700; text-transform: uppercase; }
.badge.active { background: var(--bg); }
.badge.expired { background: transparent; color: var(--paper-text); border: 2px solid var(--bg); }
.badge.pending { background: #d9d9d9; color: var(--paper-text); }
.key-code { font-family: inherit; font-size: 10.5px; word-break: break-all; background: var(--bg); color: var(--paper); padding: 10px 12px; border-radius: 0; margin: 8px 0; }
.msg { padding: 10px 14px; border: 2px solid var(--bg); border-radius: 0; margin-bottom: 7px; max-width: 84%; font-size: 12.5px; line-height: 1.45; white-space: pre-wrap; background: #fff; color: #0a0a0a; word-break: break-word; }
.msg.user { background: var(--bg); color: var(--paper); margin-left: auto; }
.msg.admin { background: #ececec; color: #0a0a0a; }
.msg a, .msg .msg-file-link { color: inherit; font-weight: 700; text-decoration: underline; word-break: break-all; }
.msg-image { display: block; max-width: 100%; max-height: 220px; margin-bottom: 6px; filter: grayscale(1) contrast(1.2); border: 2px solid currentColor; }
.msg-caption { margin-top: 4px; white-space: pre-wrap; }


#tabbar {
  position: fixed; z-index: 30; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(100%, 680px); display: flex;
  background: var(--bg);
  border-top: 2px solid var(--border-strong);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.tab { flex: 1; min-width: 0; min-height: 50px; background: none; border: 0; color: var(--hint); display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 14px; padding: 6px 2px; border-radius: 0; font-weight: 700; }
.tab span { font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.tab.active { color: var(--paper-text); background: var(--paper); }
.pill-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 14px; margin-bottom: 8px; scrollbar-width: none; }
.pill { flex: 0 0 auto; background: transparent; border: 2px solid var(--paper); border-radius: 0; padding: 7px 12px; font-size: 11px; cursor: pointer; color: var(--paper); font-family: inherit; font-weight: 700; }
.pill.active { background: var(--paper); color: var(--paper-text); }
.empty { color: var(--paper); background: transparent; text-align: center; padding: 42px 12px; line-height: 1.7; font-size: 12px; }
.empty::before { content: "[ "; color: var(--hint); white-space: pre; }
.empty::after { content: " ]"; color: var(--hint); white-space: pre; }
#loading { text-align: center; padding: 70px 0; color: var(--paper); }
#loading::after { content: " ..."; }
.admin-tariff-thumb { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; margin-bottom: 12px; filter: grayscale(1) contrast(1.3); background: #111; }
.instruction-button { width: 100%; margin: 0 0 16px; position: relative; border: 2px solid var(--border-strong) !important; outline: 2px solid #fff; outline-offset: -6px; padding-left: 34px; text-align: left; }
.instruction-button::before { content: "→"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 900; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  #sakura { opacity: .28; }
}
.tariff-choice-block { padding: 16px; margin-bottom: 14px; background: var(--paper); color: var(--paper-text); box-shadow: 6px 6px 0 rgba(255,255,255,.12); }
.tariff-choice-block.current-plan { outline: 3px solid var(--paper); outline-offset: -8px; }
.choice-label { display: block; margin-bottom: 12px; color: #4a4a4a; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.tariff-choice-block small, .target-plan small { display: block; margin-top: 4px; color: #6a6a6a; font-weight: 500; }
.target-plan { width: 100%; display: flex; justify-content: space-between; align-items: center; text-align: left; margin-top: 8px; border-radius: 0; background: transparent; border: 2px solid var(--bg); color: var(--paper-text); }
.target-plan.selected { background: var(--bg); color: var(--paper); }
.target-plan.selected small { color: #bdbdbd; }
.stats-card { padding: 5px 16px; }
.stat-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 2px solid #e6e6e6; font-size: 13px; }
.stat-row:last-child { border-bottom: 0; }
.stat-row b { font-size: 15px; }
.import-panel-user { outline: 3px solid var(--bg); outline-offset: -3px; }
.import-panel-user .row > div { flex: 1; }
.user-search-card .row { flex-wrap: nowrap; }
.user-search-card input { margin: 0; }
.user-search-card button { flex: 0 0 auto; }
.user-filter { margin-bottom: 10px; }
.user-results-count { margin: 10px 2px; color: #4a4a4a; font-weight: 700; }
.user-selected-chip { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 12px; border-radius: 0; color: var(--paper-text); font-size: 12px; background: var(--bg); color: var(--paper); }
.user-selected-chip .icon-button { background: var(--paper); border-color: var(--bg); color: var(--paper-text); }
.user-card { padding: 0; }
.user-summary { width: 100%; min-height: 72px; display: flex; align-items: center; justify-content: space-between; text-align: left; background: transparent; color: var(--paper-text); border: 0; border-radius: 0; }
.user-summary > span { display: flex; flex-direction: column; gap: 3px; }
.user-summary > span:last-child { text-align: right; align-items: flex-end; }
.user-summary small { color: #6a6a6a; font-size: 10px; font-weight: 500; }
.user-actions { padding: 0 14px 14px; border-top: 2px solid var(--bg); }
.user-actions > .row:first-child { margin-top: 13px; }
.user-actions button { font-size: 11.5px; }

.toast { position: fixed; z-index: 80; top: calc(76px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: calc(100% - 32px); max-width: 520px; padding: 12px 16px; background: var(--paper); color: var(--paper-text); border-radius: 0; font-size: 12px; font-weight: 700; box-shadow: 5px 5px 0 rgba(255,255,255,.2); }
.toast.error { background: var(--bg); color: var(--paper); outline: 2px solid var(--paper); }
.toast.success { background: var(--paper); }
.debug-console { position: fixed; z-index: 90; inset: auto 0 0 0; height: min(62vh, 560px); background: #050505; color: #e2e2e2; border-top: 2px solid var(--border-strong); display: flex; flex-direction: column; box-shadow: 0 -18px 60px rgba(0,0,0,.7); }
.debug-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 2px solid var(--border-strong); background: var(--bg); }
.debug-head > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.debug-head b { background: var(--paper); color: var(--paper-text); padding: 1px 8px; width: fit-content; }
.debug-head small { color: var(--hint); font-size: 9px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.debug-head .icon-button { background: transparent; border-color: var(--hint); color: var(--paper); }
.debug-log { overflow: auto; flex: 1; padding: 8px 12px calc(14px + env(safe-area-inset-bottom)); font: 10px/1.5 inherit; }
.debug-entry { display: grid; grid-template-columns: 74px 62px 1fr; gap: 8px; align-items: start; padding: 7px 0; border-bottom: 1px solid #1c1c1c; overflow-wrap: anywhere; }
.debug-entry time { color: var(--hint); white-space: nowrap; }
.debug-entry b { background: var(--paper); color: var(--paper-text); padding: 0 5px; white-space: nowrap; }
.debug-entry span { min-width: 0; word-break: break-word; }
.debug-entry.error b, .debug-entry.timeout b { background: var(--paper); color: var(--paper-text); text-decoration: underline; }
.debug-entry.success b { background: transparent; color: var(--paper); outline: 1px solid var(--paper); }
.debug-entry pre { grid-column: 2 / -1; margin: 3px 0 0; white-space: pre-wrap; color: var(--hint); }
.panel-log-head { position: sticky; top: 0; background: var(--paper); color: var(--paper-text); font-weight: 700; font-size: 11px; letter-spacing: .14em; padding: 6px 12px; border-bottom: 2px solid #000; }
.panel-log-line { padding: 5px 12px; border-bottom: 1px dashed rgba(255,255,255,.14); color: #d8d8d8; word-break: break-all; font-size: 10px; line-height: 1.5; }
.panel-log-empty { color: var(--hint); }

@media (max-width: 430px) {
  #app { padding-inline: 12px; }
  .row { flex-wrap: wrap; }
  .row button { flex: 1 1 auto; }
  .tariff-footer { flex-wrap: nowrap; }
  .tariff-footer button { flex: 0 0 auto; }
  #tariff-list { gap: 10px; }
  .slider-label { align-items: flex-start; }
  .slider-label > span:first-child { line-height: 34px; }
  #tariff-list .tariff-image { height: auto; }
  #tariff-list .tariff-content { padding: 11px 12px 12px; }
  #tariff-list .tariff-content > .row:first-child { align-items: flex-start; }
  #tariff-list .card-title { font-size: 13.5px; }
  #tariff-list .card-sub { font-size: 10px; }
  #tariff-list .price { font-size: 16px; }
  #tariff-list .tariff-footer button { min-height: 38px; padding: 8px 12px; font-size: 10.5px; }
  #tariff-list .period-chip { display: none; }
  .purchase-image { height: auto; }
  .purchase-body { padding: 16px 14px 14px; }
  .purchase-body h1 { font-size: 20px; margin-bottom: 5px; }
  .slider-block { padding: 12px 0 5px; margin-top: 12px; }
  .quantity-presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .range { margin-top: 14px; }
  .purchase-summary { padding: 12px 14px; margin: 12px 0 10px; }
  .debug-entry { grid-template-columns: 64px 56px 1fr; }
}

/* Motion-inspired interaction layer: transform/opacity only, no layout shifts. */
:root { --motion-spring: cubic-bezier(.22, 1, .36, 1); --motion-snap: cubic-bezier(.2, .8, .2, 1); --range-progress: 0%; }
button, .btn, .tab, .pill, .target-plan { transition: transform .24s var(--motion-spring), box-shadow .24s var(--motion-spring), background-color .16s ease, color .16s ease, opacity .16s ease; }
@media (hover: hover) {
  .tariff-card, .faq-item, .target-plan { transition: transform .3s var(--motion-spring), box-shadow .3s var(--motion-spring); }
  .tariff-card:hover, .faq-item:hover { transform: translateY(-4px); box-shadow: 8px 8px 0 rgba(255,255,255,.18); }
  .target-plan:hover { transform: translateX(4px); }
  .range:hover::-webkit-slider-thumb { transform: scale(1.16); }
  .range:hover::-moz-range-thumb { transform: scale(1.16); }
}
button:active, .btn:active, .tab:active, .pill:active { transform: translate(2px, 2px) scale(.97); box-shadow: 1px 1px 0 rgba(255,255,255,.22); }
.range::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--bg) 0 var(--range-progress), #c7c7c7 var(--range-progress) 100%); }
.range::-moz-range-track { background: linear-gradient(to right, var(--bg) 0 var(--range-progress), #c7c7c7 var(--range-progress) 100%); }
.range::-webkit-slider-thumb { transition: transform .2s var(--motion-spring); }
.range::-moz-range-thumb { transition: transform .2s var(--motion-spring); }
.range:active::-webkit-slider-thumb { transform: scale(1.28); }
.range:active::-moz-range-thumb { transform: scale(1.28); }
.motion-ui .motion-item { opacity: 0; transform: translateY(18px) scale(.985); transition: opacity .38s ease, transform .55s var(--motion-spring); transition-delay: var(--motion-delay, 0ms); will-change: transform, opacity; }
.motion-ui .motion-item.motion-in { opacity: 1; transform: none; will-change: auto; }
.faq-item[open] > p, .profile-disclosure[open] > *:not(summary) { animation: motion-content-in .3s var(--motion-spring) both; }
.site-modal-layer.motion-item { opacity: 1; transform: none; transition: none; animation: motion-overlay-in .18s ease-out both; }
.site-modal-layer .site-modal, .site-modal-layer > .card { transform-origin: 50% 70%; }
.toast:not(.hidden) { animation: motion-toast-in .38s var(--motion-spring) both; }
@keyframes motion-content-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes motion-overlay-in { from { background: rgba(0,0,0,0); } to { background: rgba(0,0,0,.82); } }
@keyframes motion-toast-in { from { opacity: 0; transform: translate(-50%, 12px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .motion-ui .motion-item { opacity: 1; transform: none; }
}
