/* =====================================================================
   STALKERX — Redesign "ПДА // ЗОНА"  (home only, scoped to body.pda-home)
   Diegetic PDA terminal × cinematic Zone. No AI-slop.
   ===================================================================== */

body.pda-home {
    --zx-bg:        #0a0d0c;
    --zx-bg-2:      #0e1312;
    --zx-panel:     rgba(16, 21, 19, 0.72);
    --zx-panel-2:   rgba(22, 28, 25, 0.6);
    --zx-line:      rgba(130, 150, 130, 0.13);
    --zx-line-2:    rgba(165, 185, 155, 0.26);
    --zx-amber:     #e8b23a;
    --zx-amber-2:   #ffcf6b;
    --zx-amber-dim: rgba(232, 178, 58, 0.55);
    --zx-danger:    #ff5a2c;
    --zx-ok:        #93c96a;
    --zx-text:      #d9ded4;
    --zx-dim:       #8b948a;
    --zx-faint:     rgba(184, 194, 182, 0.34);

    --font-display: 'Unbounded', 'Montserrat', sans-serif;
    --font-mono:    'JetBrains Mono', 'Consolas', monospace;
    --font-body:    'Montserrat', system-ui, sans-serif;

    background: var(--zx-bg);
    color: var(--zx-text);
    font-family: var(--font-body);
    overflow-x: hidden;
    padding-top: 0; padding-bottom: 0 !important; /* kill legacy offsets (global sets body padding-bottom:16px !important on mobile) */
}

/* Global film scanlines over the whole home page (very subtle) */
body.pda-home::after {
    content: "";
    position: fixed; inset: 0;
    pointer-events: none; z-index: 9998;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0,0,0,0)   0px,
        rgba(0,0,0,0)   2px,
        rgba(0,0,0,0.06) 3px,
        rgba(0,0,0,0)   4px
    );
    mix-blend-mode: multiply;
    opacity: .5;
}

body.pda-home ::selection { background: var(--zx-amber); color: #10130f; }

/* Enforce the angular language everywhere — strip leftover radii coming from the
   global stylesheet. Round status dots (.dot, 50%) are intentionally excluded. */
.pda-home .header-auth-btn,
.pda-home .choice-faction,
.pda-home .content-preview-news,
.pda-home .preview-news-wrap,
.pda-home .news-arrow,
.pda-home .rank-badge,
.pda-home .chat-message-img,
.pda-home .chat-avatar-initial,
.pda-home .new-user-initial,
.pda-home .new-user-avatar,
.pda-home .recent-artifact-img-wrap,
.pda-home .header-avatar,
.pda-home .header-avatar-initial,
.pda-home .header-logout,
.pda-home img { border-radius: 0 !important; }

/* Reusable mono section eyebrow */
.pda-home .zx-eyebrow {
    font-family: var(--font-mono);
    font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
    color: var(--zx-amber-dim);
    display: inline-flex; align-items: center; gap: 10px;
}
.pda-home .zx-eyebrow::before {
    content: ""; width: 26px; height: 1px; background: var(--zx-amber-dim);
}
.pda-home .zx-index {
    font-family: var(--font-mono); color: var(--zx-faint);
    font-size: 13px; letter-spacing: 2px;
}
.pda-home a.zx-index { transition: color .2s ease; }
.pda-home a.zx-index:hover { color: var(--zx-amber); }

/* ============================= HEADER (scoped override) ============== */
body.pda-home header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    background: rgba(9, 12, 11, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--zx-line);
    transition: background .3s ease, border-color .3s ease;
}
body.pda-home header.zx-scrolled {
    background: rgba(8, 11, 10, 0.985);
    border-bottom-color: var(--zx-line-2);
}
body.pda-home .header-main {
    max-width: 1640px; margin: 0 auto;
    padding: 14px 20px;
    display: flex; align-items: center; gap: 34px;
}
body.pda-home .logo img { height: 34px; display: block; filter: drop-shadow(0 0 10px rgba(232,178,58,.25)); }

body.pda-home nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
body.pda-home nav ul li a {
    font-family: var(--font-mono);
    font-size: 12.5px; letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--zx-dim); text-decoration: none;
    padding: 9px 14px; position: relative; transition: color .2s;
}
body.pda-home nav ul li a:hover,
body.pda-home nav ul li a.active { color: var(--zx-amber); }

