/* Головна mandrock.me. Токени — вшиті з макета (design/mockup/home/04-home-d.html), без лінків на спільні файли: сторінка не міняється, коли хтось править files/tools.mandrock.me. */
:root {
  color-scheme: dark;
  --radius: .625rem; --radius-card: .25rem; --radius-control: 1rem;
  --accent-purple: oklch(62% .27 300); --accent-cyan: oklch(80% .15 205); --accent-lime: oklch(87% .22 132); --accent-crimson: oklch(55% .22 12);
  --accent-shader: var(--accent-purple);
  --action: var(--accent-purple); --info: var(--accent-cyan); --ok: var(--accent-lime); --alive: var(--accent-crimson);
  --background: oklch(15% .04 8); --foreground: oklch(96% .012 352);
  --card: oklch(18% .035 355); --card-foreground: var(--foreground);
  --popover: oklch(18% .035 355); --popover-foreground: var(--foreground);
  --primary: var(--accent-shader); --primary-foreground: oklch(10% .04 356);
  --secondary: oklch(24% .045 354); --secondary-foreground: var(--foreground);
  --muted: oklch(21% .04 355); --muted-foreground: oklch(68% .035 352);
  --accent: var(--accent-shader); --accent-foreground: oklch(10% .04 356);
  --destructive: oklch(70% .18 38);
  --border: oklch(30% .05 353 / .6); --input: oklch(30% .05 353 / .7); --ring: var(--accent-shader);
  --page-accent: var(--accent-crimson);
  --glow-ambient: 0 0 0 1px color-mix(in oklch, var(--glow) 14%, transparent);
  --glow-attention: 0 0 0 1px color-mix(in oklch, var(--glow) 55%, transparent), 0 0 20px color-mix(in oklch, var(--glow) 40%, transparent);
  --glow-interaction: 0 0 0 1.5px color-mix(in oklch, var(--glow) 85%, transparent), 0 0 28px color-mix(in oklch, var(--glow) 60%, transparent);
}
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap; src: url(fonts/jetbrains-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; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap; src: url(fonts/jetbrains-mono-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root { --glow: var(--page-accent); --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--background); color: var(--foreground); font-family: var(--mono); overflow-x: hidden; }
a { color: var(--page-accent); text-underline-offset: 3px; }
a:hover { color: var(--foreground); }
:focus-visible { outline: 2px solid var(--page-accent); outline-offset: 2px; }
.muted { color: var(--muted-foreground); }
.acc { color: var(--page-accent); }
.eyebrow { font-size: 11px; letter-spacing: .2em; color: var(--muted-foreground); }

/* глітчі: підписи доменів глітчить ambient (data-m0-glitch); G3 луна; G2 (.g2) — смуги на постерах. Усе статичне під reduce-motion */
.g-echo { text-shadow: 0 2px 0 color-mix(in oklch, var(--foreground) 20%, transparent), 0 4px 0 color-mix(in oklch, var(--foreground) 9%, transparent), 0 6px 0 color-mix(in oklch, var(--foreground) 4%, transparent); }
.tap-ring { animation: tapring 2.4s ease-out infinite; transform-origin: center; }
@keyframes tapring { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.4); } }
@media (prefers-reduced-motion: reduce) { .tap-ring { animation: none; } }
/* ---- шар 1 ---- */
#l1 { position: relative; height: 620px; overflow: hidden; }
#l1 picture { display: contents; }
#l1 .hero { position: absolute; left: 0; bottom: 0; width: 100%; height: 280px; object-fit: cover; object-position: 50% 50%; display: block; }
.l1-fade { position: absolute; left: 0; right: 0; top: 330px; height: 130px; background: linear-gradient(to bottom, var(--background) 0%, color-mix(in oklch, var(--background) 55%, transparent) 55%, transparent 100%); }
.l1-top { display: none; }
.l1-text { position: absolute; left: 20px; right: 20px; top: 34px; }
.l1-in { display: flex; flex-direction: column; }
h1 { margin: 0; font-size: 52px; line-height: .94; font-weight: 800; letter-spacing: -.03em; }
.city { margin-top: 10px; font-size: 12px; color: var(--muted-foreground); letter-spacing: .16em; }
.thesis { margin: 22px 0 0; font-size: 19px; line-height: 1.3; font-weight: 500; overflow-wrap: break-word; }
.words { margin: 14px 0 0; font-size: 15px; line-height: 1.7; color: var(--page-accent); }

