@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/geist-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/geist-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/geist-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/geist-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/geist-mono-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/geist-mono-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/geist-mono-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/geist-mono-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }



:root {
  color-scheme: light;

  --bg: #e8ebed;
  --sidebar: #dfe3e7;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --border: #dcdfe2;
  --border-strong: #c9ced4;
  --text: #333333;
  --text-2: #4b5563;
  --muted: #5b6372;
  --primary: #4263eb;
  --primary-hover: #3b5bdb;
  --tg-brand: #0079bf;
  --tg-brand-hover: #006aa8;
  --primary-fg: #ffffff;
  --primary-soft: #e5ebff;
  --cmd: #3451c9;
  --accent: #d6e4f0;
  --accent-fg: #1e3a8a;
  --ring: #4263eb;
  --warn: #a16207;
  --warn-soft: #fef6dc;
  --note: #1e3a8a;
  --note-soft: #e3edf7;

  --tint-blue: var(--primary-soft);
  --tint-blue-fg: var(--cmd);
  --tint-yellow: var(--warn-soft);
  --tint-yellow-fg: var(--warn);
  --tint-green: #e3f0e6;
  --tint-green-fg: #2e6a3e;
  --tint-red: #fbe9e9;
  --tint-red-fg: #9f2f2d;
  --tint-purple: #efe9fb;
  --tint-purple-fg: #5b3fa0;
  --tint-teal: #dff1ef;
  --tint-teal-fg: #1f6b66;

  --gold: #8a611a;
  --gold-hue: #c89b3c;
  --gold-soft: color-mix(in srgb, var(--gold-hue) 9%, var(--surface));
  --gold-head: color-mix(in srgb, var(--gold-hue) 15%, var(--surface-2));
  --gold-line: color-mix(in srgb, var(--gold-hue) 38%, var(--border));

  --header-bg: rgba(232, 235, 237, .8);
  --overlay: rgba(28, 36, 51, .42);
  --hover-shadow: 0 2px 8px rgba(0, 0, 0, .04);
  --dots: var(--border-strong);

  --tg-bg: #e4ebf0;
  --tg-in: #ffffff;
  --tg-out: #effedd;
  --tg-text: #000000;
  --tg-link: #168acd;
  --tg-meta: #a0acb6;
  --tg-out-meta: #5fad5a;
  --tg-out-via: #3a9a35;
  --tg-code-bg: rgba(0, 0, 0, .05);
  --tg-btn: rgba(255, 255, 255, .62);
  --tg-btn-fg: #168acd;
  --tg-checks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10' fill='none' stroke='%234fae4e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 5.2 3.9 8 10 1.5'/%3E%3Cpath d='M7.4 7.6 7.8 8 13.9 1.5'/%3E%3C/svg%3E");

  --tg-btn-success: #3a9e4f;
  --tg-btn-danger: #d9464b;
  --tg-btn-primary: #2f86d4;
  --tg-btn-on: #ffffff;

  --tg-service: rgba(255, 255, 255, .72);
  --tg-service-fg: #3b4d5c;
  --tg-toast: rgba(28, 36, 45, .86);
  --tg-toast-fg: #ffffff;
  --tg-quote: rgba(22, 138, 205, .08);

  --tg-photo-meta: rgba(0, 0, 0, .45);
  --tg-photo-meta-fg: #ffffff;

  --tg-ava-1: #e17076; --tg-name-1: #c8434b;
  --tg-ava-2: #eda86c; --tg-name-2: #c46b1f;
  --tg-ava-3: #a695e7; --tg-name-3: #7a5fd6;
  --tg-ava-4: #7bc862; --tg-name-4: #3d9429;
  --tg-ava-5: #6ec9cb; --tg-name-5: #1f8f92;
  --tg-ava-6: #65aadd; --tg-name-6: #2f7ab8;

  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --header-h: 64px;
  --strip-h: 44px;
  --sticky: calc(var(--header-h) + var(--strip-h));
  --gutter: 48px;
  --bleed: 32px;
  --ease-out: cubic-bezier(.32, .72, 0, 1);
  --ease-reveal: cubic-bezier(.16, 1, .3, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #1c2433;
  --sidebar: #222938;
  --surface: #2a3040;
  --surface-2: #313849;
  --border: #3a4152;
  --border-strong: #4a5266;
  --text: #e5e5e5;
  --text-2: #c4c7ce;
  --muted: #a3a3a3;
  --primary: #4263eb;
  --primary-hover: #5470f0;
  --tg-brand: #0079bf;
  --tg-brand-hover: #006aa8;
  --primary-fg: #ffffff;
  --primary-soft: #2a3656;
  --cmd: #a5b8ff;
  --accent: #2a3656;
  --accent-fg: #bfdbfe;
  --ring: #7c93f5;
  --warn: #eab308;
  --warn-soft: #3a3320;
  --note: #bfdbfe;
  --note-soft: #2a3656;

  --tint-green: #243a31;
  --tint-green-fg: #8fcf9f;
  --tint-red: #3f272c;
  --tint-red-fg: #f0a8a8;
  --tint-purple: #33294a;
  --tint-purple-fg: #c3b0f5;
  --tint-teal: #1f3a3a;
  --tint-teal-fg: #7fd6d8;

  --gold: #e6c47e;
  --gold-hue: #d9b263;
  --gold-soft: color-mix(in srgb, var(--gold-hue) 9%, var(--surface));
  --gold-head: color-mix(in srgb, var(--gold-hue) 15%, var(--surface-2));
  --gold-line: color-mix(in srgb, var(--gold-hue) 32%, var(--border));

  --header-bg: rgba(28, 36, 51, .8);
  --overlay: rgba(8, 12, 20, .62);

  --tg-bg: #0e1621;
  --tg-in: #182533;
  --tg-out: #2b5278;
  --tg-text: #f5f5f5;
  --tg-link: #6ab3f3;
  --tg-meta: #6d7f8f;
  --tg-out-meta: #7da8d3;
  --tg-out-via: #8cc6ff;
  --tg-code-bg: rgba(255, 255, 255, .06);
  --tg-btn: rgba(255, 255, 255, .08);
  --tg-btn-fg: #ffffff;
  --tg-checks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10' fill='none' stroke='%2372bcfd' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 5.2 3.9 8 10 1.5'/%3E%3Cpath d='M7.4 7.6 7.8 8 13.9 1.5'/%3E%3C/svg%3E");
  --tg-btn-success: #2f8a45;
  --tg-btn-danger: #c2403f;
  --tg-btn-primary: #2b77bd;
  --tg-service: rgba(255, 255, 255, .09);
  --tg-service-fg: #c3cfda;
  --tg-toast: rgba(0, 0, 0, .62);
  --tg-quote: rgba(106, 179, 243, .1);
  --tg-name-1: #ff8a8f;
  --tg-name-2: #f5b36f;
  --tg-name-3: #b8a8f5;
  --tg-name-4: #8fd477;
  --tg-name-5: #7fd6d8;
  --tg-name-6: #79baf0;
}

.g-start { --g-bg: var(--tint-blue); --g-fg: var(--tint-blue-fg); }
.g-rel { --g-bg: var(--tint-red); --g-fg: var(--tint-red-fg); }
.g-games { --g-bg: var(--tint-purple); --g-fg: var(--tint-purple-fg); }
.g-fun { --g-bg: var(--tint-yellow); --g-fg: var(--tint-yellow-fg); }
.g-chat { --g-bg: var(--tint-green); --g-fg: var(--tint-green-fg); }
.g-shop { --g-bg: var(--tint-teal); --g-fg: var(--tint-teal-fg); }

@media (max-width: 959px) {
  :root { --header-h: 56px; --gutter: 32px; --bleed: 16px; }
}
@media (max-width: 639px) {
  :root { --gutter: 20px; --bleed: 0px; }
}
@media (min-width: 1280px) {
  :root { --sticky: var(--header-h); }
}
@media (min-width: 1440px) {
  :root { --bleed: 48px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
}
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }
.has-route #home { display: none; }

img, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
a, button, [role="button"] { -webkit-tap-highlight-color: transparent; }

::selection { background: var(--primary-soft); color: var(--text); }
:root[data-theme="dark"] ::selection { color: var(--primary-fg); background: var(--primary); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.i {
  width: 18px;
  height: 18px;
  flex: none;
  fill: currentColor;
}

kbd {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 5px;
}

.theme-switching, .theme-switching *, .theme-switching *::before, .theme-switching *::after {
  transition: none !important;
}
::view-transition-old(root), ::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 6px;
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .15s ease;
}
.skip-link:focus-visible { transform: none; outline-color: var(--primary-fg); outline-offset: -4px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn .i { width: 16px; height: 16px; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-2); }
.btn-tg { background: var(--tg-brand); color: #fff; }
.btn-tg:hover { background: var(--tg-brand-hover); }
.btn-tg .i, .btn-primary .i { width: 17px; height: 17px; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 14px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { background: var(--border); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 20px 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 6px;
  margin-left: -6px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark { width: 20px; height: 20px; color: var(--primary); flex: none; fill: currentColor; }
.brand-name { font-size: 16px; font-weight: 600; letter-spacing: -.015em; }
.brand-sub {
  padding-left: 10px;
  border-left: 1px solid var(--border-strong);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 16px;
}
.brand-ava { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 1px var(--border); }
.brand .brand-ava { transition: transform .4s var(--ease-out); }
.brand:hover .brand-ava { transform: scale(1.08); }

.menu-btn { display: none; }

.header-inner > .icon-btn, .header-inner > .brand, .header-actions { flex: none; }
.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 260px;
  min-width: 0;
  height: 36px;
  margin-left: auto;
  padding: 0 6px 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.search-trigger .i { width: 16px; height: 16px; }
.search-trigger:hover { border-color: var(--border-strong); color: var(--text-2); }
.search-trigger-text { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 759px) { .brand-sub { display: none; } }

.header-actions { display: flex; align-items: center; gap: 4px; margin-left: 4px; }
.bot-link { margin-left: 4px; }

.theme-btn .i-moon { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-moon { display: block; }
.theme-btn .i { transition: transform .3s var(--ease-out); }
.theme-btn:active .i { transform: rotate(-30deg) scale(.9); }

.layout {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  min-height: calc(100vh - var(--header-h));
}
.main-wrap { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
main { min-width: 0; outline: none; }
.page {
  max-width: calc(720px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 40px var(--gutter) 48px;
}

@media (min-width: 1280px) {
  .main-wrap {
    grid-template-columns: minmax(0, calc(720px + 2 * var(--gutter))) 232px;
    justify-content: center;
    column-gap: 8px;
  }
  .page { margin: 0; }
  .is-home .main-wrap { grid-template-columns: minmax(0, 1040px); }
  .is-home .page { max-width: 1040px; }
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
}
@media (min-width: 960px) {
  .sidebar {
    position: sticky;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
  }
}

.drawer-head { display: none; }

.side-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 14px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.side-group { margin-top: 22px; }
.side-title {
  margin: 0 0 4px;
  padding: 0 11px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 24px;
  color: var(--muted);
}
.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  padding: 4px 10px;
  margin: 1px 0;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.side-link .i { width: 16px; height: 16px; color: var(--muted); transition: color .15s ease; }
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link:hover .i { color: var(--text-2); }
.side-link[aria-current="page"] {
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 500;
}
.side-link[aria-current="page"] .i { color: currentColor; }

.side-group .side-link .i,
.side-group .side-link:hover .i,
.side-group .side-link[aria-current="page"] .i { color: var(--g-fg); }

:root:not([data-theme="dark"]) .side-link[aria-current="page"] {
  border-color: color-mix(in srgb, var(--accent-fg) 16%, transparent);
}

.side-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 12px 25px;
  border-top: 1px solid var(--border);
}
.side-foot-label { font-size: 13px; font-weight: 500; color: var(--muted); }

.theme-switch {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
}
.theme-switch button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.theme-switch .i { width: 16px; height: 16px; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button[aria-checked="true"] {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
:root[data-theme="dark"] .theme-switch { background: var(--bg); }

.backdrop { display: none; }

.local-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  display: flex;
  align-items: center;
  height: var(--strip-h);
  padding: 0 calc(var(--gutter) - 8px);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--border);
}
.is-home .local-nav { display: none; }
@media (min-width: 1280px) { .local-nav { display: none; } }

.local-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}
.local-nav-btn:hover { color: var(--text); }
.local-nav-btn .chev { flex: none; width: 14px; height: 14px; transition: transform .2s var(--ease-out); }

.local-nav-btn { flex: 1 1 auto; min-width: 0; justify-content: flex-start; }
.local-nav-title { flex: 0 1 auto; min-width: 0; max-width: 50%; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.local-nav-current { min-width: 0; overflow: hidden; color: var(--text); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.local-nav-current:empty { display: none; }
.local-nav-current::before { content: "›"; margin: 0 6px 0 2px; color: var(--muted); font-weight: 400; }

.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

.to-top {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity .2s ease, transform .25s var(--ease-out), background-color .15s ease, color .15s ease;
}
.to-top .i { width: 16px; height: 16px; }
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--surface-2); color: var(--text); }
.to-top-strip { margin-left: 8px; }
.to-top-strip::after { content: ""; position: absolute; inset: -4px; }
.to-top-float { display: none; }
@media (min-width: 1280px) {
  .to-top-float { position: fixed; right: 28px; bottom: 28px; z-index: 40; display: inline-grid; width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
.local-nav-btn[aria-expanded="true"] { color: var(--text); }
.local-nav-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

.toc-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: calc(var(--gutter) - 12px);
  right: calc(var(--gutter) - 12px);
  max-width: 420px;
  max-height: min(62vh, 440px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  transform-origin: top left;
  animation: menu-in .16s var(--ease-out);
}

.local-nav.is-open::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 100vh;
  background: var(--overlay);
  opacity: .55;
  animation: fade-in .16s ease;
}
.toc-menu .toc-link { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; font-size: 14.5px; }
.toc-menu .toc-link.is-active { background: var(--accent); color: var(--accent-fg); font-weight: 500; box-shadow: inset 3px 0 var(--primary); }

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-4px) scale(.98); }
}

.toc-col { display: none; }
@media (min-width: 1280px) {
  .toc-col {
    display: block;
    position: sticky;
    top: var(--header-h);
    align-self: start;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 44px 16px 32px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
  }
  .is-home .toc-col { display: none; }
}
.toc-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  color: var(--text);
}
.toc-link {
  display: block;
  padding: 4px 10px;
  margin: 1px 0;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.toc-link:hover { color: var(--text); background: var(--surface-2); }

#toc { border-left: 1px solid var(--border); }
#toc .toc-link {
  margin: 0 0 0 -1px;
  padding: 5px 12px;
  border-left: 2px solid transparent;
  border-radius: 0;
}
#toc .toc-link:hover { background: none; }
#toc .toc-link.is-active { color: var(--text); border-left-color: var(--primary); font-weight: 500; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 20px;
  color: var(--muted);
}
.crumbs a {
  color: var(--muted);
  text-decoration: none;
  border-radius: 4px;
  transition: color .15s ease;
}
.crumbs a:hover { color: var(--text); }
.crumbs .i { width: 11px; height: 11px; opacity: .6; }
.crumbs [aria-current="page"] { color: var(--text-2); font-weight: 500; }

.doc { animation: doc-in .18s ease both; scroll-margin-top: 100vh; }
.doc.no-enter { animation: none; }
@keyframes doc-in {
  from { opacity: 0; transform: translateY(6px); }
}

.doc h1 {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 0 0 16px;
  font-family: var(--font-sans);
  font-size: 42px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.025em;
  color: var(--text);
  outline: none;
  text-wrap: balance;
}

.tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--g-bg, var(--surface-2));
  color: var(--g-fg, var(--text-2));
}
.tile .i { width: 18px; height: 18px; }
.doc h1 .tile { margin-top: calc((1.1em - 36px) / 2); }