body.pda-home .header-auth { margin-left: auto; display: flex; align-items: center; gap: 16px; }
body.pda-home .header-auth-link {
    font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.5px;
    color: var(--zx-dim); text-decoration: none; transition: color .2s;
}
body.pda-home .header-auth-link:hover { color: var(--zx-text); }
body.pda-home .header-auth-btn {
    font-family: var(--font-mono); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600;
    color: #10130f; text-decoration: none;
    padding: 11px 24px; border: none; background: var(--zx-amber);
    position: relative; transition: all .2s; display: inline-flex; align-items: center; gap: 8px;
}
body.pda-home .header-auth-btn::before {
    content: "›"; font-weight: 700; font-size: 15px; line-height: 1; margin-top: -1px;
}
body.pda-home .header-auth-btn:hover {
    background: transparent; color: var(--zx-amber);
    box-shadow: inset 0 0 0 1.5px var(--zx-amber);
}
body.pda-home .header-user { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--zx-text); border: none; border-radius: 0; padding: 4px 8px; transition: background .2s ease; }
body.pda-home .header-user:hover { border: none; background: #1a201d; }
body.pda-home .header-avatar, body.pda-home .header-avatar-initial {
    width: 38px; height: 38px; border-radius: 0; object-fit: cover;
    border: 1px solid var(--zx-line-2);
    display: grid; place-items: center; font-family: var(--font-display); color: var(--zx-amber);
    background: var(--zx-panel);
}
body.pda-home .header-username { font-family: var(--font-mono); font-size: 13px; color: var(--zx-text); }
body.pda-home .header-logout {
    background: none; border: 1px solid var(--zx-line); color: var(--zx-dim);
    width: 36px; height: 36px; cursor: pointer; transition: all .2s;
}
body.pda-home .header-logout:hover { color: var(--zx-danger); border-color: var(--zx-danger); }

/* ============================= SHELL ============================== */
/* kill global main side padding: it double-pads with .zx-wrap and insets the full-bleed hero.
   Single 20px gutter lives on .zx-wrap; hero-bg spans edge to edge. */
body.pda-home main { display: block; padding-inline: 0; }
/* padding-block/inline (not shorthand) so a `.zx-section.zx-wrap` element gets both without one overriding the other */
.pda-home .zx-wrap { max-width: 1640px; margin: 0 auto; padding-inline: 20px; }
.pda-home .zx-section { padding-block: 52px; position: relative; }
.pda-home .zx-section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 20px; margin-bottom: 40px; flex-wrap: wrap;
}
.pda-home .zx-title {
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(28px, 4vw, 52px); line-height: .98; letter-spacing: -1px;
    text-transform: uppercase; color: var(--zx-text); margin: 8px 0 0;
}
.pda-home .zx-title em { color: var(--zx-amber); font-style: normal; }

/* ============================= HERO ============================== */
.pda-home .zx-hero {
    position: relative; min-height: 100svh;
    display: flex; flex-direction: column; justify-content: center;
    padding-top: 46px; padding-bottom: 46px; /* symmetric → content sits truly in the vertical middle on tall screens */
    overflow: hidden;
}
/* short viewports: pin content to the top and reserve the HUD band, so it never rises into the status line */
@media (max-height: 760px) { .pda-home .zx-hero { justify-content: flex-start; padding-top: 164px; } }
.pda-home .zx-hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background-image: url('/img/redesign/hero_zone.jpg');
    background-size: cover; background-position: center 40%;
    transform: scale(1.08); will-change: transform;
    filter: saturate(.9) contrast(1.05);
}
.pda-home .zx-hero-bg::after {
    content: ""; position: absolute; inset: 0;
    background:
      radial-gradient(120% 90% at 50% 0%, transparent 30%, rgba(8,11,10,.5) 100%),
      linear-gradient(180deg, rgba(8,11,10,.55) 0%, rgba(8,11,10,.15) 35%, rgba(8,11,10,.7) 78%, var(--zx-bg) 100%);
}
/* CRT scanline sweep only on hero */
.pda-home .zx-hero-scan {
    position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.12) 3px, rgba(0,0,0,0) 4px);
    opacity: .35; mix-blend-mode: multiply;
}
.pda-home .zx-hero-inner {
    position: relative; z-index: 3;
    max-width: 1640px; width: 100%; margin: 0 auto; padding: 0 20px;
}

/* HUD top status bar */
.pda-home .zx-hud {
    position: absolute; top: 90px; left: 0; right: 0; z-index: 3;
    max-width: 1640px; margin: 0 auto; padding: 0 20px;
    display: flex; justify-content: space-between; gap: 16px;
    font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 1.5px;
    color: var(--zx-faint); text-transform: uppercase;
    font-variant-numeric: tabular-nums; font-feature-settings: "tnum";
}
.pda-home .zx-hud span b { color: var(--zx-ok); font-weight: 500; }
/* fixed-width clock so ticking seconds don't reflow the HUD / jitter "ЗАПИСЬ" */
.pda-home #zxClock { display: inline-block; text-align: right; font-variant-numeric: tabular-nums; }
.pda-home .zx-hud .zx-rec { color: var(--zx-danger); }
.pda-home .zx-hud .zx-rec::before {
    content: "●"; margin-right: 6px; animation: zx-blink 1.4s steps(1) infinite;
}
@keyframes zx-blink { 50% { opacity: .2; } }

.pda-home .zx-hero-eyebrow {
    font-family: var(--font-mono); font-size: 13px; letter-spacing: 5px;
    text-transform: uppercase; color: var(--zx-amber);
    margin-bottom: 22px; display: flex; align-items: center; gap: 12px;
}
.pda-home .zx-hero-eyebrow::before { content: ""; width: 40px; height: 1px; background: var(--zx-amber); }

.pda-home .zx-hero-title {
    font-family: var(--font-display); font-weight: 900;
    font-size: clamp(46px, 9vw, 150px); line-height: .84; letter-spacing: -3px;
    text-transform: uppercase; color: #f2f0e8; margin: 0;
    text-shadow: 0 0 60px rgba(0,0,0,.6);
}
.pda-home .zx-hero-title .zx-x {
    color: var(--zx-amber); text-shadow: 0 0 40px rgba(232,178,58,.55);
    position: relative;
}
.pda-home .zx-hero-sub {
    max-width: 540px; margin: 26px 0 0;
    font-size: 16px; line-height: 1.65; color: rgba(217,222,212,.8);
}
.pda-home .zx-hero-sub b { color: var(--zx-amber); font-weight: 600; }