/* ---- шар 2 ---- */
#l2 { position: relative; padding: 36px 20px 20px; border-top: 1px solid var(--border); max-width: 1440px; margin: 0 auto; }
.l2-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.lang { display: flex; border: 1px solid var(--border); }
.lang a { min-width: 44px; height: 36px; display: inline-flex; align-items: center; justify-content: center; font: 500 12px var(--mono); color: var(--muted-foreground); text-decoration: none; }
.lang a[aria-current] { background: var(--page-accent); color: var(--primary-foreground); font-weight: 700; }
.l2-body { display: flex; flex-direction: column; gap: 18px; }
.l2-left { display: flex; flex-direction: column; gap: 18px; }
.hand { display: flex; flex-direction: column; gap: 6px; }
.hand p { margin: 0; font-size: 15px; line-height: 1.6; }
.upd { font-size: 11px; color: var(--muted-foreground); }
.siton { display: flex; gap: 12px; align-items: baseline; font-size: 13px; flex-wrap: wrap; }
.siton a { color: var(--foreground); text-decoration: underline; text-decoration-color: var(--page-accent); }
.now-post { position: relative; border: 1px solid var(--border); background: var(--card); padding: 16px; display: flex; flex-direction: column; gap: 12px; margin-left: 6px; min-width: 0; transform: rotate(-.8deg); transform-origin: 30% 50%; }
/* «недбало» покладена картка: зсунутий дубль рамки й обрізаний технічний підпис з id поста */
.np-ghost { position: absolute; inset: 0; z-index: -1; border: 1px dashed color-mix(in oklch, var(--page-accent) 55%, transparent); transform: translate(6px, 7px); pointer-events: none; }
.np-tag { position: absolute; right: 10px; bottom: -7px; padding: 0 4px; background: var(--background); font-size: 11px; line-height: 14px; letter-spacing: .08em; color: var(--muted-foreground); clip-path: inset(0 0 42% 0); pointer-events: none; user-select: none; }
.np-tag:empty { display: none; }
.np-head { display: flex; justify-content: space-between; font-size: 11px; gap: 12px; }
tg-latest { display: block; min-width: 0; }
tg-latest a { font-size: 13px; }
/* до появи картки (або картки-фолбека) висоту не резервуємо */
tg-latest[aria-busy="true"] { height: 0; overflow: hidden; }

/* картка поста (власна, замість iframe Telegram): фото + моноширинний текст, радіуси 0, без обводки Telegram */
.tg-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tg-title { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.tg-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; min-width: 0; }
.tg-photos[data-n="1"] { grid-template-columns: 1fr; }
.tg-photo { position: relative; display: block; overflow: hidden; background: var(--card); line-height: 0; min-width: 0; }
.tg-photo img { display: block; width: 100%; height: auto; object-fit: contain; border: 0; border-radius: 0; background: var(--card); }
/* одне фото — на всю ширину у власних пропорціях; вище 520px — contain на темному тлі */
.tg-photos[data-n="1"] .tg-photo { background: var(--background); }
.tg-photos[data-n="1"] .tg-photo img { max-height: 520px; background: var(--background); }
/* альбом: клітинки з пропорцією першого фото, кожне фото вписане повністю, без обрізки */
.tg-photos:not([data-n="1"]) .tg-photo { aspect-ratio: var(--ar, 1 / 1); }
.tg-photos:not([data-n="1"]) .tg-photo img { height: 100%; }
/* малий постер відео: рамка до 240px, кадр по центру у власному розмірі, позаду він же розмитий і притемнений */
.tg-photo.tg-small { display: flex; justify-content: center; align-items: center; height: 240px; aspect-ratio: auto; background: var(--background); }
.tg-photo.tg-small img.tg-bg { position: absolute; inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); object-fit: cover; filter: blur(18px) brightness(.45); }
.tg-photo.tg-small img:not(.tg-bg) { position: relative; width: auto; height: auto; max-width: 100%; max-height: 240px; background: transparent; }
.tg-play { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; display: grid; place-items: center; background: color-mix(in oklch, var(--background) 72%, transparent); border: 1px solid var(--page-accent); color: var(--page-accent); font-size: 16px; line-height: 1; }
.tg-text { margin: 0; font-size: 14px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; font-variant-ligatures: none; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 8; line-clamp: 8; overflow: hidden; }
.tg-text a, .tg-inline { color: var(--page-accent); overflow-wrap: anywhere; }
.tg-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted-foreground); }
.tg-foot a { font-size: 11px; color: var(--muted-foreground); text-underline-offset: 3px; }
.tg-foot a:hover { color: var(--foreground); }