.doc .lead + p { margin-top: 20px; }
.doc .lead {
  max-width: 38em;
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}

.doc { font-size: 16px; line-height: 1.6; }

.doc > h2 {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.doc h2 {
  margin-bottom: 16px;
  font-family: var(--font-sans);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.015em;
  color: var(--text);
  text-wrap: balance;
  scroll-margin-top: calc(var(--sticky) + 8px);
  outline: none;
}
.doc h3 {
  margin: 28px 0 10px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.01em;
  color: var(--text);
}
.doc h2.is-target { animation: target-flash 1.4s ease-out; }
@keyframes target-flash {
  0%, 35% { color: var(--primary); }
}

.doc p { margin: 0 0 16px; color: var(--text-2); text-wrap: pretty; }
.doc b { color: var(--text); font-weight: 600; }
.doc ul { margin: 0 0 18px; padding-left: 22px; color: var(--text-2); }
.doc li { margin: 8px 0; padding-left: 4px; }
.doc li::marker { color: var(--border-strong); }
.doc-action { margin: 20px 0 24px; }
.doc ol { margin: 0 0 18px; padding-left: 24px; color: var(--text-2); }
.doc ol > li::marker { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }

.table-wrap {
  margin: 0 0 22px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.doc table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.45; }
.doc th, .doc td { padding: 9px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.doc tr:last-child td { border-bottom: 0; }
.doc th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--surface-2);
  white-space: nowrap;
}
.doc td { color: var(--text-2); }
.doc td:first-child { color: var(--text); font-weight: 500; }
.doc td.n, .doc th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.doc td code { display: inline-block; max-width: 100%; padding: .2em .5em; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.doc td .meta { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.doc td.prem .meta { color: color-mix(in srgb, var(--gold) 75%, var(--muted)); }
.doc td.prem code { border-color: var(--gold-line); background: color-mix(in srgb, var(--gold-hue) 12%, var(--surface-2)); color: var(--gold); }

.table-wrap.is-collapsible {
  margin-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  scroll-margin-top: calc(var(--sticky) + 16px);
}
.table-wrap.is-collapsed tr.is-extra { display: none; }
.table-wrap.is-collapsed tr.is-peek td { opacity: .38; border-bottom: 0; }
.table-wrap.is-collapsible tr.is-peek td { transition: opacity .2s ease; }
.table-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  margin: 0 0 22px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: var(--surface-2);
  color: var(--accent-fg);
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.table-more:hover { background: var(--accent); }
.table-more .chev { width: 14px; height: 14px; transition: transform .2s ease; }
.table-more[aria-expanded="true"] .chev { transform: rotate(180deg); }

.doc table.grouped tr.group th {
  padding-top: 12px;
  padding-bottom: 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
  background: var(--surface-2);
}
.doc table.grouped tr.group th a { color: inherit; text-decoration: none; }
.doc table.grouped tr.group th a:hover { color: var(--accent-fg); }
.doc table.grouped tbody + tbody tr.group th { border-top: 1px solid var(--border); }
.doc table.grouped tbody tr:last-child td { border-bottom: 0; }
.doc table.grouped tbody + tbody { border-top: 1px solid var(--border); }

.filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 4px 0 28px; }
.filter-card { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.filter-card img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: var(--surface-2); }
.filter-cap { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 9px 11px 11px; }
.filter-cap span { color: var(--muted); font-size: 13px; line-height: 1.35; }
@media (max-width: 639px) {
  .filter-grid { gap: 8px; }
  .filter-card { border-radius: 10px; }
  .filter-cap { padding: 7px 8px 9px; gap: 3px; }
  .filter-cap span { font-size: 11.5px; }
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; }
.doc .chips li {
  margin: 0;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 14px;
}
.doc .chips li::marker { content: none; }
.doc a.btn { color: var(--primary-fg); text-decoration: none; font-weight: 500; }
.doc a.btn-secondary { color: var(--text); }

.doc a {
  color: var(--accent-fg);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
  text-underline-offset: 3px;
  border-radius: 2px;
  transition: text-decoration-color .15s ease, color .15s ease;
}
.doc a:hover { text-decoration-color: currentColor; }

.doc code {
  font-family: var(--font-mono);
  font-size: .86em;
  padding: .1em .4em;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  white-space: nowrap;
}
.doc .num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text);
}