/* actions column: geiger stretches to the exact width of the button row */
.pda-home .zx-hero-actions { display: flex; flex-direction: column; align-items: stretch; width: fit-content; margin-top: 34px; }
.pda-home .zx-hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.pda-home .zx-btn {
    font-family: var(--font-mono); font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
    padding: 16px 30px; text-decoration: none; cursor: pointer; border: none;
    position: relative; transition: all .22s; display: inline-flex; align-items: center; gap: 12px;
}
.pda-home .zx-btn-primary {
    background: var(--zx-amber); color: #10130f; font-weight: 600;
}
.pda-home .zx-btn-primary:hover { background: transparent; color: var(--zx-amber); box-shadow: inset 0 0 0 1.5px var(--zx-amber); }
.pda-home .zx-btn-ghost {
    background: rgba(10,13,12,.5); color: var(--zx-text);
    border: 1px solid var(--zx-line-2); backdrop-filter: blur(4px);
}
.pda-home .zx-btn-ghost:hover { border-color: var(--zx-amber); color: var(--zx-amber); }

/* Geiger meter widget */
.pda-home .zx-geiger {
    margin-top: 22px;
    border: 1px solid var(--zx-line-2); background: rgba(8,11,10,.55);
    backdrop-filter: blur(4px); padding: 14px 18px;
    font-family: var(--font-mono);
}
.pda-home .zx-geiger-top { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 2px; color: var(--zx-dim); text-transform: uppercase; }
.pda-home .zx-geiger-val { color: var(--zx-amber); }
.pda-home .zx-geiger-bar { height: 6px; margin: 10px 0 6px; background: rgba(255,255,255,.05); position: relative; overflow: hidden; }
.pda-home .zx-geiger-bar i { position: absolute; inset: 0 60% 0 0; background: linear-gradient(90deg, var(--zx-ok), var(--zx-amber), var(--zx-danger)); animation: zx-rad 3.5s ease-in-out infinite; }
@keyframes zx-rad { 0%,100% { right: 66%; } 45% { right: 38%; } 70% { right: 55%; } }
.pda-home .zx-geiger-note { font-size: 10.5px; letter-spacing: 1px; color: var(--zx-faint); }

.pda-home .zx-scrolldown {
    position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 3;
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 3px; color: var(--zx-faint);
    text-transform: uppercase; text-align: center;
}
.pda-home .zx-scrolldown i { display: block; margin-top: 8px; animation: zx-bob 1.8s ease-in-out infinite; }
@keyframes zx-bob { 50% { transform: translateY(6px); } }

/* ============================= FACTIONS ============================ */
.pda-home .zx-faction-head { text-align: center; margin-bottom: 46px; }
.pda-home .zx-faction-q {
    font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
    font-size: clamp(26px, 4vw, 46px); letter-spacing: -1px; margin: 10px 0 0; color: var(--zx-text);
}
.pda-home .zx-faction-q em { color: var(--zx-amber); font-style: normal; }
.pda-home .choice-faction {
    display: grid; grid-template-columns: repeat(9, 1fr); gap: 12px; margin: 0;
}
.pda-home .choice-faction-item {
    position: relative; cursor: pointer; padding: 22px 12px 18px;
    border: 1px solid var(--zx-line); background: var(--zx-panel); border-radius: 0;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    transition: all .22s; overflow: hidden;
}
.pda-home .choice-faction-item::before {
    content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 32%, rgba(232,178,58,.16), transparent 62%);
    opacity: 0; transition: opacity .25s;
}
/* top corner ticks — PDA frame instead of a cut corner */
.pda-home .choice-faction-item::after {
    content: ""; position: absolute; top: 7px; left: 7px; width: 10px; height: 10px;
    border-top: 1px solid var(--zx-line-2); border-left: 1px solid var(--zx-line-2);
    transition: border-color .25s;
}
.pda-home .choice-faction-item:hover { border-color: var(--zx-amber-dim); }
.pda-home .choice-faction-item:hover::before { opacity: 1; }
.pda-home .choice-faction-item:hover::after { border-color: var(--zx-amber); }
.pda-home .choice-faction-item .faction-emblem {
    width: 100% !important; height: 92px; object-fit: contain; /* beat global mobile width:Npx !important */
    filter: grayscale(.35) brightness(.92); transition: filter .25s, transform .25s;
}
.pda-home .choice-faction-item:hover .faction-emblem { filter: grayscale(0) brightness(1.08) drop-shadow(0 0 12px rgba(232,178,58,.4)); transform: scale(1.05); }
.pda-home .choice-faction-item .faction-name {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; text-align: center;
    color: var(--zx-dim); text-transform: uppercase; transition: color .25s;
}
.pda-home .choice-faction-item:hover .faction-name { color: var(--zx-amber); }

/* current faction badge (user already chose) — "жетон группировки" */
.pda-home .zx-yf-card {
    position: relative; display: flex; align-items: center; gap: 26px;
    max-width: 620px; margin: 0 auto; padding: 26px 34px; overflow: hidden;
    border: 1px solid var(--zx-line-2);
    background:
      linear-gradient(120deg, rgba(232,178,58,.06) 0%, transparent 42%),
      var(--zx-panel);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}