/* ---- шар 3 ---- */
#l3 { position: relative; max-width: 1440px; margin: 0 auto; padding: 52px 0 24px; display: flex; flex-direction: column; gap: 60px; }
.dom { display: flex; flex-direction: column; gap: 12px; margin-left: calc(18px + var(--r, .5) * 16px); margin-right: calc(18px + var(--r2, .5) * 16px); transform: rotate(var(--rot, 0deg)); position: relative; }
.dtxt { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dlabel { font-size: 16px; font-weight: 700; letter-spacing: .1em; color: var(--page-accent); text-transform: uppercase; }
.dtxt p { margin: 0; font-size: 15px; line-height: 1.6; }
.slot { position: relative; width: 100%; height: 212px; }
.bridge { margin: -24px 34px; padding: 4px 0; display: flex; flex-direction: column; gap: 10px; }
.bridge p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted-foreground); overflow-wrap: break-word; }
.stitch { font-size: 11px; letter-spacing: .3em; color: color-mix(in oklch, var(--page-accent) 60%, transparent); white-space: nowrap; overflow: hidden; }

/* постер */
.ins { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 1px solid var(--border); background: var(--card); color: var(--foreground); overflow: hidden; cursor: pointer; text-align: left; font-family: var(--mono); display: block; }
.ins .pbody { position: absolute; left: 20px; right: 20px; top: 22px; display: flex; flex-direction: column; gap: 8px; }
.pk { font-size: 11px; color: var(--muted-foreground); overflow-wrap: anywhere; }
.pt { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; overflow-wrap: anywhere; color: var(--foreground); }
.pt.sm { font-size: 20px; font-weight: 700; letter-spacing: 0; }
.ins .art { position: absolute; display: block; }
.ins .art.wave { left: 20px; right: 20px; width: calc(100% - 40px); top: 78px; height: 80px; }
.ins .art.grid { right: 18px; top: 16px; width: 170px; height: 170px; }
.ins .art.steps { left: 20px; right: 20px; width: calc(100% - 40px); top: 66px; height: 90px; }
.ins .pimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 18%; filter: saturate(.85); display: block; }
.ins.k-grid .pbody { right: auto; width: 130px; }
.g2 { position: absolute; left: 0; right: 0; background: var(--background); pointer-events: none; }
.g2.lime { box-shadow: 0 1px 0 color-mix(in oklch, var(--page-accent) 70%, transparent); }
.ptag { position: absolute; right: 10px; top: 8px; font-size: 10px; color: var(--muted-foreground); }
.ins.k-frame .ptag { color: var(--foreground); background: var(--background); padding: 2px 4px; }
.tap { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 8px; align-items: center; min-height: 32px; padding: 6px 10px; background: var(--background); border: 1px solid var(--page-accent); color: var(--page-accent); font-size: 12px; box-shadow: var(--glow-attention); }

/* постер поста каналу: фото на всю плашку, під текстом — скрим */
.ins.k-post .pimg { object-position: 50% 30%; filter: saturate(.85); }
.ins.k-post .pscrim { position: absolute; inset: 0; background: linear-gradient(to bottom, color-mix(in oklch, var(--background) 92%, transparent) 0%, color-mix(in oklch, var(--background) 74%, transparent) 55%, color-mix(in oklch, var(--background) 25%, transparent) 100%); }
.ins.k-post .pbody { right: 20px; gap: 6px; }
.pex { font-size: 13px; line-height: 1.5; color: var(--foreground); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }

/* жива вставка */
.slot[data-live] .live { position: absolute; inset: 0; border: 1px solid var(--page-accent); background: var(--card); box-shadow: var(--glow-interaction); display: flex; flex-direction: column; overflow: hidden; }
.live iframe { flex: 1 1 auto; min-height: 0; width: 100%; border: 0; background: var(--card); color-scheme: dark; }
.lpost { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 14px 10px; }
.lpost .tg-photos[data-n="1"] img { max-height: 170px; }
.live .limg { flex: 1 1 auto; min-height: 0; width: 100%; object-fit: contain; background: var(--background); }
.lcard { flex: 1 1 auto; min-height: 0; padding: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; overflow: hidden; }
.lcard .btn { margin-top: 6px; font-size: 13px; }
.live .bar { flex: 0 0 44px; display: flex; justify-content: space-between; align-items: center; padding: 0 0 0 12px; border-top: 1px solid var(--border); background: var(--background); }
.live .st { font-size: 12px; color: var(--alive); }
.live .st::before { content: '● '; }
.sleep { min-width: 44px; height: 44px; padding: 0 14px; border: 0; background: transparent; color: var(--foreground); font: 500 12px var(--mono); cursor: pointer; }

/* debris: вертикальні рядки в полях */
.debris { position: absolute; inset: 0; pointer-events: none; user-select: none; }
.deb { position: absolute; font-size: 11px; line-height: 12px; white-space: nowrap; writing-mode: vertical-rl; }
.deb.c0 { color: var(--accent-cyan); }
.deb.c1 { color: var(--accent-purple); }
.deb.dl { left: 1px; transform: rotate(180deg); }
.deb.dr { right: 1px; }

/* ---- шар 4 ---- */
#l4 { border-top: 1px solid var(--border); }
.l4-in { max-width: 1440px; margin: 0 auto; padding: 56px 20px 48px; display: flex; flex-direction: column; gap: 32px; }
.l4-grid { display: flex; flex-direction: column; gap: 36px; }
.l4b { display: flex; flex-direction: column; gap: 12px; }
.l4b h2 { margin: 0; font-size: 20px; font-weight: 700; }
.l4b p { margin: 0; font-size: 15px; line-height: 1.6; }