.cmd-line {
  position: relative;
  margin: 14px -12px;
  padding: 6px 12px;
  border-radius: 8px;
  outline: none;
  scroll-margin-top: calc(var(--sticky) + 16px);
}
.cmd-line > p { margin: 0 0 6px; }
.cmd-line > p:last-child { margin-bottom: 0; }
.cmd-line:has(+ .cmd-line) { margin-bottom: 2px; }
.cmd-line + .cmd-line { margin-top: 2px; }
.doc .cmd-sig { color: var(--text-2); }
.doc .cmd-sig code.cmd, .doc .cmd-sig code.cmd-args {
  padding: 0;
  border: 0;
  background: none;
  font-size: .93em;
  font-weight: 600;
  white-space: nowrap;
}
.doc .cmd-sig code.cmd { color: var(--cmd); cursor: pointer; }
.doc .cmd-sig code.cmd-args { color: var(--text-2); white-space: normal; }
.doc .cmd-alias { color: var(--muted); font-size: 14.5px; }
.doc .cmd-alias code { background: none; border: 0; padding: 0; color: var(--text-2); font-size: .95em; }
.cmd-line.is-target { animation: line-flash 1.6s ease-out; }
@keyframes line-flash {
  0%, 40% { background: var(--primary-soft); }
}

.cmd-copy {
  position: absolute;
  top: 8px;
  left: -26px;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s ease, color .15s ease, background-color .15s ease;
}
.cmd-copy .i { width: 15px; height: 15px; }
.cmd-copy:hover { color: var(--text); background: var(--surface-2); }
.cmd-line:hover .cmd-copy, .cmd-copy:focus-visible, .cmd-copy.is-copied { opacity: 1; }
.cmd-copy.is-copied { color: var(--cmd); }

@media (hover: none), (max-width: 959px) {
  .cmd-copy {
    position: relative;
    top: auto;
    left: auto;
    width: 26px;
    height: 26px;
    margin: -4px 0 -4px 2px;
    vertical-align: middle;
    opacity: .75;
  }
  .cmd-copy::after { content: ""; position: absolute; inset: -9px; }
}

.doc .is-copyable {
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.doc .is-copyable:hover { background: var(--primary-soft); border-color: color-mix(in srgb, var(--cmd) 35%, var(--border)); color: var(--cmd); }
.doc .is-copyable:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.doc .is-copyable.is-copied { animation: copied-flash .9s ease-out; }
@keyframes copied-flash {
  0%, 35% { background: var(--primary-soft); border-color: var(--cmd); color: var(--cmd); }
}

.link-copy {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0 0 0 6px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  vertical-align: middle;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s ease, color .15s ease, background-color .15s ease;
}
.link-copy .i { width: 16px; height: 16px; }
.link-copy:hover { color: var(--text); background: var(--surface-2); }
.link-copy.is-copied { color: var(--cmd); opacity: 1; }
.doc h1:hover .link-copy, .doc h2:hover .link-copy, .faq dt:hover .link-copy,
.cmd-line:hover > .link-copy, .link-copy:focus-visible { opacity: 1; }
.doc h1 .link-copy { width: 32px; height: 32px; }
.doc h1 .link-copy .i { width: 18px; height: 18px; }

.cmd-line[id] { padding-right: 40px; }
.cmd-line > .link-copy { position: absolute; top: 5px; right: 4px; margin: 0; }
.faq dt { scroll-margin-top: calc(var(--sticky) + 16px); }
.faq dt.is-target { animation: line-flash 1.6s ease-out; }
@media (hover: none), (max-width: 959px) {
  .link-copy { opacity: .6; }
  .link-copy::after { content: ""; position: absolute; inset: -8px; }
}

.legend {
  margin: 32px 0 0;
  padding: 14px 18px 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 15px;
  color: var(--text-2);
}
.doc .legend-title { margin: 0 0 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.legend dl { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0; }
.legend dl > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.legend dt, .legend dd { margin: 0; }
.doc .legend dt code { padding: 0; border: 0; background: none; font-weight: 600; color: var(--text); }

.faq { margin: 0 0 24px; }
.faq dt {
  margin: 0;
  padding-top: 16px;
  color: var(--text);
  font-weight: 600;
}
.faq dt + dd + dt { margin-top: 16px; border-top: 1px solid var(--border); }
.faq dd { margin: 4px 0 0; color: var(--text-2); }

.callout {
  margin: 20px 0 24px;
  padding: 14px 18px 15px;
  border: 1px solid;
  border-radius: 8px;
}
.callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
}
.callout-title .i { width: 16px; height: 16px; }
.doc .callout p { margin: 0; }
.doc .callout p + p { margin-top: 8px; }
.callout.warn {
  background: var(--warn-soft);
  border-color: color-mix(in srgb, var(--warn) 24%, transparent);
}
.callout.warn .callout-title { color: var(--warn); }
.callout.note {
  background: var(--note-soft);
  border-color: color-mix(in srgb, var(--note) 18%, transparent);
}
.callout.note .callout-title { color: var(--note); }
.callout.prem {
  background: var(--gold-soft);
  border-color: var(--gold-line);
}
.callout.prem .callout-title { color: var(--gold); }

.doc th.prem { color: var(--gold); background: var(--gold-head); box-shadow: inset 1px 0 var(--gold-line); }
.doc td.prem { color: var(--gold); background: var(--gold-soft); font-weight: 500; box-shadow: inset 1px 0 var(--gold-line); }
.doc tr.is-peek td.prem { background: var(--gold-soft); }

.doc h2.prem::after, .doc h2.vip::after,
.tag-prem {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 8px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  line-height: 1.5;
  text-transform: uppercase;
  vertical-align: middle;
}
.doc h2.prem::after { content: "Премиум"; }
.doc h2.vip::after { content: "VIP"; }
.tag-prem { margin-left: 6px; font-size: 10.5px; }

.doc figure.tg {
  display: flex;
  flex-direction: column;
  margin: 28px 0 36px;
  padding: 0 20px 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--tg-bg);
  font-family: var(--font-sans);
  line-height: 1.4;
}