.pda-home .zx-yf-card::before { /* diagonal hazard hatching, subtle */
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background: repeating-linear-gradient(45deg, rgba(232,178,58,.05) 0 1px, transparent 1px 11px);
    mask-image: linear-gradient(90deg, transparent 55%, #000 100%);
}
.pda-home .zx-yf-card::after { /* left accent bar */
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--zx-amber);
    box-shadow: 0 0 16px rgba(232,178,58,.5);
}
.pda-home .zx-yf-emblem {
    position: relative; flex-shrink: 0; width: 92px; height: 92px;
    display: grid; place-items: center;
    border: 1px solid var(--zx-line-2); background: rgba(8,11,10,.55);
}
.pda-home .zx-yf-emblem::before, .pda-home .zx-yf-emblem::after {
    content: ""; position: absolute; width: 9px; height: 9px; border: 1px solid var(--zx-amber-dim);
}
.pda-home .zx-yf-emblem::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.pda-home .zx-yf-emblem::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.pda-home .zx-yf-emblem img { width: 70px; height: 70px; object-fit: contain; filter: drop-shadow(0 0 14px rgba(232,178,58,.28)); }
.pda-home .zx-yf-info { display: flex; flex-direction: column; gap: 7px; position: relative; z-index: 1; }
.pda-home .zx-yf-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2.5px; color: var(--zx-amber-dim); text-transform: uppercase; }
.pda-home .zx-yf-name {
    font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 3.4vw, 40px);
    line-height: .95; letter-spacing: -.5px; color: var(--zx-text); text-transform: uppercase;
}
.pda-home .zx-yf-meta { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .5px; color: var(--zx-dim); display: flex; align-items: center; gap: 8px; }
.pda-home .zx-yf-meta i { color: var(--zx-ok); }
.pda-home .zx-yf-watermark {
    position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
    font-family: var(--font-display); font-weight: 900; font-size: 130px; line-height: 1;
    color: rgba(232,178,58,.05); pointer-events: none; user-select: none;
}
@media (max-width: 560px) {
    .pda-home .zx-yf-card { flex-direction: column; text-align: center; align-items: center; gap: 18px; padding: 28px 22px; }
    .pda-home .zx-yf-info { align-items: center; }
    .pda-home .zx-yf-meta { justify-content: center; }
    .pda-home .zx-yf-watermark { display: none; }
}

/* ============================= GAMES ============================== */
.pda-home .zx-games { display: grid; grid-template-columns: 1.6fr 1fr 1fr; grid-auto-rows: 1fr; gap: 16px; }
.pda-home .zx-game {
    position: relative; overflow: hidden; text-decoration: none; min-height: 240px;
    border: 1px solid var(--zx-line); display: flex; flex-direction: column; justify-content: flex-end;
    isolation: isolate;
}
.pda-home .zx-game:first-child { grid-row: span 2; }
.pda-home .zx-game:last-child { grid-column: span 2; }
.pda-home .zx-game img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
    filter: saturate(.85) contrast(1.05); transition: transform .6s ease, filter .4s;
}
.pda-home .zx-game::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(8,11,10,.1) 0%, rgba(8,11,10,.55) 55%, rgba(8,11,10,.95) 100%);
    transition: background .3s;
}
.pda-home .zx-game:hover img { transform: scale(1.06); filter: saturate(1) contrast(1.08); }
.pda-home .zx-game-tag {
    position: absolute; top: 16px; left: 16px; font-family: var(--font-mono);
    font-size: 10px; letter-spacing: 2px; color: var(--zx-faint); text-transform: uppercase;
    border: 1px solid var(--zx-line-2); padding: 4px 8px; background: rgba(8,11,10,.5);
}
.pda-home .zx-game-body { padding: 22px; position: relative; }
.pda-home .zx-game-title {
    font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
    font-size: clamp(18px, 1.7vw, 26px); line-height: 1; color: #f2f0e8; margin: 0 0 14px; letter-spacing: -.5px;
}
.pda-home .zx-game-dl {
    font-family: var(--font-mono); font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
    color: var(--zx-amber); display: inline-flex; align-items: center; gap: 10px;
    opacity: .85; transition: gap .25s, opacity .25s;
}
.pda-home .zx-game:hover .zx-game-dl { gap: 16px; opacity: 1; }

/* ============================= CONSOLE (chat + sidebar) =========== */
.pda-home .zx-console { display: grid; grid-template-columns: 1.55fr 1fr; gap: 22px; align-items: start; }

.pda-home .zx-panel {
    border: 1px solid var(--zx-line); background: var(--zx-panel); position: relative;
}
.pda-home .zx-panel-bar {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px;
    border-bottom: 1px solid var(--zx-line); font-family: var(--font-mono);
    font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--zx-dim);
}
.pda-home .zx-panel-bar .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--zx-ok); box-shadow: 0 0 8px var(--zx-ok); }
.pda-home .zx-panel-bar b { color: var(--zx-amber); font-weight: 500; }
.pda-home .zx-panel-bar .zx-live { margin-left: auto; color: var(--zx-ok); }