/* ---- шар 5 ---- */
#l5 { border-top: 1px solid var(--border); }
.l5-in { position: relative; max-width: 1440px; margin: 0 auto; padding: 56px 20px 32px; }
.l5-links { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.big { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--foreground); }
.big > span:first-child { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.big .sub { font-size: 13px; color: var(--page-accent); }
.big.b1 { transform: rotate(-1deg); }
.big.b3 { transform: rotate(.8deg); margin-left: 14px; }
.work { margin: 56px 0 0; max-width: 68ch; font-size: 14px; line-height: 1.6; color: var(--muted-foreground); }

footer { border-top: 1px dashed var(--border); }
.foot-in { max-width: 1440px; margin: 0 auto; padding: 20px 20px 28px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.seedline { font-size: 11px; color: color-mix(in oklch, var(--muted-foreground) 65%, transparent); }
footer nav { display: flex; gap: 22px; font-size: 13px; flex-wrap: wrap; }

/* ---- десктоп ---- */
@media (min-width: 1100px) {
  #l1 { height: 900px; }
  #l1 .hero { top: 0; height: 900px; object-position: 50% 60%; }
  /* кадр 3: термінал посередині кадру лягав під тезу — зсуваємо кадр вліво до краю (термінал ~67px правіше) */
  #l1 .hero[src*="frame3-workstation"] { object-position: 0% 60%; }
  .l1-fade { top: 0; height: 100%; background: linear-gradient(100deg, var(--background) 0%, color-mix(in oklch, var(--background) 88%, transparent) 30%, color-mix(in oklch, var(--background) 30%, transparent) 52%, transparent 70%); }
  .l1-top { display: block; position: absolute; left: 0; right: 0; top: 0; height: 160px; background: linear-gradient(to bottom, color-mix(in oklch, var(--background) 70%, transparent), transparent); }
  .l1-text { position: relative; left: auto; right: auto; top: auto; max-width: 1440px; margin: 0 auto; padding: 150px 80px 0; }
  .l1-in { max-width: 600px; }
  h1 { font-size: 112px; line-height: .9; letter-spacing: -.04em; }
  .city { margin-top: 16px; font-size: 14px; letter-spacing: .18em; }
  .thesis { margin-top: 40px; font-size: 34px; line-height: 1.22; max-width: 520px; }
  .words { margin-top: 24px; font-size: 16px; }

  #l2 { padding: 80px 80px 40px; }
  .l2-head { margin-bottom: 36px; }
  .eyebrow { font-size: 12px; letter-spacing: .22em; }
  .l2-body { flex-direction: row; gap: 80px; align-items: flex-start; }
  .l2-left { flex: 1 1 360px; gap: 28px; min-width: 0; }
  .hand p { font-size: 24px; line-height: 1.4; }
  .upd { font-size: 12px; }
  .siton { font-size: 15px; }
  .now-post { flex: 0 1 520px; padding: 22px; gap: 14px; margin-left: 0; }
  .np-head { font-size: 12px; }

  #l3 { padding: 100px 80px 60px; gap: 110px; }
  .dom { --sw: 480px; --sh: 300px; flex-direction: row; gap: 56px; align-items: center; margin-right: 0;
         margin-left: calc(var(--r, .5) * max(0px, min(300px, 100% - 56px - 440px - var(--sw) - 8px))); }
  .dom.rev { flex-direction: row-reverse; justify-content: flex-end; }
  .dom[data-d="visuals"] { --sw: 520px; --sh: 325px; }
  .dom[data-d="code"] { --sw: 420px; }
  .dom[data-d="prose"] { --sw: 460px; --sh: 280px; }
  .dom[data-d="channel"] { --sw: 420px; --sh: 260px; }
  .dtxt { flex: 1 1 360px; max-width: 460px; }
  .dtxt p { font-size: 18px; line-height: 1.6; }
  .dlabel { font-size: 16px; letter-spacing: .14em; }
  .slot { flex: 0 0 var(--sw); width: var(--sw); height: var(--sh); }
  .bridge { margin: -50px 0 -50px calc(var(--r, .5) * max(0px, 100% - 520px)); max-width: 520px; }
  .bridge p { font-size: 14px; line-height: 1.65; }
  .stitch { font-size: 12px; letter-spacing: .32em; }
  .ins .pbody { left: 28px; right: 28px; top: 30px; gap: 10px; }
  .pk { font-size: 12px; }
  .pt { font-size: 34px; }
  .pt.sm { font-size: 22px; }
  .ins .art.wave { left: 30px; width: calc(100% - 60px); top: 92px; height: 120px; }
  .ins .art.steps { left: 30px; width: calc(100% - 60px); top: 84px; height: 140px; }
  .ins .art.grid { right: 28px; top: 30px; width: 230px; height: 230px; }
  .ins.k-grid .pbody { width: 150px; }
  .tap { left: 16px; bottom: 16px; padding: 7px 12px; min-height: 36px; }
  .ptag { right: 12px; top: 10px; }

  .l4-in { padding: 110px 80px 90px; gap: 56px; }
  .l4-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px; }
  .l4b h2 { font-size: 22px; }
  .l4b p { font-size: 18px; }
  .l5-in { padding: 90px 80px 40px; }
  .l5-links { flex-direction: row; flex-wrap: wrap; gap: 48px; align-items: flex-end; }
  .big > span:first-child { font-size: 64px; letter-spacing: -.03em; }
  .big.b1 { transform: rotate(-1deg) translateY(-14px); }
  .big.b2 { margin-left: 40px; }
  .big.b3 { transform: rotate(.8deg) translateY(10px); margin-left: 90px; }
  .work { margin-top: 110px; }
  .foot-in { padding: 20px 80px 32px; }
}
/* ≥1200: теза рівно у 2 рядки — розрив після першого речення; колонка розширена під довшу EN-фразу (37 знаків × 20.4px) */
@media (min-width: 1200px) {
  .l1-in { max-width: 800px; }
  .thesis { max-width: 800px; }
  .thesis .ts { display: block; }
  .words { font-size: 18px; }
  .dlabel { font-size: 22px; }
}
/* планшет: колонкова розкладка, але вужча колонка */
@media (min-width: 520px) and (max-width: 1099px) {
  .dom { max-width: 640px; }
  .slot { height: 260px; }
  .l1-text, .l2-body, .l4-grid { max-width: 640px; }
}

/* ---- моно-проза: ієрархію тримають розмір, вага, колір ---- */
.hand p, .dtxt p, .l4b p, .work, .bridge p { font-weight: 400; font-variant-ligatures: none; font-feature-settings: "calt" 0; text-align: left; text-wrap: pretty; overflow-wrap: break-word; max-width: 68ch; }
.thesis { font-variant-ligatures: none; font-feature-settings: "calt" 0; }
.dtxt p a, .l4b p a, .work a, .hand p a { overflow-wrap: anywhere; }
@media (min-width: 481px) {
  .hand p, .dtxt p, .l4b p { font-size: 16px; line-height: 1.65; }
}

/* ≤480: підписи постерів — не менше 11px і контраст ≥ 4.5:1 */
@media (max-width: 480px) {
  .ptag { font-size: 11px; color: var(--foreground); }
  .pk { font-size: 11px; }
}

/* десктоп: «недбало» покладені постери (зсув 1–3px, нахил ≤ .6°) і виступ 1–2 з них у поле (--px 8–24px, нахил ≤ 1.5°; значення від сіда з main.js) */
@media (min-width: 1100px) {
  .slot { transform: translate(calc(var(--sx, 0px) + var(--px, 0px)), var(--sy, 0px)) rotate(var(--srot, 0deg)); }
  .stitch { transform: translateX(var(--sx, 0)); }
}
/* ≤480: «недбало» покладені постер і розділювач (зсув 1–3px, нахил ≤ .6°; значення від сіда з main.js) */
@media (max-width: 480px) {
  .slot { transform: translate(var(--sx, 0), var(--sy, 0)) rotate(var(--srot, 0deg)); }
  .stitch { transform: translateX(var(--sx, 0)); }
}

/* hover-глітч на нетекстових інтерактивних елементах (постер-картки, розділювачі): RGB-split + зсув 1–3px, steps(2), 240мс */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .ins:hover { animation: insg 240ms steps(2) 1; }
  .stitch:hover { animation: stg 240ms steps(2) 1; }
}
@keyframes insg { 0% { transform: translate(2px, -1px); box-shadow: -3px 0 0 var(--accent-cyan), 3px 0 0 var(--accent-purple); } 50% { transform: translate(-2px, 1px); box-shadow: 3px 0 0 var(--accent-cyan), -3px 0 0 var(--accent-purple); } 100% { transform: none; box-shadow: none; } }
@keyframes stg { 0% { transform: translateX(3px); } 50% { transform: translateX(-2px); } 100% { transform: none; } }