.tg figcaption {
  order: -1;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  column-gap: 12px;
  min-height: 36px;
  margin: 0 -20px 8px;
  padding: 7px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  text-align: center;
}
.tg figcaption::before {
  content: "";
  width: 38px;
  height: 10px;
  background: var(--dots);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 10'%3E%3Ccircle cx='5' cy='5' r='4.5'/%3E%3Ccircle cx='19' cy='5' r='4.5'/%3E%3Ccircle cx='33' cy='5' r='4.5'/%3E%3C/svg%3E") no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 10'%3E%3Ccircle cx='5' cy='5' r='4.5'/%3E%3Ccircle cx='19' cy='5' r='4.5'/%3E%3Ccircle cx='33' cy='5' r='4.5'/%3E%3C/svg%3E") no-repeat;
}
.tg figcaption::after { content: ""; }

.doc figure.tg.is-collapsible {
  position: relative;
  padding-bottom: 68px;
  transition: max-height .55s cubic-bezier(.16, 1, .3, 1), padding-bottom .3s ease;
}
.doc figure.tg.is-collapsed { padding-bottom: 0; }
.doc figure.tg.is-collapsible::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 110px;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--tg-bg) 0%, transparent),
    color-mix(in srgb, var(--tg-bg) 70%, transparent) 45%,
    var(--tg-bg) 88%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
}
.doc figure.tg.is-collapsed::after { opacity: 1; }
.tg-more {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 18px 0 20px;
  border: 1px solid color-mix(in srgb, var(--border-strong) 55%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  transform: translateX(-50%);
  transition: background-color .2s ease, border-color .2s ease, transform .2s var(--ease-out);
}
.tg-more:hover { background: color-mix(in srgb, var(--surface) 92%, transparent); border-color: var(--border-strong); transform: translateX(-50%) translateY(-1px); }
.tg-more:active { transform: translateX(-50%) scale(.98); }
.tg-more .chev { width: 13px; height: 13px; color: var(--muted); transition: transform .35s var(--ease-out); }
.tg-more[aria-expanded="true"] .chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) {
  .doc figure.tg.is-collapsible, .doc figure.tg.is-collapsible::after, .tg-more, .tg-more .chev { transition: none; }
}

.tg-row-in, .tg-row-out { display: flex; align-items: flex-end; gap: 8px; margin-top: 12px; }
.tg-row-out { justify-content: flex-end; padding-left: 56px; }
.tg-row-in { padding-right: 40px; }
.tg-row-in.is-cont, .tg-row-out.is-cont { margin-top: 3px; }
.tg-row-in.has-next .tg-avatar { visibility: hidden; }

.tg-avatar {
  flex: none;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 50%;
}
.tg-avatar img { width: 100%; height: 100%; object-fit: cover; }

.tg-ava {
  display: grid;
  place-items: center;
  background: var(--ava);
  color: var(--tg-btn-on);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}
.t1 { --ava: var(--tg-ava-1); --name: var(--tg-name-1); }
.t2 { --ava: var(--tg-ava-2); --name: var(--tg-name-2); }
.t3 { --ava: var(--tg-ava-3); --name: var(--tg-name-3); }
.t4 { --ava: var(--tg-ava-4); --name: var(--tg-name-4); }
.t5 { --ava: var(--tg-ava-5); --name: var(--tg-name-5); }
.t6 { --ava: var(--tg-ava-6); --name: var(--tg-name-6); }

.tg-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  max-width: 460px;
}

.tg-msg:has(> .tg-btns) { flex: 1 1 auto; }