/* chat */
.pda-home .chat-block { display: flex; flex-direction: column; height: 520px; }
.pda-home .chat-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.pda-home .chat-messages::-webkit-scrollbar { width: 6px; }
.pda-home .chat-messages::-webkit-scrollbar-thumb { background: var(--zx-line-2); }
.pda-home .chat-message { display: flex; gap: 12px; position: relative; background: none; border: none; border-radius: 0; padding: 0; }
.pda-home .chat-message:hover { border: none; }
.pda-home .chat-message-img { flex-shrink: 0; width: 40px; height: 40px; text-decoration: none; }
.pda-home .chat-message-img img, .pda-home .chat-avatar-initial {
    width: 40px; height: 40px; object-fit: cover; border: 1px solid var(--zx-line-2);
    display: grid; place-items: center; font-family: var(--font-display); color: var(--zx-amber); background: var(--zx-bg-2);
}
.pda-home .chat-message-name-user-date { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.pda-home .chat-message-name-user-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pda-home .chat-message-name-user { font-family: var(--font-mono); font-size: 13px; color: var(--zx-text); }
.pda-home .chat-message-date { font-family: var(--font-mono); font-size: 10.5px; color: var(--zx-faint); white-space: nowrap; }
.pda-home .chat-message-text { font-size: 14px; line-height: 1.5; color: rgba(217,222,212,.85); word-break: break-word; }
.pda-home .faction-icon { width: 16px; height: 16px; object-fit: contain; }
/* Крестик удаления: в style.css он абсолютно спозиционирован в правый верхний
   угол — туда же, где стоит дата, и перекрывал её на 22px. Ставим на одну линию
   с датой и резервируем под него место в самой дате: [дата][зазор][крестик]. */
.pda-home .chat-message { --zx-cross: 16px; --zx-cross-gap: 12px; }
.pda-home .chat-delete-btn {
    position: absolute; top: 0; right: 0;
    width: var(--zx-cross); height: 18px; padding: 0; border-radius: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; line-height: 1;
    background: none; border: none; color: var(--zx-faint); cursor: pointer; opacity: 0; transition: all .2s;
}
.pda-home .chat-message:hover .chat-delete-btn { opacity: 1; }
.pda-home .chat-delete-btn:hover { color: var(--zx-danger); }
/* Только когда крестик есть — гостю его не отдают, у него дата прижата к краю. */
.pda-home .chat-message:has(.chat-delete-btn) .chat-message-date {
    padding-right: calc(var(--zx-cross) + var(--zx-cross-gap));
}
.pda-home .chat-input-container { display: flex; gap: 0; border-top: 1px solid var(--zx-line); border-radius: 0; overflow: hidden; }
.pda-home #chat-input {
    flex: 1; background: rgba(8,11,10,.5); border: none; color: var(--zx-text);
    font-family: var(--font-mono); font-size: 13px; padding: 16px 18px; outline: none; border-radius: 0;
}
.pda-home #chat-input::placeholder { color: var(--zx-faint); }
.pda-home #chat-btn {
    background: #1c1a12; border: none; border-left: 1px solid var(--zx-line);
    color: var(--zx-amber); width: 56px; cursor: pointer; transition: background .2s;
    border-radius: 0; margin: 0; flex-shrink: 0;
}
.pda-home #chat-btn:hover:not(:disabled) { background: var(--zx-amber); color: #10130f; }

/* rank badge — flat terminal tag, no pill/border (kills inline bg+border via !important) */
.pda-home .rank-badge {
    display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono);
    font-size: 10px; letter-spacing: 1px; text-transform: uppercase; line-height: 1.3;
    padding: 0 !important; background: transparent !important; border: none !important;
}
.pda-home .rank-badge i { font-size: 9px; opacity: .9; }

/* sidebar */
.pda-home .zx-side { display: flex; flex-direction: column; gap: 22px; }
.pda-home .zx-side .zx-panel { padding: 0; }
.pda-home .zx-side-body { padding: 6px 8px; }