/* текстові глітчі (.homeglitch з /hub): два привиди content:attr(data-text), cyan --info і purple, ±5px / ±20px, opacity .7;
   оригінальний span смикається translate(3px,-2px) у steps(2). У спокої привиди visibility:hidden — піксель-у-піксель як без них. */
:root { --glitch-budget: 1; }
@media (prefers-reduced-motion: reduce) { :root { --glitch-budget: 0; } }
.tgl { position: relative; display: inline-block; }
.tgl::before, .tgl::after { content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; white-space: inherit; opacity: .7; visibility: hidden; pointer-events: none; user-select: none; }
.tgl::before { color: var(--info); }
.tgl::after { color: var(--accent-purple); }
.tgl.on { animation: tglo 480ms steps(2) 1; }
.tgl.on::before { visibility: visible; animation: tglb 480ms steps(2) 1; }
.tgl.on::after { visibility: visible; animation: tgla 480ms steps(2) 1; }
@keyframes tglo { 0% { transform: translate(3px, -2px); } 50% { transform: none; } 100% { transform: translate(3px, -2px); } }
@keyframes tglb { 0% { transform: translate(-5px, 1px); } 50% { transform: translate(-20px, -1px); } 100% { transform: translate(-5px, 0); } }
@keyframes tgla { 0% { transform: translate(5px, -1px); } 50% { transform: translate(20px, 1px); } 100% { transform: translate(5px, 0); } }