.tg-bubble-in, .tg-bubble-out {
  position: relative;
  display: flow-root;
  padding: 6px 10px 7px 11px;
  border-radius: 14px;
  color: var(--tg-text);
  font-size: 14.5px;
  line-height: 1.4;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.tg-bubble-in { background: var(--tg-in); }
.tg-bubble-out { background: var(--tg-out); max-width: 460px; }

.tg-via { display: block; margin-bottom: 1px; font-size: 14px; font-weight: 600; color: var(--tg-link); }
.tg-bubble-out .tg-via { color: var(--tg-out-via); }

.tg-sign { display: block; margin-top: 2px; font-size: 12.5px; font-style: italic; color: var(--tg-meta); }
.tg-bubble-out .tg-sign { color: var(--tg-out-meta); }

.tg-voice {
  display: grid;
  grid-template-columns: 42px minmax(140px, 184px);
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  margin: 2px 2px 2px 0;
  white-space: normal;
}
.tg-voice-play {
  position: relative;
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--tg-link);
}
.tg-voice-play::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 13px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent var(--tg-in);
}
.tg-voice-wave {
  height: 24px;
  background: var(--tg-link);
  opacity: .85;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20184%2024'%3E%3Crect%20x='0'%20y='9.0'%20width='2.2'%20height='6'%20rx='1.1'/%3E%3Crect%20x='4'%20y='9.0'%20width='2.2'%20height='6'%20rx='1.1'/%3E%3Crect%20x='8'%20y='5.0'%20width='2.2'%20height='14'%20rx='1.1'/%3E%3Crect%20x='12'%20y='8.5'%20width='2.2'%20height='7'%20rx='1.1'/%3E%3Crect%20x='16'%20y='6.5'%20width='2.2'%20height='11'%20rx='1.1'/%3E%3Crect%20x='20'%20y='8.5'%20width='2.2'%20height='7'%20rx='1.1'/%3E%3Crect%20x='24'%20y='4.0'%20width='2.2'%20height='16'%20rx='1.1'/%3E%3Crect%20x='28'%20y='6.0'%20width='2.2'%20height='12'%20rx='1.1'/%3E%3Crect%20x='32'%20y='3.5'%20width='2.2'%20height='17'%20rx='1.1'/%3E%3Crect%20x='36'%20y='7.5'%20width='2.2'%20height='9'%20rx='1.1'/%3E%3Crect%20x='40'%20y='5.5'%20width='2.2'%20height='13'%20rx='1.1'/%3E%3Crect%20x='44'%20y='7.0'%20width='2.2'%20height='10'%20rx='1.1'/%3E%3Crect%20x='48'%20y='8.0'%20width='2.2'%20height='8'%20rx='1.1'/%3E%3Crect%20x='52'%20y='6.0'%20width='2.2'%20height='12'%20rx='1.1'/%3E%3Crect%20x='56'%20y='9.0'%20width='2.2'%20height='6'%20rx='1.1'/%3E%3Crect%20x='60'%20y='7.0'%20width='2.2'%20height='10'%20rx='1.1'/%3E%3Crect%20x='64'%20y='5.0'%20width='2.2'%20height='14'%20rx='1.1'/%3E%3Crect%20x='68'%20y='6.5'%20width='2.2'%20height='11'%20rx='1.1'/%3E%3Crect%20x='72'%20y='7.5'%20width='2.2'%20height='9'%20rx='1.1'/%3E%3Crect%20x='76'%20y='1.5'%20width='2.2'%20height='21'%20rx='1.1'/%3E%3Crect%20x='80'%20y='6.5'%20width='2.2'%20height='11'%20rx='1.1'/%3E%3Crect%20x='84'%20y='7.5'%20width='2.2'%20height='9'%20rx='1.1'/%3E%3Crect%20x='88'%20y='6.0'%20width='2.2'%20height='12'%20rx='1.1'/%3E%3Crect%20x='92'%20y='7.5'%20width='2.2'%20height='9'%20rx='1.1'/%3E%3Crect%20x='96'%20y='7.5'%20width='2.2'%20height='9'%20rx='1.1'/%3E%3Crect%20x='100'%20y='7.0'%20width='2.2'%20height='10'%20rx='1.1'/%3E%3Crect%20x='104'%20y='2.0'%20width='2.2'%20height='20'%20rx='1.1'/%3E%3Crect%20x='108'%20y='6.5'%20width='2.2'%20height='11'%20rx='1.1'/%3E%3Crect%20x='112'%20y='6.0'%20width='2.2'%20height='12'%20rx='1.1'/%3E%3Crect%20x='116'%20y='5.0'%20width='2.2'%20height='14'%20rx='1.1'/%3E%3Crect%20x='120'%20y='2.0'%20width='2.2'%20height='20'%20rx='1.1'/%3E%3Crect%20x='124'%20y='7.0'%20width='2.2'%20height='10'%20rx='1.1'/%3E%3Crect%20x='128'%20y='8.0'%20width='2.2'%20height='8'%20rx='1.1'/%3E%3Crect%20x='132'%20y='1.0'%20width='2.2'%20height='22'%20rx='1.1'/%3E%3Crect%20x='136'%20y='9.5'%20width='2.2'%20height='5'%20rx='1.1'/%3E%3Crect%20x='140'%20y='7.0'%20width='2.2'%20height='10'%20rx='1.1'/%3E%3Crect%20x='144'%20y='5.0'%20width='2.2'%20height='14'%20rx='1.1'/%3E%3Crect%20x='148'%20y='1.5'%20width='2.2'%20height='21'%20rx='1.1'/%3E%3Crect%20x='152'%20y='8.5'%20width='2.2'%20height='7'%20rx='1.1'/%3E%3Crect%20x='156'%20y='8.0'%20width='2.2'%20height='8'%20rx='1.1'/%3E%3Crect%20x='160'%20y='5.0'%20width='2.2'%20height='14'%20rx='1.1'/%3E%3Crect%20x='164'%20y='7.5'%20width='2.2'%20height='9'%20rx='1.1'/%3E%3Crect%20x='168'%20y='7.5'%20width='2.2'%20height='9'%20rx='1.1'/%3E%3Crect%20x='172'%20y='5.5'%20width='2.2'%20height='13'%20rx='1.1'/%3E%3Crect%20x='176'%20y='6.0'%20width='2.2'%20height='12'%20rx='1.1'/%3E%3Crect%20x='180'%20y='5.5'%20width='2.2'%20height='13'%20rx='1.1'/%3E%3C/svg%3E") left center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20184%2024'%3E%3Crect%20x='0'%20y='9.0'%20width='2.2'%20height='6'%20rx='1.1'/%3E%3Crect%20x='4'%20y='9.0'%20width='2.2'%20height='6'%20rx='1.1'/%3E%3Crect%20x='8'%20y='5.0'%20width='2.2'%20height='14'%20rx='1.1'/%3E%3Crect%20x='12'%20y='8.5'%20width='2.2'%20height='7'%20rx='1.1'/%3E%3Crect%20x='16'%20y='6.5'%20width='2.2'%20height='11'%20rx='1.1'/%3E%3Crect%20x='20'%20y='8.5'%20width='2.2'%20height='7'%20rx='1.1'/%3E%3Crect%20x='24'%20y='4.0'%20width='2.2'%20height='16'%20rx='1.1'/%3E%3Crect%20x='28'%20y='6.0'%20width='2.2'%20height='12'%20rx='1.1'/%3E%3Crect%20x='32'%20y='3.5'%20width='2.2'%20height='17'%20rx='1.1'/%3E%3Crect%20x='36'%20y='7.5'%20width='2.2'%20height='9'%20rx='1.1'/%3E%3Crect%20x='40'%20y='5.5'%20width='2.2'%20height='13'%20rx='1.1'/%3E%3Crect%20x='44'%20y='7.0'%20width='2.2'%20height='10'%20rx='1.1'/%3E%3Crect%20x='48'%20y='8.0'%20width='2.2'%20height='8'%20rx='1.1'/%3E%3Crect%20x='52'%20y='6.0'%20width='2.2'%20height='12'%20rx='1.1'/%3E%3Crect%20x='56'%20y='9.0'%20width='2.2'%20height='6'%20rx='1.1'/%3E%3Crect%20x='60'%20y='7.0'%20width='2.2'%20height='10'%20rx='1.1'/%3E%3Crect%20x='64'%20y='5.0'%20width='2.2'%20height='14'%20rx='1.1'/%3E%3Crect%20x='68'%20y='6.5'%20width='2.2'%20height='11'%20rx='1.1'/%3E%3Crect%20x='72'%20y='7.5'%20width='2.2'%20height='9'%20rx='1.1'/%3E%3Crect%20x='76'%20y='1.5'%20width='2.2'%20height='21'%20rx='1.1'/%3E%3Crect%20x='80'%20y='6.5'%20width='2.2'%20height='11'%20rx='1.1'/%3E%3Crect%20x='84'%20y='7.5'%20width='2.2'%20height='9'%20rx='1.1'/%3E%3Crect%20x='88'%20y='6.0'%20width='2.2'%20height='12'%20rx='1.1'/%3E%3Crect%20x='92'%20y='7.5'%20width='2.2'%20height='9'%20rx='1.1'/%3E%3Crect%20x='96'%20y='7.5'%20width='2.2'%20height='9'%20rx='1.1'/%3E%3Crect%20x='100'%20y='7.0'%20width='2.2'%20height='10'%20rx='1.1'/%3E%3Crect%20x='104'%20y='2.0'%20width='2.2'%20height='20'%20rx='1.1'/%3E%3Crect%20x='108'%20y='6.5'%20width='2.2'%20height='11'%20rx='1.1'/%3E%3Crect%20x='112'%20y='6.0'%20width='2.2'%20height='12'%20rx='1.1'/%3E%3Crect%20x='116'%20y='5.0'%20width='2.2'%20height='14'%20rx='1.1'/%3E%3Crect%20x='120'%20y='2.0'%20width='2.2'%20height='20'%20rx='1.1'/%3E%3Crect%20x='124'%20y='7.0'%20width='2.2'%20height='10'%20rx='1.1'/%3E%3Crect%20x='128'%20y='8.0'%20width='2.2'%20height='8'%20rx='1.1'/%3E%3Crect%20x='132'%20y='1.0'%20width='2.2'%20height='22'%20rx='1.1'/%3E%3Crect%20x='136'%20y='9.5'%20width='2.2'%20height='5'%20rx='1.1'/%3E%3Crect%20x='140'%20y='7.0'%20width='2.2'%20height='10'%20rx='1.1'/%3E%3Crect%20x='144'%20y='5.0'%20width='2.2'%20height='14'%20rx='1.1'/%3E%3Crect%20x='148'%20y='1.5'%20width='2.2'%20height='21'%20rx='1.1'/%3E%3Crect%20x='152'%20y='8.5'%20width='2.2'%20height='7'%20rx='1.1'/%3E%3Crect%20x='156'%20y='8.0'%20width='2.2'%20height='8'%20rx='1.1'/%3E%3Crect%20x='160'%20y='5.0'%20width='2.2'%20height='14'%20rx='1.1'/%3E%3Crect%20x='164'%20y='7.5'%20width='2.2'%20height='9'%20rx='1.1'/%3E%3Crect%20x='168'%20y='7.5'%20width='2.2'%20height='9'%20rx='1.1'/%3E%3Crect%20x='172'%20y='5.5'%20width='2.2'%20height='13'%20rx='1.1'/%3E%3Crect%20x='176'%20y='6.0'%20width='2.2'%20height='12'%20rx='1.1'/%3E%3Crect%20x='180'%20y='5.5'%20width='2.2'%20height='13'%20rx='1.1'/%3E%3C/svg%3E") left center / 100% 100% no-repeat;
}
.tg-voice-time { color: var(--tg-meta); font-size: 12px; line-height: 16px; }
.tg-bubble-out .tg-voice-play, .tg-bubble-out .tg-voice-wave { background: var(--tg-out-via); }
.tg-bubble-out .tg-voice-play::after { border-left-color: var(--tg-out); }
.tg-bubble-out .tg-voice-time { color: var(--tg-out-meta); }

.tg-bubble-in::before, .tg-bubble-out::before {
  content: "";
  display: none;
  position: absolute;
  bottom: 0;
  width: 9px;
  height: 16px;
  background: inherit;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 16'%3E%3Cpath d='M9 0C9 7.5 5.8 12.4.7 15.1c-.6.3-.4.9.3.9H9z'/%3E%3C/svg%3E") no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 16'%3E%3Cpath d='M9 0C9 7.5 5.8 12.4.7 15.1c-.6.3-.4.9.3.9H9z'/%3E%3C/svg%3E") no-repeat;
}
.tg-row-in:not(.has-next) .tg-msg > .tg-bubble-in:last-child::before { display: block; left: -8px; }
.tg-row-in:not(.has-next) .tg-msg > .tg-bubble-in:last-child { border-bottom-left-radius: 0; }
.tg-row-out:not(.has-next) .tg-bubble-out:last-child::before { display: block; right: -8px; transform: scaleX(-1); }
.tg-row-out:not(.has-next) .tg-bubble-out:last-child { border-bottom-right-radius: 0; }

.tg-row-out .tg-msg { min-width: min(240px, 100%); }
.tg-row-in.has-next .tg-bubble-in { border-bottom-left-radius: 6px; }
.tg-row-in.is-cont .tg-bubble-in { border-top-left-radius: 6px; }
.tg-row-out.has-next .tg-bubble-out { border-bottom-right-radius: 6px; }
.tg-row-out.is-cont .tg-bubble-out { border-top-right-radius: 6px; }
.tg-row-in.is-cont .tg-sender { display: none; }

.tg-bubble-in::after, .tg-bubble-out::after {
  content: "21:04";
  float: right;
  position: relative;
  top: 7px;
  margin: 0 -2px 0 12px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--tg-meta);
  font-variant-numeric: tabular-nums;
}
.tg-bubble-out::after {
  padding-right: 19px;
  color: var(--tg-out-meta);
  background: var(--tg-checks) no-repeat right center / 16px 10px;
}

