/* =====================================================================
   A Web: pro.css v2  (design layer, loaded LAST so it wins over old files)
   Calm dark UI, one accent (your theme colour), smooth motion, and a
   mobile layout that stays put: no sideways scrolling, no zoom-on-tap.
   ===================================================================== */

:root {
  --bg: #0a0b0f;
  --bg2: #0f1117;
  --card: #12141b;
  --card2: #191c26;
  --soft: #191c26;
  --ink: #eef0f5;
  --mut: #8d95a8;
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .16);
  --g2: color-mix(in srgb, var(--g) 80%, #000);
  --v: var(--g2);
  --r: 12px;
  --r2: 18px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sh: 0 1px 2px rgba(0, 0, 0, .45), 0 22px 44px -20px rgba(0, 0, 0, .75);
  --font: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

/* ---------- base + "stay anchored" safety net ---------- */
html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;          /* no double-tap zoom, pinch still works */
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-x: none;
}
html body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg) !important;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 100%;
  overflow-x: clip;
  cursor: auto !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}
#app, main { min-width: 0; max-width: 100%; }
img, video, canvas, svg, iframe, embed { max-width: 100%; }
pre { white-space: pre-wrap; }
p, h1, h2, h3, h4, small, li, .card, .box, td { overflow-wrap: anywhere; }
.grid > *, .row > *, .hero > *, .stats > *, .chat > *, .cx > *, .fw > * { min-width: 0; }
.tabs, nav, #mbar { -webkit-overflow-scrolling: touch; }
html body::before, html body::after { content: none !important; display: none !important; }
#grain, #cg, #gl, #cur, .orb { display: none !important; }
::selection { background: color-mix(in srgb, var(--g) 45%, transparent) !important; color: #fff !important; }
:focus-visible { outline: 2px solid var(--g) !important; outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
#pro-rm { display: block; position: absolute; width: 0; height: 0; overflow: hidden; }
@media (prefers-reduced-motion: reduce) { #pro-rm { display: none; } }

html body h1, html body h2, html body h3, html body nav a, html body .btn, html body .stats b { font-family: var(--font) !important; }

/* soft colour mesh behind everything (moves slowly on desktop, still on phones) */
html:root:root:root:root::before {
  content: "" !important;
  display: block !important;
  position: fixed;
  inset: -15%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42% 38% at 14% 8%, color-mix(in srgb, var(--g) 17%, transparent), transparent 70%),
    radial-gradient(38% 36% at 92% 14%, rgba(80, 110, 255, .10), transparent 70%),
    radial-gradient(46% 40% at 70% 100%, color-mix(in srgb, var(--g) 9%, transparent), transparent 70%);
}
html:root:root:root:root:not(.lite)::before { animation: proDrift 32s ease-in-out infinite alternate; will-change: transform; }
html:root:root:root:root.follow::before { animation: none; transform: translate3d(var(--gx, 0px), var(--gy, 0px), 0); }
@keyframes proDrift { to { transform: translate3d(3%, 2.5%, 0) scale(1.06); } }
html:root:root:root:root::after { display: none !important; content: none !important; }

/* ---------- header / navigation ---------- */
html body header {
  height: 64px;
  background: rgba(10, 11, 15, .72) !important;
  backdrop-filter: blur(16px) saturate(1.3) !important;
  border-bottom: 1px solid transparent !important;
  transition: border-color .3s var(--ease), background .3s var(--ease), height .3s var(--ease);
}
html.scrolled body header { border-bottom-color: var(--line) !important; background: rgba(10, 11, 15, .88) !important; height: 58px; }
html body header .logo, html body .fw img, html body .auth-logo {
  border-radius: 9px; background: #fff; padding: 2px; transform: none !important;
}
html body nav a {
  height: 36px; padding: 0 13px; border-radius: 9px;
  font-size: 14px; font-weight: 600; color: var(--mut); letter-spacing: 0;
  transition: color .2s, background .25s var(--ease);
}
html body nav a::after {
  display: block !important; content: "" !important;
  left: 50% !important; right: auto !important; bottom: 3px !important;
  width: 16px !important; height: 2px !important; margin-left: -8px;
  border-radius: 2px; background: var(--g) !important;
  transform: scaleX(0) !important; transition: transform .35s var(--ease) !important;
}
html body nav a:hover { background: var(--card2); color: var(--ink); }
html body nav a.on { background: transparent; color: var(--ink); box-shadow: none; }
html body nav a.on::after { transform: scaleX(1) !important; }

/* ---------- headings ---------- */
html body h1 {
  background: none !important; -webkit-text-fill-color: currentColor !important;
  color: var(--ink) !important; animation: none !important;
  font-weight: 800; letter-spacing: -.04em; line-height: 1.06;
}
html body h1 .ac {
  background: linear-gradient(100deg, var(--g), color-mix(in srgb, var(--g) 55%, #ffc27a)) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}
html body h2 { padding-left: 0 !important; font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin: 44px 0 16px; }
html body h2::before { display: none !important; }
html body h3 { font-weight: 700; letter-spacing: -.01em; }
html body .ph { border-bottom: 1px solid var(--line) !important; padding-bottom: 24px; margin-bottom: 32px; }
html body .ph h1 { font-size: clamp(28px, 4vw, 40px); }
html body .ph p { color: var(--mut); }

/* ---------- hero ---------- */
html body .hero { gap: 64px; padding: 28px 0 52px; }
html body .hero h1 { font-size: clamp(36px, 5.2vw, 60px); }
html body .hero .lead { color: var(--mut); font-size: 18px; max-width: 44ch; }
html body .hero > img {
  max-width: 250px; background: #fff !important; border-radius: 30px !important; padding: 26px !important;
  animation: none !important;
  box-shadow: 0 0 0 1px var(--line2), 0 40px 80px -30px color-mix(in srgb, var(--g) 40%, #000), 0 20px 40px -20px rgba(0, 0, 0, .8) !important;
  transition: transform .6s var(--ease);
}
html body .hero > img { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); will-change: transform; }
@media (hover: hover) { html body .hero > img:hover { transition: transform .15s ease-out; } }

/* ---------- stats ---------- */
html body .stats { margin-bottom: 52px; }
html body .stats div { padding: 24px 28px; border-left: 1px solid var(--line) !important; transition: background .3s; }
html body .stats div:first-child { border-left: 0 !important; }
html body .stats b {
  background: none !important; -webkit-text-fill-color: currentColor !important; color: var(--ink) !important;
  font-size: 36px; font-weight: 800; letter-spacing: -.035em;
}
html body .stats small { text-transform: uppercase; letter-spacing: .09em; font-size: 11px; font-weight: 700; color: var(--mut); }

/* ---------- cards / boxes ---------- */
html body .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)) !important; gap: 20px; grid-auto-flow: row !important; }
html body .grid > .card { grid-column: auto !important; grid-row: auto !important; }
html body .card, html body .box { border-radius: 16px !important; }
html body .card { position: relative; transition: transform .35s var(--ease), border-color .3s, box-shadow .35s var(--ease) !important; }
html body .card::before {
  display: block !important; content: "" !important; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  border-radius: inherit; opacity: 0; transition: opacity .3s;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--g) 13%, transparent), transparent 65%);
}
@media (hover: hover) {
  html body .card:hover { transform: translateY(-4px) !important; }
  html body .card:hover::before { opacity: 1; }
}
html body .card img.cv { height: 190px; min-height: 0 !important; transition: transform .8s var(--ease) !important; }
html body .card:hover img.cv { transform: scale(1.04) !important; }
html body .card > div { padding: 18px 20px; }
html body .card h3 { font-size: 17px; margin-bottom: 6px; }
html body .card p { color: var(--mut); font-size: 14.5px; }
html body .card small { display: block; margin-top: 10px; font-size: 12.5px; }
html body .empty { border-radius: 16px; color: var(--mut); }