.pda-home .top-stalker-item, .pda-home .recent-artifact-item, .pda-home .new-user-card {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px; text-decoration: none;
    border-bottom: 1px solid var(--zx-line); transition: background .2s; position: relative;
}
.pda-home .top-stalker-item:last-child, .pda-home .recent-artifact-item:last-child { border-bottom: none; }
.pda-home .top-stalker-item:hover, .pda-home .recent-artifact-item:hover, .pda-home .new-user-card:hover { background: #161c19; box-shadow: inset 3px 0 0 var(--zx-amber); }
.pda-home .top-stalker-index-name { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
/* rank number — pure brutalist typography, no medal plate */
.pda-home .top-stalker-index {
    font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1;
    color: var(--zx-faint); width: 40px; height: auto; min-width: 40px; text-align: left;
    background: none !important; border: none !important; border-radius: 0 !important;
    display: block; flex-shrink: 0; font-variant-numeric: tabular-nums;
}
.pda-home .top-stalker-item:nth-child(1) .top-stalker-index { color: var(--zx-amber); text-shadow: 0 0 16px rgba(232,178,58,.45); background: none !important; border: none !important; }
.pda-home .top-stalker-item:nth-child(2) .top-stalker-index,
.pda-home .top-stalker-item:nth-child(3) .top-stalker-index { color: var(--zx-dim); background: none !important; border: none !important; }
.pda-home .top-stalker-name-wrap { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pda-home .top-stalker-name { font-family: var(--font-mono); font-size: 13px; color: var(--zx-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pda-home .top-stalker-points-faction { display: flex; align-items: center; gap: 10px; }
.pda-home .top-stalker-points { font-family: var(--font-mono); font-size: 14px; color: var(--zx-amber); }
.pda-home .top-stalker-points::after { content: " ●"; color: var(--zx-faint); font-size: 9px; }

.pda-home .recent-artifact-img-wrap { width: 40px; height: 40px; display: grid; place-items: center; flex-shrink: 0; }
.pda-home .recent-artifact-img { max-width: 38px; max-height: 38px; object-fit: contain; }
.pda-home .recent-artifact-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pda-home .recent-artifact-name { font-family: var(--font-mono); font-size: 12.5px; color: var(--zx-text); }
.pda-home .recent-artifact-user { font-size: 11px; color: var(--zx-dim); }
.pda-home .recent-artifact-time, .pda-home .new-user-time { font-family: var(--font-mono); font-size: 10px; color: var(--zx-faint); white-space: nowrap; }
.pda-home .new-user-avatar { width: 44px; height: 44px; flex-shrink: 0; }
.pda-home .new-user-avatar img, .pda-home .new-user-initial {
    width: 44px; height: 44px; object-fit: cover; border: 1px solid var(--zx-line-2);
    display: grid; place-items: center; font-family: var(--font-display); color: var(--zx-amber); background: var(--zx-bg-2);
}
.pda-home .new-user-info { flex: 1; }
.pda-home .new-user-name { font-family: var(--font-mono); font-size: 14px; color: var(--zx-text); }

/* quote */
.pda-home .zx-quote { padding: 26px 24px; border: 1px solid var(--zx-line); background: var(--zx-panel-2); position: relative; }
.pda-home .zx-quote::before { content: "//"; position: absolute; top: 14px; left: 18px; font-family: var(--font-mono); color: var(--zx-amber-dim); }
.pda-home .zx-quote-text { font-family: var(--font-body); font-style: italic; font-size: 15px; line-height: 1.6; color: rgba(217,222,212,.82); margin: 20px 0 12px; }
.pda-home .zx-quote-author { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; color: var(--zx-amber-dim); text-transform: uppercase; }

/* ============================= ARTIFACT FEATURE STRIP ============= */
.pda-home .zx-artifact {
    position: relative; overflow: hidden; border: 1px solid var(--zx-line-2);
    display: grid; grid-template-columns: 1.1fr 1fr; align-items: stretch; min-height: 340px;
}
.pda-home .zx-artifact-media { position: relative; }
.pda-home .zx-artifact-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pda-home .zx-artifact-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 40%, var(--zx-bg-2) 100%); }
.pda-home .zx-artifact-body { padding: 48px; display: flex; flex-direction: column; justify-content: center; background: var(--zx-bg-2); }
.pda-home .zx-artifact-body .zx-title { margin-bottom: 18px; }
.pda-home .zx-artifact-body p { font-size: 15px; line-height: 1.7; color: rgba(217,222,212,.78); max-width: 440px; }
.pda-home .zx-artifact-body p b { color: var(--zx-amber); font-weight: 600; }
.pda-home .zx-artifact-meta { display: flex; gap: 30px; margin-top: 28px; }
.pda-home .zx-artifact-meta div { font-family: var(--font-mono); }
.pda-home .zx-artifact-meta .n { font-size: 26px; color: var(--zx-amber); }
.pda-home .zx-artifact-meta .l { font-size: 10.5px; letter-spacing: 1.5px; color: var(--zx-dim); text-transform: uppercase; margin-top: 4px; }

/* ============================= NEWS ============================== */
.pda-home .content-preview-news { position: relative; }
.pda-home .preview-news-wrap { position: relative; overflow: hidden; }
/* gap:0 + spacing via transparent border-inline (counted in offsetWidth) so the
   global carousel JS — which steps by offsetWidth and ignores gap — lands exactly. */
.pda-home .preview-news-track { display: flex; gap: 0; transition: transform .4s ease; }
.pda-home .preview-news-item {
    flex: 0 0 33.3333%; box-sizing: border-box; position: relative; overflow: hidden; text-decoration: none;
    border-radius: 0; min-height: 240px; display: flex; flex-direction: column; justify-content: flex-end;
}
.pda-home .preview-news-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s; }
.pda-home .preview-news-item::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, rgba(8,11,10,.55) 60%, rgba(8,11,10,.96) 100%); }
.pda-home .preview-news-item:hover img { transform: scale(1.05); }
.pda-home .preview-news-text-wrap { padding: 20px; }
.pda-home .preview-news-text { font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.25; color: #f2f0e8; text-transform: uppercase; letter-spacing: -.3px; }
.pda-home .preview-news-date { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1.5px; color: var(--zx-amber-dim); margin-top: 12px; text-transform: uppercase; }
.pda-home .news-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
    width: 46px; height: 46px; background: rgba(8,11,10,.8); border: none;
    color: var(--zx-amber); cursor: pointer; transition: all .2s;
}
.pda-home .news-arrow:hover { background: var(--zx-amber); color: #10130f; }
.pda-home .news-arrow.left { left: 12px; } .pda-home .news-arrow.right { right: 12px; }
@keyframes zx-swipe-l { 0%, 100% { transform: translate(0, -50%); } 50% { transform: translate(-5px, -50%); } }
@keyframes zx-swipe-r { 0%, 100% { transform: translate(0, -50%); } 50% { transform: translate(5px, -50%); } }

/* ============================= FOOTER (scoped) =================== */
body.pda-home footer { margin-top: 0; border-top: 1px solid var(--zx-line); background: var(--zx-bg-2); }
body.pda-home .footer-inner {
    font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 1px; color: var(--zx-faint);
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
    max-width: 1640px; margin: 0 auto; padding: 20px;
}
body.pda-home .footer-domain { color: var(--zx-amber); }
body.pda-home .footer-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
body.pda-home .footer-privacy { color: var(--zx-faint) !important; transition: color .2s; }
body.pda-home .footer-privacy:hover { color: var(--zx-amber) !important; }
/* partners: highlighted chips, right side (bottom on mobile), no commas */
body.pda-home .footer-partners { display: flex; align-items: center; gap: 10px; }
body.pda-home .footer-partners-label { color: rgba(184, 194, 182, 0.55) !important; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: 11.5px !important; }
body.pda-home .footer-partner {
    color: var(--zx-amber) !important; border: 1px solid var(--zx-line-2);
    padding: 5px 11px 5px 8px; transition: all .2s;
    font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
}
body.pda-home .footer-partner img { display: block; }
body.pda-home .footer-partner:hover { border-color: var(--zx-amber); color: var(--zx-amber) !important; background: #14140c; }
@media (max-width: 700px) {
    body.pda-home .footer-inner { flex-direction: column; text-align: center; gap: 14px; }
    body.pda-home .footer-left { justify-content: center; }
    body.pda-home .footer-partners { flex-direction: column; align-items: center; gap: 8px; }
    body.pda-home .footer-partner { justify-content: center; min-width: 160px; }
}

/* ============================= MODALS =========================== */
.pda-home .modal-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(5,7,6,.86); backdrop-filter: blur(6px); align-items: center; justify-content: center; }
.pda-home .modal-content {
    position: relative; background: var(--zx-bg-2); border: 1px solid var(--zx-line-2);
    padding: 40px; max-width: 440px; width: 90%; text-align: center;
    border-radius: 0 !important; /* kill legacy 12px radius from style.css */
    clip-path: polygon(0 0, 100% 0, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}
.pda-home .modal-content h2 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 22px; color: var(--zx-amber); margin: 0 0 14px; }
.pda-home .modal-content p { font-size: 14px; line-height: 1.6; color: rgba(217,222,212,.8); margin: 0 0 10px; }
.pda-home .modal-buttons { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }
.pda-home .btn-modal {
    font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
    padding: 12px 24px; text-decoration: none; cursor: pointer; border: 1px solid var(--zx-line-2);
    background: #1a1810; color: var(--zx-amber); transition: all .2s; border-radius: 0 !important;
}
.pda-home .btn-modal:hover, .pda-home .btn-confirm { background: var(--zx-amber); color: #10130f; }
.pda-home .btn-cancel { background: transparent; color: var(--zx-dim); }
.pda-home .btn-cancel:hover { background: rgba(255,90,44,.1); color: var(--zx-danger); border-color: var(--zx-danger); }
.pda-home .btn-close-modal { position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--zx-dim); font-size: 18px; cursor: pointer; }
.pda-home .btn-close-modal:hover { color: var(--zx-danger); }

/* ============================= BOOT OVERLAY ===================== */
#zx-boot {
    position: fixed; inset: 0; z-index: 10000; background: var(--zx-bg);
    display: flex; align-items: center; justify-content: center; flex-direction: column;
    font-family: var(--font-mono); transition: opacity .5s ease;
}
#zx-boot.zx-done { opacity: 0; pointer-events: none; }
#zx-boot .zx-boot-box { width: min(480px, 82vw); }
#zx-boot .zx-boot-logo { font-family: var(--font-display); font-weight: 900; font-size: 30px; letter-spacing: 2px; color: var(--zx-amber); text-transform: uppercase; margin-bottom: 20px; }
#zx-boot .zx-boot-logo span { color: var(--zx-text); }
#zx-boot .zx-boot-line { font-size: 12px; color: var(--zx-ok); letter-spacing: 1px; margin: 4px 0; opacity: 0; }
#zx-boot .zx-boot-line.on { opacity: 1; }
#zx-boot .zx-boot-line b { color: var(--zx-dim); }
#zx-boot .zx-boot-bar { height: 3px; background: rgba(255,255,255,.06); margin-top: 20px; overflow: hidden; }
#zx-boot .zx-boot-bar i { display: block; height: 100%; width: 0; background: var(--zx-amber); animation: zx-boot-fill 1.15s ease forwards; }
@keyframes zx-boot-fill { to { width: 100%; } }