.tg-row-in.is-deleted .tg-msg, .tg-row-out.is-deleted > * { opacity: .5; }
.is-deleted .tg-bubble-in::after, .is-deleted .tg-bubble-out::after { content: "удалено"; }
.tg-row-out.is-deleted .tg-bubble-out::after { padding-right: 0; background: none; }

.tg-sender {
  display: block;
  margin-bottom: 1px;
  color: var(--name, var(--tg-link));
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.tg-bubble-in b, .tg-bubble-out b { font-weight: 600; color: inherit; }
.tg-link { color: var(--tg-link); }

.tg-webpage {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 8px;
  padding: 6px 8px 8px 10px;
  border-left: 3px solid var(--tg-link);
  border-radius: 6px;
  background: var(--tg-quote);
  white-space: normal;
}
.tg-webpage-site { color: var(--tg-link); font-weight: 600; font-size: .92em; }
.tg-webpage-title { font-weight: 600; }
.tg-webpage-desc { font-size: .92em; line-height: 1.4; }
.tg-webpage-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  margin-top: 6px;
  border-radius: 6px;
  object-fit: cover;
}

.tg-reply {
  display: block;
  margin: 2px 0 5px;
  padding: 3px 8px 4px 9px;
  border-left: 3px solid var(--tg-link);
  border-radius: 4px;
  background: var(--tg-quote);
  font-size: 13.5px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tg-reply-name { display: block; color: var(--tg-link); font-weight: 600; }
.tg-bubble-out .tg-reply { border-left-color: var(--tg-out-meta); background: color-mix(in srgb, var(--tg-out-meta) 14%, transparent); }
.tg-bubble-out .tg-reply-name { color: var(--tg-out-meta); }

.tg-quote {
  position: relative;
  display: block;
  overflow: hidden;
  margin: 4px 0 2px;
  padding: 2px 9px 3px;
  border-left: 3px solid var(--tg-link);
  border-radius: 4px;
  background: var(--tg-quote);
  white-space: pre-line;
}
.tg-quote.is-collapsible {
  padding-right: 24px;
  cursor: pointer;
  transition: max-height .28s var(--ease-out);
}
.tg-quote.is-collapsible:focus-visible { outline-offset: 1px; }
.tg-quote.is-collapsible::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 6px;
  width: 10px;
  height: 10px;
  background: var(--tg-link);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M216.49 104.49l-80 80a12 12 0 0 1-17 0l-80-80a12 12 0 0 1 17-17L128 159l71.51-71.52a12 12 0 0 1 17 17Z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M216.49 104.49l-80 80a12 12 0 0 1-17 0l-80-80a12 12 0 0 1 17-17L128 159l71.51-71.52a12 12 0 0 1 17 17Z'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform .2s var(--ease-out);
}
.tg-quote.is-open::after { transform: rotate(180deg); }

.tg .emoji {
  display: inline;
  height: 1.15em;
  width: auto;
  aspect-ratio: 1;
  margin: 0 .05em;
  vertical-align: -0.2em;
}
.tg-btn .emoji { height: 1.2em; vertical-align: -0.25em; }

.doc th .emoji, .doc .em .emoji {
  display: inline;
  height: 1.35em;
  width: auto;
  aspect-ratio: 1;
  margin: 0 .3em 0 0;
  vertical-align: -0.35em;
}

.tg-msg:has(> .has-photo) { flex: 1 1 auto; }
.tg-photo {
  display: block;
  width: calc(100% + 21px);
  max-width: none;
  height: auto;
  margin: 4px -10px 7px -11px;
}
.has-photo > .tg-photo:first-child {
  margin-top: -6px;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.tg-sticker { font-size: 72px; line-height: 1; padding: 2px 0; }
.is-deleted .tg-sticker::after { content: "удалено"; display: block; margin-top: 2px; color: var(--tg-meta); font-size: 11.5px; line-height: 1.4; }

.tg-service { display: flex; justify-content: center; margin: 14px 0 2px; text-align: center; }
.tg-service span {
  max-width: 100%;
  padding: 3px 11px 4px;
  border-radius: 12px;
  background: var(--tg-service);
  color: var(--tg-service-fg);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.tg-service.is-press span { padding: 2px 10px 3px; border: 1px dashed var(--tg-meta); background: transparent; color: var(--tg-meta); }
.tg-service.is-toast span {
  padding: 7px 14px 8px;
  border-radius: 8px;
  background: var(--tg-toast);
  color: var(--tg-toast-fg);
}

.tg-eph {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 2px;
  color: var(--tg-link);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
}
.tg-eph::before {
  content: "";
  flex: none;
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M56.88 31.93a12 12 0 1 0-17.76 16.14l16 17.65C20.67 88.66 5.72 121.58 5 123.13a12.08 12.08 0 0 0 0 9.75c.37.82 9.13 20.26 28.49 39.61C59.37 198.34 92 212 128 212a131.34 131.34 0 0 0 51-10l20.09 22.1a12 12 0 0 0 17.76-16.14ZM128 188c-29.59 0-55.47-10.73-76.91-31.88A130.69 130.69 0 0 1 29.52 128c5.27-9.31 18.79-29.9 42-44.29l90.09 99.11A109.33 109.33 0 0 1 128 188Zm123-55.12c-.36.81-9 20-28 39.16a12 12 0 1 1-17-16.9A130.48 130.48 0 0 0 226.48 128a130.36 130.36 0 0 0-21.57-28.12C183.46 78.73 157.59 68 128 68c-3.35 0-6.7.14-10 .42a12 12 0 1 1-2-23.91c3.93-.34 8-.51 12-.51 36 0 68.63 13.67 94.49 39.52 19.35 19.35 28.11 38.8 28.48 39.61a12.08 12.08 0 0 1 .03 9.76Z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M56.88 31.93a12 12 0 1 0-17.76 16.14l16 17.65C20.67 88.66 5.72 121.58 5 123.13a12.08 12.08 0 0 0 0 9.75c.37.82 9.13 20.26 28.49 39.61C59.37 198.34 92 212 128 212a131.34 131.34 0 0 0 51-10l20.09 22.1a12 12 0 0 0 17.76-16.14ZM128 188c-29.59 0-55.47-10.73-76.91-31.88A130.69 130.69 0 0 1 29.52 128c5.27-9.31 18.79-29.9 42-44.29l90.09 99.11A109.33 109.33 0 0 1 128 188Zm123-55.12c-.36.81-9 20-28 39.16a12 12 0 1 1-17-16.9A130.48 130.48 0 0 0 226.48 128a130.36 130.36 0 0 0-21.57-28.12C183.46 78.73 157.59 68 128 68c-3.35 0-6.7.14-10 .42a12 12 0 1 1-2-23.91c3.93-.34 8-.51 12-.51 36 0 68.63 13.67 94.49 39.52 19.35 19.35 28.11 38.8 28.48 39.61a12.08 12.08 0 0 1 .03 9.76Z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.doc .tg-bubble-in code, .doc .tg-bubble-out code {
  padding: 0 .25em;
  border: 0;
  border-radius: 4px;
  background: var(--tg-code-bg);
  color: inherit;
  font-size: .9em;
  white-space: inherit;
  overflow-wrap: anywhere;
}

.tg-btns { display: flex; flex-direction: column; gap: 4px; }
.tg-btns-row { display: flex; gap: 4px; }
.tg-btn {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 36px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: var(--tg-btn);
  color: var(--tg-btn-fg);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}

.tg-btn.is-success { background: var(--tg-btn-success); color: var(--tg-btn-on); }
.tg-btn.is-danger { background: var(--tg-btn-danger); color: var(--tg-btn-on); }
.tg-btn.is-primary { background: var(--tg-btn-primary); color: var(--tg-btn-on); }

.tg-btn.is-url { padding-right: 16px; padding-left: 16px; }
.tg-btn.is-url::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M204 64v104a12 12 0 0 1-24 0V93L72.49 200.49a12 12 0 0 1-17-17L163 76H88a12 12 0 0 1 0-24h104a12 12 0 0 1 12 12Z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M204 64v104a12 12 0 0 1-24 0V93L72.49 200.49a12 12 0 0 1-17-17L163 76H88a12 12 0 0 1 0-24h104a12 12 0 0 1 12 12Z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 72px;
}
.pager a {
  --pad: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 76px;
  padding: 14px var(--pad) 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pager a:hover { border-color: var(--border-strong); box-shadow: var(--hover-shadow); }
.pager .pager-next { grid-column: 2; align-items: flex-end; text-align: right; }
.pager small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}
.pager small .i { width: 12px; height: 12px; transition: transform .15s ease; }
.pager .pager-prev:hover small .i { transform: translateX(-2px); }
.pager .pager-next:hover small .i { transform: translateX(2px); }
.pager strong { font-size: 15px; font-weight: 600; line-height: 1.4; letter-spacing: -.01em; }

.marquee {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track { display: inline-flex; }
.marquee.is-running {
  align-self: stretch;
  max-width: none;
  margin: 0 calc(-1 * var(--pad, 0px));
  text-align: left;
}
.marquee.is-running .marquee-track > span { padding: 0 40px 0 var(--pad, 0px); }
.marquee.is-running .marquee-track { animation: marquee var(--marquee-time, 8s) linear infinite; }
.pager a:hover .marquee.is-running .marquee-track { animation-play-state: paused; }
.marquee.is-clipped { text-overflow: ellipsis; }
.marquee.is-clipped .marquee-track { display: inline; }
@keyframes marquee {
  0%, 15% { transform: translateX(0); }
  85%, 100% { transform: translateX(var(--marquee-shift, 0)); }
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 56px;
  padding: 28px 0 8px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--text); }
.footer-brand .footer-ava { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-2);
  font-weight: 500;
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
.footer-links a:hover { color: var(--text); background: var(--surface-2); border-color: var(--border-strong); }
.footer-links .i { width: 15px; height: 15px; }

.hero { padding: 56px 0 0; }
.hero h1 {
  margin: 0 0 20px;
  font-family: var(--font-sans);
  font-size: 72px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--text);
  outline: none;
}
.hero p {
  max-width: 31em;
  margin: 0 0 32px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-2);
  text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.home-group {
  margin-top: 104px;
  scroll-margin-top: calc(var(--header-h) + 24px);
  container-type: inline-size;
}
.home-group > h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.015em;
}
.home-group > p { max-width: 40em; margin: 0 0 24px; color: var(--muted); font-size: 15px; }