/* scroll reveal: the site's own .rv/.in system, restyled to a soft fade-up */
@keyframes proRise { from { opacity: 0; transform: translateY(18px); } }
html body .rv.in { animation: proRise .75s var(--ease) backwards !important; animation-delay: calc(var(--d, 0) * 60ms) !important; }

/* ---------- buttons ---------- */
html body .btn, html body button.b {
  background: linear-gradient(180deg, color-mix(in srgb, var(--g) 88%, #fff), var(--g)) !important;
  border: 1px solid color-mix(in srgb, var(--g) 65%, #000) !important;
  border-radius: 11px !important; color: #fff; font-weight: 700; letter-spacing: 0; padding: 10px 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 8px 20px -10px color-mix(in srgb, var(--g) 70%, transparent) !important;
  transition: transform .25s var(--ease), filter .2s, box-shadow .25s var(--ease) !important;
}
html body .btn::after { display: none !important; }
@media (hover: hover) {
  html body .btn:hover, html body button.b:hover {
    transform: translateY(-1px) !important; filter: brightness(1.08) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 14px 26px -12px color-mix(in srgb, var(--g) 80%, transparent) !important;
  }
}
html body .btn:active, html body button.b:active { transform: scale(.97) !important; transition-duration: .08s !important; }
html body .btn.o {
  background: transparent !important; color: var(--ink) !important;
  border: 1px solid var(--line2) !important; box-shadow: none !important;
}
@media (hover: hover) { html body .btn.o:hover { background: var(--card2) !important; border-color: rgba(255, 255, 255, .3) !important; box-shadow: none !important; } }
html body .btn.s { padding: 6px 12px; font-size: 13px; }

/* ---------- forms ---------- */
html body input, html body textarea, html body select {
  background: var(--bg2) !important; border: 1px solid var(--line) !important; border-radius: 11px !important; color: var(--ink) !important;
  transition: border-color .2s, box-shadow .25s var(--ease), background .2s;
}
html body input:focus, html body textarea:focus, html body select:focus {
  border-color: var(--g) !important; background: var(--card) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--g) 20%, transparent) !important;
}
html body input::placeholder, html body textarea::placeholder { color: #626a7c; }

/* ---------- tabs / chips ---------- */
html body .tabs button, html body .rooms button, html body .adm aside button {
  background: transparent !important; color: var(--mut) !important; border: 1px solid var(--line) !important;
  border-radius: 10px !important; font-weight: 600; transform: none !important;
  transition: color .2s, background .25s var(--ease), border-color .2s;
}
html body .tabs button:hover, html body .rooms button:hover, html body .adm aside button:hover { color: var(--ink) !important; background: var(--card2) !important; border-color: var(--line2) !important; }
html body .tabs button.on, html body .rooms button.on, html body .adm aside button.on {
  background: var(--card2) !important; color: var(--ink) !important; border-color: var(--line2) !important; box-shadow: inset 0 -2px 0 var(--g);
}

/* ---------- modals / toast / avatar ---------- */
html body .ov { background: rgba(4, 5, 8, .7) !important; backdrop-filter: blur(6px) !important; animation: proFade .25s ease both !important; }
html body .mod { border-radius: 20px; animation: proPop .4s var(--ease) both; }
@keyframes proFade { from { opacity: 0; } }
@keyframes proPop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
html body .x { background: var(--card2) !important; color: var(--ink); transition: background .2s, transform .2s var(--ease); }
html body .x:hover { background: #262a38 !important; transform: rotate(90deg); }
html body #toast { background: var(--card2) !important; border: 1px solid var(--line2); color: var(--ink); border-radius: 12px; box-shadow: var(--sh); }
html body .av { background: var(--g) !important; border: 2px solid var(--bg) !important; box-shadow: 0 0 0 1px var(--line2) !important; }
html body .av:hover { transform: none !important; box-shadow: 0 0 0 1px var(--g) !important; }
html body #sp0, html body #spb { height: 2px !important; background: var(--g) !important; }
html body footer { background: var(--bg2) !important; border-top: 1px solid var(--line) !important; }

/* page change: one soft fade-up */
@keyframes proIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
html body #app > * { animation: proIn .5s var(--ease) both !important; }

/* =====================================================================
   High-specificity pass: beats the old phone/"lite" glass rules so desktop
   and phones look the same and clean.
   ===================================================================== */
html:root:root:root:root body :is(.box, .card, .rooms, .stats, .nw, .hw .box, .cx .cwin, .acc3, .acs, .svi, .fxpw) {
  background-color: var(--card) !important; background-image: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  border: 1px solid var(--line) !important; box-shadow: none !important;
}
html:root:root:root:root body .stats { border-radius: var(--r2) !important; overflow: hidden; }
@media (hover: hover) { html:root:root:root:root body .card:hover { border-color: var(--line2) !important; box-shadow: var(--sh), 0 24px 40px -30px color-mix(in srgb, var(--g) 40%, transparent) !important; } }
html:root:root:root:root body .mod { background-color: var(--card) !important; background-image: none !important; border: 1px solid var(--line2) !important; box-shadow: 0 30px 80px rgba(0, 0, 0, .65) !important; }
html:root:root:root:root header { -webkit-backdrop-filter: blur(16px) saturate(1.3) !important; backdrop-filter: blur(16px) saturate(1.3) !important; }
html:root:root:root:root .dock, html:root:root:root:root #mbar, html:root:root:root:root #nfp {
  background-color: rgba(17, 19, 26, .9) !important; background-image: none !important;
  border: 1px solid var(--line2) !important; box-shadow: var(--sh) !important;
}
html:root:root:root:root #aip { background-color: rgba(17, 19, 26, .96) !important; }
html:root:root:root:root .hero::before, html:root:root:root:root #app h2::after { display: none !important; content: none !important; }

/* login card */
html:root:root:root:root .lc, html:root:root:root:root .lg .box {
  background: var(--card) !important; background-image: none !important;
  border: 1px solid var(--line2) !important; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8) !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
html:root:root:root:root .lc::before, html:root:root:root:root .lc::after { display: none !important; }
html:root:root:root:root .lc h1, html:root:root:root:root .lc .gt, html:root:root:root:root .gt2 { background: none !important; -webkit-text-fill-color: currentColor !important; color: var(--ink) !important; animation: none !important; }
html:root:root:root:root .lc .btn:not(.o), html:root:root:root:root .lc button.b { background-color: var(--g) !important; border-radius: 11px !important; }
html:root:root:root:root .lgo, html:root:root:root:root .lc .lgo { background: #fff !important; border-radius: 16px !important; padding: 8px !important; box-shadow: 0 0 0 1px var(--line2) !important; }
html:root:root:root:root .hup .sec a {
  font: 600 13px var(--font); color: var(--mut); text-decoration: none; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 9px; transition: color .2s, border-color .2s, background .2s;
}
html:root:root:root:root .hup .sec a:hover { color: var(--ink); background: var(--card2); border-color: var(--line2); }
html:root:root:root:root .stats div { transform: none !important; animation: none !important; display: flex; flex-direction: column; justify-content: flex-start; }
a { text-underline-offset: 3px; }


/* floating A-AI button: one calm accent ring instead of the rainbow; no covering bubble on phones */
html:root:root:root:root #aitip { background: var(--card2) !important; color: var(--ink) !important; border: 1px solid var(--line2); border-radius: 12px !important; box-shadow: var(--sh) !important; font-weight: 600; }
html:root:root:root:root #aif0 { box-shadow: 0 0 0 2px var(--g), 0 10px 26px -8px color-mix(in srgb, var(--g) 60%, transparent) !important; }
html:root:root:root:root #aif0 .or2, html:root:root:root:root #aif0 .or1 { display: none !important; }
@media (max-width: 800px) { html:root:root:root:root #aitip { display: none !important; } }


/* =====================================================================
   v3: home news as a stacked feed, cleaner empty states, form controls,
   footer alignment, desktop nav fit, image fade-in
   ===================================================================== */
html { scroll-padding-top: 84px; }

/* ---- home: "Latest news" cards stacked above each other ---- */
html body #app:has(.hero) .grid { grid-template-columns: 1fr !important; gap: 16px; }
html body #app:has(.hero) .grid > .card { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: stretch; overflow: hidden; }
html body #app:has(.hero) .grid > .card:not(:has(> img.cv)) { grid-template-columns: 1fr; }
html body #app:has(.hero) .grid > .card > img.cv { width: 100%; height: 100% !important; min-height: 190px !important; max-height: 250px; object-fit: cover; border-radius: 0 !important; }
html body #app:has(.hero) .grid > .card > div { padding: 26px 30px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
html body #app:has(.hero) .grid > .card h3 { font-size: 21px; letter-spacing: -.02em; margin-bottom: 8px; }
html body #app:has(.hero) .grid > .card p { font-size: 15px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
html body #app:has(.hero) .grid > .card small {
  display: inline-flex; align-self: flex-start; margin-top: 14px; padding: 4px 11px; border-radius: 99px;
  background: var(--card2); border: 1px solid var(--line); color: var(--mut); font-size: 12px; font-weight: 600;
}
html body #app:has(.hero) .grid > .card:hover img.cv { transform: scale(1.04) !important; }
@media (max-width: 700px) {
  html body #app:has(.hero) .grid > .card { grid-template-columns: 1fr; }
  html body #app:has(.hero) .grid > .card > img.cv { height: 190px !important; min-height: 0 !important; }
  html body #app:has(.hero) .grid > .card > div { padding: 20px; }
  html body #app:has(.hero) .grid > .card h3 { font-size: 19px; }
}

/* ---- empty states: calm, no illustration ---- */
html:root:root:root:root .empty::before, html:root:root:root:root #ms .empty::before, html:root:root:root:root .cwin .empty::before { display: none !important; content: none !important; }
html body .empty { padding: 44px 24px; text-align: center; font-size: 15px; line-height: 1.6; }

/* ---- form controls ---- */
html { accent-color: var(--g); }
html body input[type=range] { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0; min-height: 0; }
html body input[type=checkbox], html body input[type=radio] { min-height: 0; border-radius: 5px !important; }
html body input[type=color] { padding: 4px; min-height: 44px; cursor: pointer; }
html body input[type=file] { padding: 10px; }

/* ---- footer lines up with the page content ---- */
html body footer { padding-inline: max(24px, calc((100% - 1160px) / 2 + 24px)) !important; }
html body .fw a { transition: color .2s, transform .25s var(--ease); }
@media (hover: hover) { html body .fw a:hover { transform: translateX(3px); } }

/* ---- desktop nav: fit everything when logged in ---- */
@media (min-width: 801px) and (max-width: 1500px) {
  html body nav a { padding: 0 8px; font-size: 13px; }
  html:root:root:root:root header .un, html:root:root:root:root #top .un { display: none !important; }
}

/* ---- images fade in as they appear (safe: animation only, nothing stays hidden) ---- */
@keyframes proImg { from { opacity: 0; } }
html body #app img.cv { animation: proImg .7s ease backwards; }


/* back-to-top button: calm, and clear of the A-AI button */
html:root:root:root:root #up { background: var(--card2) !important; color: var(--ink) !important; border: 1px solid var(--line2) !important; box-shadow: var(--sh) !important; right: 26px; bottom: 108px !important; }
@media (max-width: 800px) { html:root:root:root:root #up { right: 18px; bottom: calc(164px + var(--sab)) !important; } }

/* =====================================================================
   PHONES AND TABLETS: compact, anchored, thumb-friendly
   ===================================================================== */
@media (max-width: 800px) {
  html body header { height: 56px; padding: 0 14px; padding-top: var(--sat); box-sizing: content-box; gap: 12px; }
  html.scrolled body header { height: 52px; }
  html body header .logo { height: 32px; }
  html body main { padding: 22px 16px 120px; width: 100%; }
  html body h1 { font-size: clamp(28px, 8.4vw, 36px) !important; }
  html body .hero h1 { font-size: clamp(32px, 9.4vw, 42px) !important; }
  html body h2 { font-size: 18px; margin: 34px 0 14px; }
  html body .ph { padding-bottom: 18px; margin-bottom: 22px; }
  html body .hero { grid-template-columns: 1fr; gap: 20px; padding: 6px 0 30px; }
  html body .hero > img { order: -1; max-width: 104px; padding: 14px !important; border-radius: 22px !important; justify-self: start; }
  html body .hero .lead { font-size: 16px; margin: 12px 0 22px; }
  html body .stats { grid-template-columns: repeat(2, 1fr); margin-bottom: 36px; }
  html body .stats div { padding: 18px 20px; }
  html body .stats div:nth-child(odd) { border-left: 0 !important; }
  html body .stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  html body .stats b { font-size: 30px; }
  html body .grid { gap: 14px; }
  html body .card img.cv { height: 178px; }
  html body .btn, html body button.b, html body .tabs button { min-height: 44px; }
  html body input, html body textarea, html body select { font-size: 16px !important; min-height: 46px; }
  html body textarea { min-height: 96px; }
  html body .btns, html body .row { gap: 10px; }
  html body .tabs {
    overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; scroll-snap-type: x proximity;
    margin-inline: -16px; padding: 0 16px 6px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 28px), transparent);
  }
  html body .tabs::-webkit-scrollbar { display: none; }
  html body .tabs > * { flex: none; scroll-snap-align: start; }
  html body table { display: block; max-width: 100%; overflow-x: auto; }

  /* bottom bar */
  html:root:root:root:root #mbar {
    left: 10px; right: 10px; bottom: calc(10px + var(--sab));
    border-radius: 22px !important; padding: 6px; gap: 2px;
    background-color: rgba(15, 17, 23, .94) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.3) !important; backdrop-filter: blur(18px) saturate(1.3) !important;
  }
  html body #mbar a { border-radius: 16px !important; min-height: 52px; position: relative; transition: background .25s var(--ease), color .2s; }
  html:root:root:root:root #mbar a.on { background: var(--card2) !important; background-image: none !important; color: var(--ink) !important; box-shadow: none !important; }
  html body #mbar a.on i { transform: none !important; }
  html body #mbar a.on::after {
    content: ""; position: absolute; top: 3px; left: 50%; width: 16px; height: 3px; margin-left: -8px;
    border-radius: 3px; background: var(--g);
  }
  html body #toast { bottom: calc(92px + var(--sab)); max-width: calc(100vw - 32px); text-align: center; }
  html body .dock { bottom: calc(86px + var(--sab)); }
  html body .mod, html body .mod.w, html body .mod.acc { max-height: 90dvh; padding-bottom: calc(24px + var(--sab)); }
  html body .lg { min-height: calc(100dvh - 130px); }
}

@media (max-width: 560px) {
  html body header > a:first-child { flex: none; }
  html body header .logo { width: auto; height: 30px; flex: none; }
  html:root:root:root:root header .un, html:root:root:root:root #top .un { display: none !important; }
  html body header { gap: 8px; }
}
@media (max-width: 380px) {
  html body main { padding-inline: 14px; }
  html body .stats b { font-size: 26px; }
}
/* touch screens: no hover lifts that get "stuck" after a tap */
@media (hover: none) {
  html body .card:hover, html body .btn:hover, html body .hero > img:hover { transform: none !important; }
  html body .card:hover img.cv { transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html body #app > *, html body .card, html body .rv.in, html body .mod, html body .ov { animation: none !important; transition: none !important; }
  html:root:root:root:root:not(.lite)::before { animation: none; }
}