/* ============================= REVEAL ANIM ===================== */
.pda-home [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.pda-home [data-reveal].zx-in { opacity: 1; transform: none; }

/* ============================= RESPONSIVE ====================== */
@media (max-width: 1100px) {
    .pda-home .zx-console { grid-template-columns: 1fr; }
    .pda-home .zx-games { grid-template-columns: 1fr 1fr; }
    .pda-home .zx-game:first-child { grid-row: auto; grid-column: 1 / -1; }
    .pda-home .zx-artifact { grid-template-columns: 1fr; }
    .pda-home .zx-artifact-media { min-height: 220px; position: relative; }
    .pda-home .choice-faction { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
    body.pda-home .header-main { padding: 12px 16px; gap: 12px; }
    body.pda-home .header-auth { gap: 10px; }
    body.pda-home .header-auth-btn { padding: 9px 15px; font-size: 11px; letter-spacing: 1px; }
    body.pda-home .header-auth-btn::before { font-size: 13px; }
    body.pda-home .burger-toggle { flex-shrink: 0; }
    .pda-home .zx-wrap, .pda-home .zx-hero-inner, .pda-home .zx-hud { padding-left: 20px; padding-right: 20px; }
    .pda-home .zx-section { padding-block: 38px; }
    .pda-home .zx-hud { top: 74px; font-size: 9.5px; letter-spacing: 1px; }
    /* one news card per screen, full width, no side gutter */
    .pda-home .preview-news-track { gap: 0; }
    .pda-home .preview-news-item { flex: 0 0 100%; border-left: 0; border-right: 0; }
    .pda-home #chat-input { font-size: 12px; padding: 14px 14px; }
    /* mobile: arrows become subtle grey swipe hints — no plate, gently bobbing outward,
       pointer-events off so swipe works across the whole card */
    .pda-home .news-arrow {
        display: flex; align-items: center; justify-content: center;
        width: 40px; height: 44px; background: none; border: none;
        color: rgba(255,255,255,.5); z-index: 6; pointer-events: auto; cursor: pointer; top: 50%;
    }
    .pda-home .news-arrow i { font-size: 19px; filter: drop-shadow(0 1px 4px rgba(0,0,0,.9)); }
    .pda-home .news-arrow.left  { left: 2px;  animation: zx-swipe-l 1.7s ease-in-out infinite; }
    .pda-home .news-arrow.right { right: 2px; animation: zx-swipe-r 1.7s ease-in-out infinite; }
    .pda-home .news-arrow:hover { background: none; color: rgba(255,255,255,.5); }
}
@media (max-width: 560px) {
    .pda-home .zx-games { grid-template-columns: 1fr; }
    .pda-home .zx-game, .pda-home .zx-game:first-child, .pda-home .zx-game:last-child { grid-column: auto; grid-row: auto; min-height: 190px; }
    .pda-home .zx-game-title { font-size: 21px; }
    .pda-home .choice-faction { grid-template-columns: repeat(2, 1fr); }
    .pda-home .preview-news-item { flex-basis: 100%; }
    .pda-home .zx-hero-title { letter-spacing: -1px; }
    .pda-home .zx-artifact-body { padding: 28px; }
    .pda-home .zx-artifact-meta { gap: 20px; }
    /* buttons stack → geiger spans full width */
    .pda-home .zx-hero-actions { width: 100%; }
    .pda-home .zx-hero-cta { flex-direction: column; }
    .pda-home .zx-hero-cta .zx-btn { width: 100%; justify-content: center; }
}

/* hero content flows below the HUD at every size — handled in the base .zx-hero /
   .zx-hero-inner rules above, so no per-breakpoint override is needed here. */

/* ---- Mobile off-canvas nav (scoped, matches global ≤1024 burger) ---- */
@media (max-width: 1024px) {
    body.pda-home nav {
        position: fixed; top: 0; right: -320px; width: 300px; height: 100vh;
        background: rgba(9, 12, 11, 0.98); backdrop-filter: blur(16px);
        border-left: 1px solid var(--zx-line-2); z-index: 999999998;
        transition: right .3s ease; padding: 80px 0 30px; overflow-y: auto; display: block;
    }
    body.pda-home nav.open { right: 0; }
    body.pda-home nav ul { flex-direction: column; gap: 0; }
    body.pda-home nav ul li { width: 100%; }
    body.pda-home nav ul li a { display: block; padding: 16px 30px; font-size: 14px; border-bottom: 1px solid var(--zx-line); }
    body.pda-home nav ul li a::before, body.pda-home nav ul li a::after { display: none; }
    body.pda-home .burger-toggle { display: block; order: 3; }
    body.pda-home .burger-toggle span { background: var(--zx-amber); }
    body.pda-home .burger-close { color: var(--zx-dim); border: none !important; background: none; border-radius: 0; }
    body.pda-home .header-auth { order: 2; min-width: 0; }
    body.pda-home .header-auth-link { display: none; }
    body.pda-home .header-user { min-width: 0; }
    body.pda-home .burger-toggle { flex-shrink: 0; }
}
/* very narrow: drop name+rank in header (avatar still links to profile) so a long
   nickname can never push the burger / logout off-screen */
@media (max-width: 560px) {
    body.pda-home .header-user-info { display: none; }
}

/* =====================================================================
   UNIFIED BLOCK SKIN — placed last so it wins the cascade over the base
   block definitions above. Reference: "Охота на артефакты" block.
   Bright visible border (--zx-line-2) + deep opaque background (--zx-bg-2).
   ===================================================================== */
.pda-home .zx-panel,
.pda-home .choice-faction-item,
.pda-home .zx-quote,
.pda-home .zx-game,
.pda-home .content-preview-news,
.pda-home .zx-yf-card { border-color: var(--zx-line-2); }

/* faction grid needs no wrapper frame — cards stand on their own */
.pda-home .choice-faction { border: none; background: none; padding: 0; }

.pda-home .zx-panel,
.pda-home .choice-faction-item,
.pda-home .zx-quote,
.pda-home .content-preview-news { background: var(--zx-bg-2); }

/* news cards: image tiles, no visible border; transparent border-inline = gutter.
   isolate so the z-index:-2 image stays inside the card, above the opaque parent bg.
   opaque bg + backface-visibility kill the subpixel hairline glitch on hover-scale. */
.pda-home .preview-news-item {
    border: none; border-left: 8px solid transparent; border-right: 8px solid transparent;
    isolation: isolate; background: var(--zx-bg-2);
}
/* hover: brighten instead of scale — scaling a bg-image inside overflow:hidden
   flickers a hairline at the bottom edge each frame. filter has no geometry, no flicker. */
.pda-home .preview-news-item img { transition: filter .35s ease !important; transform: none !important; }
.pda-home .preview-news-item:hover img { transform: none !important; filter: brightness(1.12) contrast(1.03); }

.pda-home .zx-yf-card {
    background: linear-gradient(120deg, rgba(232,178,58,.06) 0%, transparent 42%), var(--zx-bg-2);
}

/* =====================================================================
   LONG-NAME SAFETY — usernames are user-controlled; never let them break
   layout. Names ellipsis-truncate; adjacent meta (points/time) never shrink.
   ===================================================================== */
.pda-home .top-stalker-points-faction,
.pda-home .recent-artifact-time,
.pda-home .new-user-time,
.pda-home .chat-message-date { flex-shrink: 0; }

/* break the min-width:auto chain on every grid/flex container down to the name */
.pda-home .zx-console > *,
.pda-home .zx-side,
.pda-home .zx-side > .zx-panel,
.pda-home .zx-side-body,
.pda-home .chat-block,
.pda-home .chat-messages,
.pda-home .chat-message,
.pda-home .chat-message-right,
.pda-home .chat-message-name-user-date,
.pda-home .chat-message-name-user-wrap,
.pda-home .top-stalker-item,
.pda-home .top-stalker-index-name,
.pda-home .top-stalker-name-wrap,
.pda-home .recent-artifact-item,
.pda-home .recent-artifact-info,
.pda-home .new-user-card,
.pda-home .new-user-info { min-width: 0; }
.pda-home .chat-message-right { flex: 1; }

.pda-home .chat-message-name-user,
.pda-home .recent-artifact-name,
.pda-home .recent-artifact-user,
.pda-home .new-user-name,
.pda-home .header-username {
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.pda-home .header-username { max-width: 150px; }
/* chat message body: break long unbroken strings instead of overflowing */
.pda-home .chat-message-text { overflow-wrap: anywhere; word-break: break-word; }