.card-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }

.mod-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.mod-card:hover { border-color: var(--border-strong); box-shadow: var(--hover-shadow); }
.mod-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--g-bg, var(--surface-2));
  color: var(--g-fg, var(--muted));
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.mod-card strong {
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.01em;
}
.mod-card-desc { color: var(--muted); font-size: 14px; line-height: 1.55; }

.mod-card.is-feature strong {
  margin-bottom: 10px;
  font-family: var(--font-sans);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.025em;
}
.mod-card.is-feature .mod-card-desc { max-width: 32em; font-size: 15px; color: var(--text-2); }
.card-cmds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 24px;
}
.card-cmds span {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
}

@container (min-width: 520px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mod-card.is-feature { grid-column: 1 / -1; }

  .mod-card:not(.is-feature):last-child:nth-child(even) { grid-column: 1 / -1; }
}
@container (min-width: 800px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mod-card:not(.is-feature):last-child:nth-child(even) { grid-column: auto; }

  .home-group[data-group="start"] .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-group[data-group="start"] .mod-card.is-feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 40px;
  }
  .home-group[data-group="start"] .is-feature .mod-card-top { grid-column: 1 / -1; }
  .home-group[data-group="start"] .is-feature .card-cmds {
    grid-column: 2;
    grid-row: 2 / span 2;
    align-self: end;
    padding: 0;
  }
  .home-group[data-group="start"] .is-feature .card-cmds span { padding: 6px 12px; font-size: 14px; }

  .home-group[data-group="mod"] .mod-card.is-feature { grid-column: span 2; grid-row: span 2; }

  .home-group[data-group="chat"] .card-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
  .home-group[data-group="chat"] .mod-card.is-feature { grid-column: auto; }
}

.rv { opacity: 0; transform: translateY(12px); }
.rv.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .6s var(--ease-reveal), transform .6s var(--ease-reveal);
  transition-delay: calc(var(--i, 0) * 70ms);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.search {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
}
.search-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  animation: fade-in .16s ease;
}
.search-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 640px;
  max-height: min(600px, 76vh);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  transform-origin: 50% 0;
  animation: modal-in .16s ease;
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: scale(.98); } }

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  height: 56px;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.search-field > .i { width: 18px; height: 18px; }
.search-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}
.search-field input::placeholder { color: var(--muted); opacity: 1; }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-esc {
  display: inline-flex;
  padding: 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.search-esc:hover kbd { color: var(--text); border-color: var(--border-strong); }
.search-cancel {
  display: none;
  min-height: 44px;
  padding: 0 4px 0 8px;
  border: 0;
  background: transparent;
  color: var(--cmd);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.search-body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px 8px 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.sr-group + .sr-group { margin-top: 6px; }
.sr-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 18px;
}
.sr-group-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--g-bg, var(--surface-2));
  color: var(--g-fg, var(--muted));
}
.sr-group-icon .i { width: 12px; height: 12px; }
.sr-group-name { color: var(--text-2); }
.sr-group-cat { margin-left: auto; }

.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--text-2);
  text-decoration: none;
  cursor: pointer;
}
.sr-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
}
.sr-icon .i { width: 15px; height: 15px; }
.sr-main { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 1px; }
.sr-title, .sr-snippet { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sr-title { color: var(--text); font-size: 14.5px; font-weight: 500; line-height: 1.4; }
.sr-title.is-cmd { font-family: var(--font-mono); font-size: 13.5px; }
.sr-alias {
  margin-left: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 400;
}
.sr-snippet { color: var(--muted); font-size: 13px; line-height: 1.45; }
.sr-enter { flex: none; width: 15px; height: 15px; opacity: 0; transition: opacity .15s ease; }
.search-result.is-active { background: var(--accent); color: var(--accent-fg); }
.search-result.is-active .sr-title { color: var(--accent-fg); }
.search-result.is-active .sr-snippet { color: var(--text-2); }
.search-result.is-active .sr-icon { border-color: transparent; color: var(--cmd); }
.search-result.is-active .sr-enter { opacity: .8; }
.search mark {
  background: transparent;
  color: var(--cmd);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-decoration-color: color-mix(in srgb, var(--cmd) 40%, transparent);
  text-underline-offset: 3px;
}

.search-empty { padding: 40px 24px 44px; text-align: center; color: var(--muted); font-size: 14px; }
.search-empty .i { width: 26px; height: 26px; margin: 0 auto 12px; opacity: .6; }
.search-empty strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 15px; font-weight: 600; }
.search-empty code {
  padding: .1em .4em;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .9em;
}

.search-foot {
  display: flex;
  gap: 16px;
  flex: none;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  line-height: 20px;
}
.search-foot span { display: inline-flex; align-items: center; gap: 4px; }
.search-foot kbd { min-width: 22px; text-align: center; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 12px;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity .15s ease, transform .22s var(--ease-out);
}
.toast .i { width: 15px; height: 15px; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 959px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .header-inner { padding: 0 12px 0 8px; gap: 4px; }
  .menu-btn { display: inline-grid; }
  .brand { margin-left: 0; }
  .icon-btn { width: 44px; height: 44px; }
  .icon-btn .i { width: 20px; height: 20px; }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    width: min(85vw, 320px);
    border-right: 1px solid var(--border-strong);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .22s var(--ease-out), visibility 0s linear .22s;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .sidebar.is-open {
    transform: none;
    visibility: visible;
    transition: transform .22s var(--ease-out);
  }
  .drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    padding: 0 6px 0 14px;
    border-bottom: 1px solid var(--border);
    flex: none;
  }
  .side-nav { padding: 8px 12px 20px; }
  .side-group { margin-top: 18px; }
  .side-link { min-height: 44px; font-size: 15px; gap: 12px; }
  .side-link .i { width: 18px; height: 18px; }
  .side-foot { padding: 8px 12px 8px 23px; }
  .theme-switch button { width: 44px; height: 44px; }
  .theme-switch .i { width: 18px; height: 18px; }

  .backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: var(--overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
  }
  .backdrop.is-open { opacity: 1; pointer-events: auto; }

  .page { padding-top: 28px; }
}

@media (max-width: 959px), (pointer: coarse) {
  .local-nav-btn { font-size: 14.5px; }
}

@media (max-width: 639px) {
  .search-trigger {
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--text-2);
  }
  .search-trigger .i { width: 20px; height: 20px; }
  .search-trigger:hover { background: var(--surface-2); color: var(--text); }
  .search-trigger-text, .brand-sub, .bot-link { display: none; }
  .header-actions { margin-left: 0; gap: 0; }

  .page { padding-top: 24px; padding-bottom: 32px; }
  .crumbs { margin-bottom: 14px; }
  .doc h1 { font-size: 32px; gap: 12px; }
  .doc h1 .tile { width: 32px; height: 32px; margin-top: calc((1.1em - 32px) / 2); }
  .doc h1 .tile .i { width: 16px; height: 16px; }
  .doc .lead { font-size: 17px; }
  .doc > h2 { margin-top: 36px; padding-top: 30px; }
  .doc h2 { font-size: 23px; }
  .cmd-line { margin-left: -8px; margin-right: -8px; padding: 6px 8px; }

  .doc figure.tg { margin: 24px 0 32px; padding: 0 10px 14px; }
  .tg figcaption { margin: 0 -10px 6px; padding: 7px 12px; grid-template-columns: 38px minmax(0, 1fr) 38px; column-gap: 8px; }
  .tg-row-out { padding-left: 28px; }
  .tg-row-in { padding-right: 4px; gap: 6px; }
  .tg-avatar { width: 30px; height: 30px; }
  .tg-ava { font-size: 13.5px; }
  .tg-bubble-in, .tg-bubble-out { font-size: 14px; }
  .tg-btn { font-size: 13.5px; padding: 6px 4px; }
  .tg-btn.is-url { padding-left: 12px; padding-right: 12px; }
  .tg-sticker { font-size: 60px; }

  .pager { gap: 8px; margin-top: 48px; }
  .pager a { --pad: 12px; min-height: 64px; padding: 10px var(--pad) 11px; }
  .pager small { font-size: 12px; line-height: 16px; }
  .pager strong { font-size: 14px; }
  .site-footer { margin-top: 40px; padding-top: 24px; }
  .footer-links a { min-height: 44px; }

  .hero { padding-top: 24px; }
  .hero h1 { font-size: 48px; margin-bottom: 16px; }
  .hero p { font-size: 16.5px; margin-bottom: 28px; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { flex: 1 1 auto; height: 44px; }
  .home-group { margin-top: 56px; }
  .home-group > h2 { font-size: 20px; }
  .home-group > p { margin-bottom: 20px; font-size: 14.5px; }

  .card-grid { gap: 8px; }
  .mod-card, .mod-card.is-feature {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 2px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
  }
  .mod-card-top { grid-row: 1 / span 2; margin: 0; }
  .mod-card-top .badge, .mod-card .card-cmds { display: none; }
  .mod-card strong, .mod-card.is-feature strong {
    grid-column: 2;
    margin: 0;
    font-family: var(--font-sans);
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.01em;
  }
  .mod-card-desc, .mod-card.is-feature .mod-card-desc {
    grid-column: 2;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.45;
  }

  .search { padding: 0; align-items: stretch; }
  .search-panel {
    max-width: none;
    max-height: none;
    height: 100%;
    border: 0;
    border-radius: 0;
    animation: sheet-in .22s var(--ease-out);
  }
  .search-field {
    height: auto;
    min-height: 56px;
    padding: env(safe-area-inset-top, 0px) 12px 0 20px;
  }
  .search-esc, .search-foot { display: none; }
  .search-cancel { display: inline-flex; align-items: center; }
  .search-body { padding: 4px 8px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .search-result { min-height: 52px; }
}

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(12px); }
}

@media (hover: none) {
  .icon-btn:hover, .search-trigger:hover { background: transparent; color: var(--text-2); }
  .icon-btn:active, .search-trigger:active { background: var(--surface-2); color: var(--text); }
  .side-link:hover { background: transparent; color: var(--text-2); }
  .side-link:active { background: var(--surface-2); }
  .side-link[aria-current="page"]:hover { background: var(--accent); color: var(--accent-fg); }
  .mod-card:hover, .pager a:hover { box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .rv { opacity: 1; transform: none; }
}

@media print {
  .rv { opacity: 1 !important; transform: none !important; }
}

.tour-ask {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  padding: 16px;
}
.tour-ask-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 20, .6);
  opacity: 0;
  transition: opacity .35s ease;
}
.tour-ask-card {
  position: relative;
  width: min(380px, 100%);
  padding: 28px 24px 22px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 24px 60px -12px rgba(8, 12, 20, .45);
  text-align: center;
  opacity: 0;
  transform: translateY(14px) scale(.96);
  transition: opacity .3s ease, transform .5s cubic-bezier(.16, 1, .3, 1);
}
.tour-ask-card:focus { outline: none; }
.tour-ask.is-on .tour-ask-backdrop { opacity: 1; }
.tour-ask.is-on .tour-ask-card { opacity: 1; transform: none; }
.tour-ask-ava {
  display: block;
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px color-mix(in srgb, var(--primary) 45%, transparent);
}
.tour-ask-title { margin: 0 0 6px; color: var(--text); font-family: var(--font-sans); font-size: 22px; font-weight: 600; line-height: 1.25; }
.tour-ask-text { margin: 0 0 20px; color: var(--text-2); font-size: 15px; line-height: 1.5; }
.tour-ask-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tour-ask-actions .btn { width: 100%; height: 44px; justify-content: center; }

.tour { position: fixed; inset: 0; z-index: 300; pointer-events: none; transition: opacity .2s ease; }
.tour[hidden] { display: none; }
.tour.is-paused { opacity: 0; visibility: hidden; }
.tour-tip { pointer-events: auto; }
.toast { z-index: 400; }
.tour-spot {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 12px;
  box-shadow:
    0 0 0 2px var(--primary),
    0 0 0 7px color-mix(in srgb, var(--primary) 22%, transparent),
    0 0 0 9999px rgba(8, 12, 20, .68);
  pointer-events: none;
  transition: transform .4s cubic-bezier(.16, 1, .3, 1), width .4s cubic-bezier(.16, 1, .3, 1), height .4s cubic-bezier(.16, 1, .3, 1);
}

.tour-spot::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 70%, transparent);
  animation: tour-pulse 1.8s ease-out infinite;
}
@keyframes tour-pulse {
  0% { opacity: .9; transform: scale(1); }
  80%, 100% { opacity: 0; transform: scale(1.06); }
}
.tour.is-free .tour-spot { width: 0 !important; height: 0 !important; box-shadow: 0 0 0 9999px rgba(8, 12, 20, .66); }
.tour-tip {
  position: absolute;
  width: min(330px, calc(100vw - 24px));
  padding: 16px 18px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: left .35s cubic-bezier(.16, 1, .3, 1), top .35s cubic-bezier(.16, 1, .3, 1);
}

.tour-tip.is-below::before, .tour-tip.is-above::before {
  content: "";
  position: absolute;
  left: calc(var(--arrow-x, 50%) - 7px);
  width: 12px;
  height: 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  transform: rotate(45deg);
}
.tour-tip.is-below::before { top: -7px; border-right: 0; border-bottom: 0; }
.tour-tip.is-above::before { bottom: -7px; border-left: 0; border-top: 0; }
.tour-count { margin: 0 0 4px; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.tour-title { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.tour-text { margin: 0 0 14px; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.tour-actions { display: flex; align-items: center; gap: 8px; }
.tour-nav { display: flex; gap: 8px; margin-left: auto; }
.tour-nav [hidden] { display: none; }
.tour-skip { padding: 6px 4px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; }
.tour-skip:hover { color: var(--text); }
.tour-skip[hidden] { display: none; }
.link-copy.tour-show { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .tour-ask-backdrop, .tour-ask-card, .tour-spot, .tour-tip { transition: none; }
  .tour-spot::after { animation: none; opacity: 0; }
}

.site-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
  margin-top: 20px;
}
.site-stats[hidden] { display: none; }
.stat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}
.stat .i { width: 15px; height: 15px; color: var(--text-2); }
.stat b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.stat.is-online { border-color: color-mix(in srgb, var(--tint-green-fg) 35%, var(--border)); }
.stat-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tint-green-fg);
}
.stat-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--tint-green-fg);
  animation: stat-pulse 1.8s ease-out infinite;
}
@media (max-width: 639px) {
  .site-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
  .site-stats[hidden] { display: none; }
  .stat {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    align-items: center;
    gap: 5px 6px;
    min-height: 0;
    padding: 11px 6px 10px;
    border-radius: 12px;
    text-align: center;
    white-space: normal;
  }
  .stat b { font-size: 17px; }
  .stat > span:last-child { flex-basis: 100%; font-size: 11.5px; line-height: 1.3; }
}
@keyframes stat-pulse {
  0% { opacity: .7; transform: scale(1); }
  80%, 100% { opacity: 0; transform: scale(2.6); }
}
@media (prefers-reduced-motion: reduce) {
  .stat-dot::after { animation: none; }
}

html.is-loading body > :not(.loader) { visibility: hidden; }
.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  transition: opacity .35s ease;
}
html.has-loader .loader { display: flex; }
html.is-ready .loader { opacity: 0; pointer-events: none; }
.loader-ava { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.loader-name { margin: 16px 0 18px; font-size: 20px; font-weight: 600; line-height: 1.2; letter-spacing: -.015em; }
.loader-bar {
  width: 180px;
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: color-mix(in srgb, var(--primary) 18%, transparent);
}
.loader-bar span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .25s ease-out;
}
.loader-pct { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
  .loader, .loader-bar span { transition: none; }
}
