:root {
 --bg-dark: #020408;
 --panel-bg: rgba(8, 12, 20, 0.94);
 --card-bg: rgba(15, 23, 38, 0.85);
 --border-glow: rgba(0, 242, 254, 0.35);
 --accent-cyan: #00f2fe;
 --accent-pink: #ff6c00;
 --accent-pink-bright: #ff6c00;
 --text-main: #f8fafc;
 --text-muted: #64748b;

 /* Размеры интерфейса (крупный вариант — для компьютера) */
 --m: 18px; --bh: 46px; --r: 14px;
 --fs: 13px; --fs-s: 10px; --fs-l: 11px; --ic: 20px;
 --gw: 372px; --lw-l: 212px; --lw-r: 130px; --bw: 212px;
 --cta-h: 56px; --cta-fs: 14px; --cta-px: 34px;
 --panel-w: 100%; --panel-maxh: calc(100vh - 230px);
 --counter-fs: 30px;
 /* Отступы с учётом «чёлки» и вырезов телефонов */
 --ml: max(var(--m), env(safe-area-inset-left, 0px));
 --mr: max(var(--m), env(safe-area-inset-right, 0px));
 --mt: max(var(--m), env(safe-area-inset-top, 0px));
 --mb: max(var(--m), env(safe-area-inset-bottom, 0px));
}

* {
 box-sizing: border-box;
 margin: 0;
 padding: 0;
 user-select: none;
 -webkit-user-select: none;
 font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
}

[hidden] { display: none !important; }

input[type="text"], input[type="number"], input[type="search"] {
 user-select: text;
 -webkit-user-select: text;
}

body {
 background-color: var(--bg-dark);
 color: var(--text-main);
 position: fixed;
 left: 0; top: 0;
 width: 100%;
 height: 100vh;
 height: 100dvh;
 overflow: hidden;
 touch-action: none;
}

[dir="rtl"] { direction: rtl; unicode-bidi: plaintext; }
[dir="rtl"] .modal-card,
[dir="rtl"] .offer-container,
[dir="rtl"] .legal-notice,
[dir="rtl"] p, [dir="rtl"] span, [dir="rtl"] div { unicode-bidi: plaintext; }

/* =========================================================================
   ХОЛСТ ВО ВЕСЬ ЭКРАН
   Вокруг самого холста (когда он уменьшен) виден космос с глобусом.
   Внутри холста фон остаётся тёмным, чтобы пиксели хорошо читались.
   ========================================================================= */
.viewport {
 position: fixed;
 left: 0; top: 0;
 width: 100%;
 height: 100vh;
 height: 100dvh;
 cursor: grab;
 overflow: hidden;
 touch-action: none;
 background: linear-gradient(rgba(2, 4, 8, 0.22), rgba(2, 4, 8, 0.22)), url('bg-globe.jpg') center / cover no-repeat, #020408;
}
.viewport:active { cursor: grabbing; }
canvas { display: block; width: 100%; height: 100%; }

/* Пульсирующая неоновая рамка вокруг выбранного пикселя */
#pixel-marker {
 position: fixed;
 left: 0; top: 0;
 width: 12px; height: 12px;
 transform: translate(-50%, -50%);
 pointer-events: none;
 z-index: 15;
 display: none;
}
#pixel-marker::after {
 content: "";
 position: absolute;
 inset: -5px;
 border: 2px solid #19f0ff;
 border-radius: 3px;
 animation: markerPulse 1.6s ease-in-out infinite;
}
@keyframes markerPulse {
 0%, 100% { box-shadow: 0 0 6px 1px rgba(0,242,254,.8), 0 0 14px 3px rgba(0,242,254,.4), inset 0 0 6px rgba(0,242,254,.6); }
 50% { box-shadow: 0 0 14px 4px rgba(0,242,254,1), 0 0 34px 10px rgba(0,242,254,.55), inset 0 0 12px rgba(0,242,254,.9); }
}

/* =========================================================================
   ИНТЕРФЕЙС (HUD): стеклянные кнопки с неоновой кромкой
   ========================================================================= */
.hud {
 position: fixed;
 left: 0; top: 0;
 width: 100%;
 height: 100vh;
 height: 100dvh;
 z-index: 20;
 pointer-events: none;
}

.ic { width: var(--ic); height: var(--ic); flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(0,242,254,.9)); }

.gbtn, .gpanel {
 background: linear-gradient(135deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,.10) 42%, rgba(0,242,254,.16) 100%);
 backdrop-filter: blur(16px) saturate(170%) brightness(1.4);
 -webkit-backdrop-filter: blur(16px) saturate(170%) brightness(1.4);
 border: 1px solid rgba(110,250,255,.85);
 box-shadow: 0 0 10px rgba(0,242,254,.55), 0 0 26px rgba(0,242,254,.2), inset 0 0 16px rgba(255,255,255,.12), inset 0 1px 0 rgba(255,255,255,.55);
 color: #effeff;
 border-radius: var(--r);
}

.gbtn {
 pointer-events: auto;
 display: inline-flex;
 align-items: center;
 justify-content: flex-start;
 gap: 8px;
 height: var(--bh);
 padding: 0 14px;
 font: 700 var(--fs)/1 'Montserrat', sans-serif;
 white-space: nowrap;
 text-decoration: none;
 cursor: pointer;
 position: relative;
 transition: box-shadow .2s, border-color .2s, transform .1s;
 -webkit-tap-highlight-color: transparent;
}
.gbtn:hover, .gbtn[aria-expanded="true"] {
 border-color: #c4feff;
 box-shadow: 0 0 16px rgba(0,242,254,.95), 0 0 40px rgba(0,242,254,.45), inset 0 0 18px rgba(0,242,254,.3), inset 0 1px 0 rgba(255,255,255,.6);
}
.gbtn:active { transform: scale(.97); }
.gbtn:focus-visible { outline: 2px solid #c4feff; outline-offset: 2px; }
.gbtn > span { overflow: hidden; text-overflow: ellipsis; }

.hud-group {
 position: absolute;
 top: var(--mt);
 width: var(--gw);
 display: flex;
 flex-direction: column;
 gap: 10px;
 pointer-events: none;
}
.hud-left { left: var(--ml); }
.hud-right { right: var(--mr); }
.hud-row { display: flex; gap: 10px; position: relative; z-index: 6; }

.gbtn-logo { flex: 0 0 var(--lw-l); padding-left: 6px; }
.gbtn-logo img { width: calc(var(--bh) - 12px); height: calc(var(--bh) - 12px); border-radius: 9px; object-fit: cover; flex: none; }
.brand-name { font: 900 14px 'Orbitron', sans-serif; letter-spacing: 1px; text-shadow: 0 0 10px rgba(0,242,254,.9); }
#btn-open-about, #btn-open-countries { flex: 1; min-width: 0; }
#custom-lang-box { flex: 0 0 var(--lw-r); }
.gbtn-fill { width: 100%; }
.gbtn-chev { margin-left: auto; transition: transform .2s; }
.gbtn[aria-expanded="true"] .gbtn-chev { transform: rotate(180deg); }
#custom-lang-box .gbtn-chev { transform: none; }

#country-count-val { font: 900 var(--fs) 'Orbitron', sans-serif; color: #7ffbff; }

#color-swatch {
 width: 18px; height: 18px;
 border-radius: 5px;
 border: 2px solid #fff;
 margin-left: auto;
 flex: none;
 box-shadow: 0 0 8px rgba(255,255,255,.35);
}
#color-swatch + .gbtn-chev { margin-left: 0; }

/* Крупный счётчик сверху по центру */
.hud-counter {
 position: absolute;
 left: 50%;
 top: var(--mt);
 transform: translateX(-50%);
 height: var(--bh);
 padding: 0 22px;
 display: flex;
 align-items: center;
 gap: 10px;
 background: rgba(2, 8, 12, 0.42);
 backdrop-filter: blur(10px);
 -webkit-backdrop-filter: blur(10px);
 border-radius: var(--r);
 pointer-events: none;
 white-space: nowrap;
 z-index: 2;
}
.hud-counter span { font: 700 calc(var(--fs) - 1px) 'Montserrat', sans-serif; letter-spacing: 1px; opacity: .85; text-transform: uppercase; }
.hud-counter b { font: 900 var(--counter-fs) 'Orbitron', sans-serif; color: #7ffbff; text-shadow: 0 0 12px rgba(0,242,254,.95); }

/* Выпадающие панели («Руководство», «Цвет») */
.gpanel {
 position: absolute;
 top: calc(100% + 8px);
 left: 0;
 width: var(--panel-w);
 padding: 14px;
 display: flex;
 flex-direction: column;
 gap: 12px;
 max-height: var(--panel-maxh);
 overflow-y: auto;
 touch-action: pan-y;
 background: linear-gradient(135deg, rgba(255,255,255,.20), rgba(0,242,254,.10)), rgba(6, 12, 20, 0.55);
 opacity: 0;
 visibility: hidden;
 transform: translateY(-10px);
 pointer-events: none;
 transition: opacity .22s, transform .22s, visibility .22s;
 z-index: 5;
}
.hud-right .gpanel { left: auto; right: 0; }
.gpanel.is-open { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }

#txt-guide-list { list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 10px; font-size: var(--fs-l); line-height: 1.4; }
#txt-guide-list li { counter-increment: step; position: relative; padding-inline-start: 22px; }
#txt-guide-list li::before { content: counter(step); position: absolute; inset-inline-start: 0; top: 0; font: 900 var(--fs-l) 'Orbitron', sans-serif; color: #7ffbff; text-shadow: 0 0 8px rgba(0,242,254,.9); }

.slider-group { display: flex; align-items: center; gap: 8px; }
.slider-group label { font: 900 12px 'Orbitron', sans-serif; width: 12px; }
.slider-group input[type="range"] { flex: 1; min-width: 0; height: 4px; margin: 0; accent-color: #19f0ff; outline: none; }
.slider-group input[type="number"] {
 width: 46px; padding: 3px 2px; text-align: center;
 background: rgba(255,255,255,.1);
 border: 1px solid rgba(110,250,255,.55);
 border-radius: 6px; color: #effeff;
 font: 700 11px 'Orbitron', sans-serif;
 -moz-appearance: textfield; appearance: textfield;
}
.slider-group input[type="number"]::-webkit-inner-spin-button,
.slider-group input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.user-country-badge {
 display: flex; align-items: center; gap: 8px;
 padding: 6px 8px;
 border: 1px solid rgba(110,250,255,.4);
 border-radius: 10px;
 font-size: var(--fs); font-weight: 700;
 cursor: pointer;
 white-space: nowrap;
}
.user-country-badge:hover { border-color: #c4feff; }
.badge-flag-img { width: 24px; height: 16px; object-fit: cover; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.4); }
#user-country-display > span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.legal-notice { font-size: var(--fs-l); color: #e2e8f0; line-height: 1.35; display: flex; gap: 8px; align-items: flex-start; word-break: break-word; border-radius: 8px; transition: box-shadow .3s; }
.legal-notice input[type="checkbox"] { width: 16px; height: 16px; min-width: 16px; margin-top: 1px; accent-color: #19f0ff; cursor: pointer; }
.legal-notice.flash { animation: consentFlash 1.2s ease-out; }
@keyframes consentFlash {
 0%, 60% { box-shadow: 0 0 0 2px #7ffbff, 0 0 18px 4px rgba(0,242,254,.9); background: rgba(0,242,254,.15); }
 100% { box-shadow: 0 0 0 0 transparent; background: transparent; }
}
.legal-text { display: inline; text-align: left; }
.legal-link { color: #7ffbff; text-decoration: underline; cursor: pointer; }

/* Нижний ряд */
.gbtn-ico { flex: 0 0 130px; }
.hud-bottom {
 position: absolute;
 left: var(--ml); right: var(--mr);
 bottom: var(--mb);
 display: flex;
 align-items: flex-end;
 gap: 10px;
 pointer-events: none;
}
.hud-bl, .hud-br { flex: 1 1 0; display: flex; gap: 10px; min-width: 0; }
.hud-br { justify-content: flex-end; }

.gbtn-coords { flex: 0 0 var(--bw); flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; text-align: left; }
.gbtn-coords small { font: 700 var(--fs-s) 'Montserrat', sans-serif; opacity: .75; letter-spacing: 1px; }
.gbtn-coords b { font: 700 var(--fs) 'Orbitron', sans-serif; }
#btn-auto-find { flex: 0 0 var(--bw); }

.gbtn-cta {
 flex: none;
 justify-content: center;
 height: var(--cta-h);
 padding: 0 var(--cta-px);
 font-size: var(--cta-fs);
 letter-spacing: 1px;
 text-transform: uppercase;
 border-color: #c4feff;
 box-shadow: 0 0 18px rgba(0,242,254,.8), 0 0 44px rgba(0,242,254,.35), inset 0 0 20px rgba(0,242,254,.25), inset 0 1px 0 rgba(255,255,255,.6);
}
.gbtn-cta.is-locked { border-color: rgba(110,250,255,.55); box-shadow: 0 0 10px rgba(0,242,254,.4), inset 0 0 16px rgba(255,255,255,.1); opacity: .8; }

/* Выбор языка */
.lang-options {
 position: absolute;
 top: calc(100% + 8px);
 right: 0;
 min-width: 100%;
 list-style: none;
 display: none;
 flex-direction: column;
 background: rgba(8, 14, 22, 0.94);
 backdrop-filter: blur(14px);
 -webkit-backdrop-filter: blur(14px);
 border: 1px solid rgba(110,250,255,.6);
 border-radius: var(--r);
 padding: 6px;
 box-shadow: 0 0 18px rgba(0,242,254,.35);
 z-index: 30;
}
.lang-options.show { display: flex; }
.lang-options li { padding: 8px 12px; border-radius: 8px; font-weight: 700; font-size: var(--fs); cursor: pointer; text-align: left; }
.lang-options li:hover { background: rgba(0,242,254,.18); color: #7ffbff; }

/* Экран «Поверните телефон» (только телефоны в вертикальном положении) */
#rotate-overlay {
 display: none;
 position: fixed;
 left: 0; top: 0; width: 100%; height: 100%;
 z-index: 200;
 align-items: center;
 justify-content: center;
 background: linear-gradient(rgba(2,4,8,.3), rgba(2,4,8,.3)), url('bg-globe.jpg') center / cover no-repeat, #020408;
 padding: 20px;
}
.rotate-card {
 max-width: 300px;
 padding: 28px 26px;
 display: flex; flex-direction: column; align-items: center; gap: 14px;
 text-align: center;
 border-radius: 20px;
 background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(0,242,254,.12)), rgba(6, 12, 20, 0.5);
 backdrop-filter: blur(16px);
 -webkit-backdrop-filter: blur(16px);
 border: 1px solid rgba(110,250,255,.85);
 box-shadow: 0 0 18px rgba(0,242,254,.6), 0 0 44px rgba(0,242,254,.25), inset 0 1px 0 rgba(255,255,255,.5);
}
.rotate-card img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; }
.rotate-card svg { width: 64px; height: 64px; fill: none; stroke: #7ffbff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(0,242,254,.9)); animation: rotPhone 2.6s ease-in-out infinite; }
@keyframes rotPhone { 0%, 20% { transform: rotate(0deg); } 60%, 100% { transform: rotate(-90deg); } }
.rotate-card h2 { font: 900 20px 'Orbitron', sans-serif; color: #7ffbff; text-shadow: 0 0 12px rgba(0,242,254,.9); }
.rotate-card p { font-size: 13px; line-height: 1.4; opacity: .9; }
@media (orientation: portrait) and (pointer: coarse) and (max-width: 600px) {
 html:not(.portrait-ok) #rotate-overlay { display: flex; }
}

/* =========================================================================
   КОМПАКТНЫЙ РЕЖИМ: телефоны в горизонтальном положении и узкие окна
   ========================================================================= */
@media (max-height: 520px), (max-width: 860px) {
 :root {
  --m: 10px; --bh: 38px; --r: 12px;
  --fs: 11px; --fs-s: 9px; --fs-l: 9px; --ic: 17px;
  --gw: 176px; --lw-l: 38px; --lw-r: 50px; --bw: 152px;
  --cta-h: 44px; --cta-fs: 12px; --cta-px: 22px;
  --panel-w: 280px; --panel-maxh: calc(100vh - 158px);
  --counter-fs: 22px;
 }
 .gbtn { padding: 0 10px; }
 .gbtn-logo { padding: 0; justify-content: center; }
 .brand-name { display: none; }
 .gpanel { padding: 8px 10px; gap: 5px; }
 #btn-open-countries { padding: 0 8px; gap: 6px; }
 .slider-group input[type="number"] { height: 22px; }
 .user-country-badge { padding: 4px 8px; }
 .legal-notice { font-size: 8.5px; line-height: 1.25; }
 #txt-guide-list { gap: 7px; }
 .slider-group input[type="number"] { width: 38px; font-size: 10px; }
 .gbtn-ico { flex: none; width: var(--bh); padding: 0; justify-content: center; }
 .gbtn-ico .lbl { display: none; }
 #custom-lang-box .ic:first-child { display: none; }
 #custom-lang-box { padding: 0 8px; }
}
@media (max-width: 760px) {
 :root { --counter-fs: 16px; }
 .hud-counter { padding: 0 12px; gap: 6px; }
}

/* ===== Кнопка в стиле поиска/служебные (из прежней версии) ===== */
.btn-lock {  
 background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));  
 color: #fff;  
 border: none;  
 padding: 14px;  
 border-radius: 10px;  
 font-weight: 900;  
 font-size: 13px;  
 letter-spacing: 0.8px;  
 text-transform: uppercase;  
 cursor: pointer;  
 box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);  
 margin-top: auto;  
 flex-shrink: 0;  
 width: 100%;  
 text-align: center;  
}  
  
.btn-lock:disabled { background: #1e293b; color: #64748b; cursor: not-allowed; box-shadow: none; }  

/* ===== Модальные окна (без изменений) ===== */
.modal-backdrop {  
 position: fixed;  
 top: 0; left: 0; width: 100vw; height: 100vh;  
 background: rgba(2, 3, 5, 0.85);  
 backdrop-filter: blur(15px);  
 display: none;  
 justify-content: center;  
 align-items: center;  
 z-index: 100;  
}  
  
.modal-card {  
 width: 90%;   
 max-width: 580px;  
 max-height: 85vh;  
 overflow-y: auto;  
 background: #0c1017;  
 border: 1px solid var(--accent-cyan);  
 border-radius: 20px;  
 padding: 24px;  
 text-align: center;  
 box-shadow: 0 0 40px rgba(0, 242, 254, 0.25);  
 position: relative;  
}

.modal-close {  
 position: absolute;  
 top: 14px; right: 18px;  
 color: var(--text-muted);  
 font-size: 22px;  
 cursor: pointer;  
 font-weight: bold;  
}  
  
.modal-author-avatar {  
 width: 70px;  
 height: 70px;  
 border-radius: 50%;  
 border: 2px solid var(--accent-cyan);  
 box-shadow: 0 0 18px var(--accent-cyan);  
 background-image: url('author.jpg');  
 background-size: cover;  
 background-position: center 15%;  
 margin: 0 auto 10px auto;  
}  
  
.country-list-box {  
 display: flex;  
 flex-direction: column;  
 gap: 6px;  
 max-height: 300px;  
 overflow-y: auto;  
 margin-top: 12px;  
 padding-right: 4px;  
}  
  
.country-row {  
 display: flex;  
 justify-content: space-between;  
 align-items: center;  
 background: rgba(15, 23, 42, 0.8);  
 border: 1px solid var(--border-glow);  
 padding: 8px 12px;  
 border-radius: 10px;  
}  
  
.country-row-left { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 12px; }  
.country-flag-img { width: 22px; height: 16px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 4px rgba(0,0,0,0.5); }  
.country-row-val { font-family: 'Orbitron', monospace; font-weight: 800; color: var(--accent-pink); font-size: 12px; }  
  
.country-select-item {  
 display: flex;  
 align-items: center;  
 gap: 12px;  
 background: rgba(15, 23, 42, 0.8);  
 border: 1px solid var(--border-glow);  
 padding: 10px 14px;  
 border-radius: 10px;  
 cursor: pointer;  
 transition: all 0.2s ease;  
 text-align: left;  
 font-weight: 700;  
 font-size: 13px;  
}  
  
.country-select-item:hover {  
 border-color: var(--accent-cyan);  
 background: rgba(0, 242, 254, 0.15);  
}  
  
.country-select-item.active {  
 border-color: var(--accent-pink);  
 background: rgba(224, 86, 253, 0.15);  
}  
  
.share-btn-tg {  
 background: #229ED9;  
 color: #fff;  
 border: none;  
 padding: 12px 18px;  
 border-radius: 12px;  
 font-weight: 800;  
 font-size: 12px;  
 width: 100%;  
 cursor: pointer;  
 display: flex;  
 align-items: center;  
 justify-content: center;  
 gap: 8px;  
 margin-top: 12px;  
 text-decoration: none;  
}  
  
.share-btn-copy {  
 background: rgba(0, 242, 254, 0.1);  
 border: 1px solid var(--accent-cyan);  
 color: var(--accent-cyan);  
 padding: 10px 18px;  
 border-radius: 12px;  
 font-weight: 800;  
 font-size: 11px;  
 width: 100%;  
 cursor: pointer;  
 margin-top: 8px;  
}  
  
.auth-widget-container {  
 display: flex;  
 justify-content: center;  
 align-items: center;  
 margin-top: 16px;  
 min-height: 50px;  
}  
  
.modal-card.offer-modal-card {  
 max-width: 900px;  
 width: 92%;  
 text-align: left;  
 padding: 24px;  
}  
  
.offer-modal-header {  
 color: var(--accent-cyan);  
 margin-bottom: 14px;  
 text-align: center;  
 font-size: 18px;  
 font-weight: 800;  
}  
  
.offer-container {  
 display: flex;  
 flex-direction: column;  
 height: 380px;  
 max-height: 55vh;  
 overflow-y: auto;  
 border: 1px solid rgba(0, 242, 254, 0.2);  
 border-radius: 12px;  
 padding: 16px;  
 background: rgba(3, 5, 8, 0.5);  
 gap: 16px;  
}  
  
.offer-row {  
 display: flex;  
 gap: 20px;  
 width: 100%;  
}  
  
.offer-cell {  
 flex: 1;  
 font-size: 12px;  
 color: #cbd5e1;  
 line-height: 1.6;  
 word-break: normal;  
 overflow-wrap: break-word;  
}  
  
.offer-cell.ru {  
 border-right: 1px solid rgba(0, 242, 254, 0.15);  
 padding-right: 16px;  
}  
  
.offer-cell.en {  
 padding-left: 4px;  
}  
  
.offer-column-title {  
 color: var(--accent-cyan);  
 font-size: 13px;  
 font-weight: 800;  
 margin-bottom: 6px;  
 text-transform: uppercase;  
 letter-spacing: 0.5px;  
 border-bottom: 1px solid rgba(0, 242, 254, 0.2);  
 padding-bottom: 4px;  
}  
  
.offer-close-btn {  
 margin-top: 14px;  
 width: 100%;  
 padding: 12px;  
 background: var(--accent-cyan);  
 color: #000;  
 border: none;  
 font-weight: bold;  
 border-radius: 10px;  
 cursor: pointer;  
 font-size: 12px;  
 transition: all 0.2s ease;  
}  
  
.offer-close-btn:hover {  
 box-shadow: 0 0 15px var(--accent-cyan);  
}  
  

@media (max-width: 900px) {
 .modal-card.offer-modal-card { width: 98%; padding: 16px 12px; }
 .offer-container { padding: 12px; gap: 12px; }
 .offer-row { gap: 10px; }
 .offer-cell.ru { flex: 55; padding-right: 8px; }
 .offer-cell.en { flex: 45; padding-left: 8px; }
}

/* ===== Подсказка над пикселем (без изменений) ===== */
.pixel-tooltip {  
 position: absolute;  
 pointer-events: none;   
 background: rgba(8, 12, 20, 0.95);  
 border: 1px solid var(--accent-cyan);  
 box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);  
 border-radius: 8px;  
 padding: 8px 12px;  
 z-index: 9999;  
 backdrop-filter: blur(8px);  
}  
  
.tooltip-content {  
 display: flex;  
 flex-direction: row;  
 align-items: center;  
 gap: 10px;  
}  
  
.tooltip-flag-img {  
 width: 20px;  
 height: 14px;  
 object-fit: cover;  
 border-radius: 2px;  
 box-shadow: 0 0 4px rgba(0,0,0,0.5);  
 vertical-align: middle;  
}  
  
#tooltip-flag {  
 display: flex;  
 align-items: center;  
 justify-content: center;  
}  
  
#tooltip-name {  
 color: #ffffff;  
 font-size: 12px;  
 font-weight: 700;  
 white-space: nowrap;  
}  
  
#tooltip-coords {  
 color: var(--accent-pink);  
 font-family: 'Orbitron', monospace;  
 font-size: 11px;  
 font-weight: 800;  
 margin-left: 4px;  
}  

#txt-modal-about-desc,  
#txt-modal-about-desc p {  
 text-align: justify !important;  
}  
  
.legal-text,  
#txt-legal {  
 display: inline-block;  
 text-align: justify !important;  
 text-align-last: left;   
}  


/* =========================================================================
   «Мой пиксель» (оранжевая рамка) и живая лента новых участников
   ========================================================================= */
#my-marker {
 position: fixed;
 left: 0; top: 0;
 width: 12px; height: 12px;
 transform: translate(-50%, -50%);
 pointer-events: none;
 z-index: 14;
 display: none;
}
#my-marker::after {
 content: "";
 position: absolute;
 inset: -9px;
 border: 2px solid #ff9d3c;
 border-radius: 4px;
 animation: myPulse 1.8s ease-in-out infinite;
}
#my-marker-label {
 position: absolute;
 left: 50%;
 bottom: calc(100% + 14px);
 transform: translateX(-50%);
 padding: 3px 9px;
 border-radius: 8px;
 background: rgba(8, 12, 20, 0.85);
 border: 1px solid #ff9d3c;
 color: #ffd2a1;
 font: 800 10px 'Montserrat', sans-serif;
 letter-spacing: .5px;
 white-space: nowrap;
 text-shadow: 0 0 6px rgba(255,157,60,.8);
}
@keyframes myPulse {
 0%, 100% { box-shadow: 0 0 6px 1px rgba(255,157,60,.8), 0 0 14px 3px rgba(255,157,60,.4); }
 50% { box-shadow: 0 0 14px 4px rgba(255,157,60,1), 0 0 32px 10px rgba(255,157,60,.5); }
}

#live-toast {
 position: fixed;
 left: 50%;
 top: calc(var(--mt) + var(--bh) + 10px);
 transform: translate(-50%, -14px);
 z-index: 19;
 display: flex;
 align-items: center;
 gap: 8px;
 padding: 8px 14px;
 border-radius: var(--r);
 background: rgba(6, 12, 20, 0.7);
 backdrop-filter: blur(12px);
 -webkit-backdrop-filter: blur(12px);
 border: 1px solid rgba(110,250,255,.7);
 box-shadow: 0 0 14px rgba(0,242,254,.45);
 color: #effeff;
 font-size: var(--fs);
 font-weight: 700;
 white-space: nowrap;
 opacity: 0;
 pointer-events: none;
 transition: opacity .35s, transform .35s;
}
#live-toast.show { opacity: 1; transform: translate(-50%, 0); }
.live-flag { width: 22px; height: 15px; object-fit: cover; border-radius: 3px; vertical-align: middle; box-shadow: 0 0 0 1px rgba(255,255,255,.4); }


/* =========================================================================
   ВСЕ ОКНА В НОВОМ ДИЗАЙНЕ: полупрозрачное стекло + неоновая кромка
   (о проекте, страны, рейтинг, оферта, политика, вход, ошибки, поиск,
    «ваш след зафиксирован», подсказка над пикселем)
   ========================================================================= */
.modal-backdrop {
 width: 100%;
 height: 100vh; height: 100dvh;
 padding: 12px;
 background: rgba(2, 6, 10, 0.55);
 backdrop-filter: blur(8px);
 -webkit-backdrop-filter: blur(8px);
}
.modal-card {
 --text-muted: #a9c8d0;
 max-height: 88vh; max-height: min(90dvh, calc(100dvh - 24px));
 color: #effeff;
 background: linear-gradient(135deg, rgba(255,255,255,.20) 0%, rgba(255,255,255,.06) 40%, rgba(0,242,254,.13) 100%), rgba(6, 12, 20, 0.6);
 backdrop-filter: blur(22px) saturate(170%);
 -webkit-backdrop-filter: blur(22px) saturate(170%);
 border: 1px solid rgba(110,250,255,.85);
 border-radius: 22px;
 box-shadow: 0 0 18px rgba(0,242,254,.55), 0 0 60px rgba(0,242,254,.2), inset 0 0 22px rgba(255,255,255,.08), inset 0 1px 0 rgba(255,255,255,.5);
 scrollbar-width: thin;
 scrollbar-color: rgba(110,250,255,.6) transparent;
}
.modal-card::-webkit-scrollbar, .country-list-box::-webkit-scrollbar, .offer-container::-webkit-scrollbar { width: 8px; }
.modal-card::-webkit-scrollbar-thumb, .country-list-box::-webkit-scrollbar-thumb, .offer-container::-webkit-scrollbar-thumb { background: rgba(110,250,255,.55); border-radius: 8px; }
.modal-card::-webkit-scrollbar-track, .country-list-box::-webkit-scrollbar-track, .offer-container::-webkit-scrollbar-track { background: transparent; }
.country-list-box, .offer-container { scrollbar-width: thin; scrollbar-color: rgba(110,250,255,.6) transparent; }

.modal-close {
 top: 12px; right: 12px;
 width: 36px; height: 36px;
 display: flex; align-items: center; justify-content: center;
 font-size: 22px; line-height: 1;
 color: #effeff;
 border-radius: 11px;
 background: linear-gradient(135deg, rgba(255,255,255,.26), rgba(0,242,254,.14));
 border: 1px solid rgba(110,250,255,.85);
 box-shadow: 0 0 10px rgba(0,242,254,.5), inset 0 1px 0 rgba(255,255,255,.5);
 z-index: 2;
 transition: box-shadow .2s, border-color .2s;
}
.modal-close:hover { border-color: #c4feff; box-shadow: 0 0 18px rgba(0,242,254,.95), inset 0 1px 0 rgba(255,255,255,.6); }

.modal-card h3 {
 font-family: 'Montserrat', sans-serif !important;
 font-weight: 800;
 letter-spacing: .6px;
 color: #7ffbff !important;
 text-shadow: 0 0 12px rgba(0,242,254,.8);
 padding: 0 34px;
}
#modal-error h3 { color: #ff9db4 !important; text-shadow: 0 0 12px rgba(255,42,109,.8); }
.modal-card a { color: #7ffbff; }
.modal-card p { color: #dcecef; }
.modal-author-avatar { border-color: #7ffbff; box-shadow: 0 0 18px rgba(0,242,254,.9), 0 0 40px rgba(0,242,254,.35); }

.modal-card input[type="text"], .modal-card input[type="number"], #country-search-input {
 background: linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.05)) !important;
 border: 1px solid rgba(110,250,255,.65) !important;
 border-radius: 12px !important;
 color: #effeff !important;
 box-shadow: inset 0 0 12px rgba(0,242,254,.08);
 outline: none;
 font-family: 'Montserrat', sans-serif;
}
.modal-card input:focus { border-color: #c4feff !important; box-shadow: 0 0 14px rgba(0,242,254,.7), inset 0 0 12px rgba(0,242,254,.15); }
.modal-card input::placeholder { color: #8fb3bb; }

.country-row, .country-select-item {
 background: linear-gradient(135deg, rgba(255,255,255,.13), rgba(255,255,255,.04));
 border: 1px solid rgba(110,250,255,.35);
 border-radius: 12px;
 color: #effeff;
}
.country-select-item:hover { border-color: #c4feff; background: linear-gradient(135deg, rgba(255,255,255,.2), rgba(0,242,254,.18)); box-shadow: 0 0 12px rgba(0,242,254,.5); }
.country-select-item.active { border-color: #c4feff; background: linear-gradient(135deg, rgba(0,242,254,.32), rgba(0,242,254,.12)); box-shadow: 0 0 14px rgba(0,242,254,.8); }
.country-row-val { color: #7ffbff; text-shadow: 0 0 8px rgba(0,242,254,.8); font-size: 13px; }

/* Кнопки внутри окон — тоже стекло с неоном */
.share-btn-tg, .share-btn-copy, .offer-close-btn, .btn-lock, #btn-deep-link-auth {
 background: linear-gradient(135deg, rgba(255,255,255,.26), rgba(255,255,255,.09) 45%, rgba(0,242,254,.18)) !important;
 backdrop-filter: blur(14px) saturate(170%);
 -webkit-backdrop-filter: blur(14px) saturate(170%);
 border: 1px solid rgba(110,250,255,.9) !important;
 color: #effeff !important;
 border-radius: 14px !important;
 box-shadow: 0 0 12px rgba(0,242,254,.55), inset 0 0 14px rgba(255,255,255,.1), inset 0 1px 0 rgba(255,255,255,.55);
 font-weight: 800;
 letter-spacing: .8px;
 text-transform: uppercase;
 text-shadow: 0 0 8px rgba(0,242,254,.6);
 transition: box-shadow .2s, border-color .2s, transform .1s;
}
.share-btn-tg:hover, .share-btn-copy:hover, .offer-close-btn:hover, .btn-lock:hover, #btn-deep-link-auth:hover {
 border-color: #c4feff !important;
 box-shadow: 0 0 20px rgba(0,242,254,.95), 0 0 44px rgba(0,242,254,.4), inset 0 0 18px rgba(0,242,254,.25), inset 0 1px 0 rgba(255,255,255,.6);
}
.share-btn-tg:active, .share-btn-copy:active, .offer-close-btn:active, .btn-lock:active, #btn-deep-link-auth:active { transform: scale(.98); }
#btn-deep-link-auth svg path { fill: #7ffbff; }

/* Оферта и политика */
.offer-modal-header { font-family: 'Montserrat', sans-serif; font-weight: 900; letter-spacing: 1px; color: #7ffbff; text-shadow: 0 0 12px rgba(0,242,254,.8); padding: 0 34px; }
.offer-container { background: rgba(2, 8, 12, 0.45); border: 1px solid rgba(110,250,255,.3) !important; border-radius: 14px; }
.offer-cell { color: #d9eaee; }
.offer-cell.ru { border-right-color: rgba(110,250,255,.25); }
.offer-column-title { color: #7ffbff; text-shadow: 0 0 8px rgba(0,242,254,.6); }

/* Подсказка над пикселем */
.pixel-tooltip {
 background: linear-gradient(135deg, rgba(255,255,255,.24), rgba(0,242,254,.12)), rgba(6, 12, 20, 0.55);
 border: 1px solid rgba(110,250,255,.85);
 border-radius: 12px;
 backdrop-filter: blur(14px) saturate(170%);
 -webkit-backdrop-filter: blur(14px) saturate(170%);
 box-shadow: 0 0 14px rgba(0,242,254,.6), inset 0 1px 0 rgba(255,255,255,.45);
}
#tooltip-coords { color: #7ffbff; }

/* Экран «Поверните телефон»: английский дубль и кнопка «Во весь экран» */
.rotate-card .rot-en { font-size: 11px; opacity: .75; line-height: 1.4; border-top: 1px solid rgba(110,250,255,.3); padding-top: 10px; width: 100%; }
.rotate-card .rot-en b { letter-spacing: .5px; }
.rotate-card .rot-fs { width: 100%; justify-content: center; height: 44px; text-transform: uppercase; letter-spacing: 1px; }
.rotate-card .rot-fs[hidden] { display: none !important; }

#country-count-val { font-family: 'Montserrat', sans-serif; font-weight: 800; }

/* Окна на телефоне в горизонтальном положении (мало высоты) */
@media (max-height: 520px) {
 .modal-backdrop { padding: 8px; }
 .modal-card { padding: 14px 16px; border-radius: 18px; max-height: calc(100dvh - 16px); }
 .modal-card h3 { font-size: 14px !important; margin-bottom: 6px !important; padding: 0 30px; }
 .modal-close { top: 8px; right: 8px; width: 32px; height: 32px; font-size: 20px; }
 .modal-author-avatar { width: 46px; height: 46px; margin-bottom: 6px; }
 .country-list-box { max-height: calc(100dvh - 130px) !important; }
 .offer-container { height: auto !important; max-height: calc(100dvh - 140px) !important; }
 .share-btn-tg, .share-btn-copy, .offer-close-btn, .btn-lock { padding: 9px 14px; font-size: 11px; }
 #txt-modal-about-desc { font-size: 11px !important; line-height: 1.5 !important; margin-bottom: 8px !important; }
 .offer-modal-header { font-size: 14px; margin-bottom: 8px; }
}

/* Исправления после проверки */
.rotate-card .rot-fs svg { width: var(--ic, 20px); height: var(--ic, 20px); animation: none; stroke-width: 1.8; filter: drop-shadow(0 0 4px rgba(0,242,254,.9)); }
.country-list-box { max-height: min(420px, calc(100dvh - 200px)) !important; }
@media (max-height: 520px) { .country-list-box { max-height: calc(100dvh - 130px) !important; } }


/* Кнопка «Продолжить вертикально» и подсказка про полный экран */
.rotate-card .rot-go { width: 100%; justify-content: center; height: 40px; background: transparent; box-shadow: none; border-color: rgba(110,250,255,.45); font-weight: 600; }
#fs-hint {
 position: fixed; left: 50%;
 bottom: calc(var(--mb) + var(--cta-h) + 14px);
 transform: translate(-50%, 10px);
 z-index: 19; max-width: 90vw; text-align: center;
 padding: 8px 16px; border-radius: var(--r);
 background: rgba(6, 12, 20, 0.7);
 backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
 border: 1px solid rgba(110,250,255,.7);
 box-shadow: 0 0 14px rgba(0,242,254,.45);
 color: #effeff; font-size: var(--fs); font-weight: 700;
 opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s;
}
#fs-hint.show { opacity: 1; transform: translate(-50%, 0); }



/* =========================================================================
   ЭКРАН ПРИВЕТСТВИЯ (телефон): одна кнопка «Открыть холст»
   ========================================================================= */
#welcome-overlay {
 display: none;
 position: fixed;
 left: 0; top: 0; width: 100%; height: 100%;
 z-index: 200;
 align-items: center; justify-content: center;
 padding: 16px;
 background: linear-gradient(rgba(2,4,8,.3), rgba(2,4,8,.3)), url('bg-globe.jpg') center / cover no-repeat, #020408;
}
/* Сайт работает только горизонтально: пока телефон вертикален, виден только этот экран */
@media (pointer: coarse) and (orientation: portrait) and (max-width: 600px) {
 #welcome-overlay { display: flex; }
}
.welcome-card {
 max-width: 320px;
 padding: 26px 24px;
 display: flex; flex-direction: column; align-items: center; gap: 14px;
 text-align: center;
 border-radius: 22px;
 background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(0,242,254,.12)), rgba(6, 12, 20, 0.5);
 backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
 border: 1px solid rgba(110,250,255,.85);
 box-shadow: 0 0 18px rgba(0,242,254,.6), 0 0 44px rgba(0,242,254,.25), inset 0 1px 0 rgba(255,255,255,.5);
}
.welcome-card img { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; }
.welcome-card h2 { font: 900 20px 'Orbitron', sans-serif; letter-spacing: 1px; color: #7ffbff; text-shadow: 0 0 12px rgba(0,242,254,.9); }
.welcome-card p { font-size: 13px; line-height: 1.5; opacity: .92; }
.welcome-btn { width: 100%; justify-content: center; height: 52px; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; border-color: #c4feff;
 box-shadow: 0 0 18px rgba(0,242,254,.8), 0 0 44px rgba(0,242,254,.35), inset 0 0 20px rgba(0,242,254,.25), inset 0 1px 0 rgba(255,255,255,.6); }
@media (max-height: 520px) {
 .welcome-card { flex-direction: row; flex-wrap: wrap; max-width: 560px; padding: 14px 20px; gap: 8px 16px; justify-content: center; }
 .welcome-card img { width: 48px; height: 48px; }
 .welcome-card h2 { font-size: 16px; }
 .welcome-card p { flex: 1 1 100%; font-size: 12px; }
 .welcome-btn { height: 42px; }
}

/* =========================================================================
   СПИСОК ЯЗЫКОВ — то же стекло с неоном, что и у кнопок
   ========================================================================= */
.lang-options {
 min-width: 190px;
 padding: 8px;
 gap: 4px;
 background: linear-gradient(135deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,.10) 42%, rgba(0,242,254,.16) 100%), rgba(6, 12, 20, 0.35);
 backdrop-filter: blur(18px) saturate(170%) brightness(1.3);
 -webkit-backdrop-filter: blur(18px) saturate(170%) brightness(1.3);
 border: 1px solid rgba(110,250,255,.85);
 box-shadow: 0 0 10px rgba(0,242,254,.55), 0 0 26px rgba(0,242,254,.2), inset 0 0 16px rgba(255,255,255,.12), inset 0 1px 0 rgba(255,255,255,.55);
}
.lang-options li { display: flex; align-items: center; gap: 10px; border: 1px solid transparent; border-radius: 10px; padding: 8px 10px; color: #effeff; }
.lang-options li b { width: 26px; flex: none; font: 800 11px 'Montserrat', sans-serif; letter-spacing: .5px; color: #7ffbff; text-shadow: 0 0 8px rgba(0,242,254,.8); }
.lang-options li:hover { color: #effeff; border-color: #c4feff; background: rgba(0,242,254,.18); box-shadow: 0 0 10px rgba(0,242,254,.6); }
.lang-options li.cur { border-color: rgba(110,250,255,.7); background: rgba(0,242,254,.14); }

/* =========================================================================
   ЭКРАННАЯ КЛАВИАТУРА: окна с полями ввода поднимаются вверх
   ========================================================================= */
html.kb-open .modal-backdrop {
 top: var(--vvt, 0px);
 height: var(--vvh, 100dvh);
 align-items: flex-start;
 padding-top: 6px; padding-bottom: 6px;
}
html.kb-open .modal-card { max-height: calc(var(--vvh, 100dvh) - 12px); padding-top: 12px; padding-bottom: 12px; }
html.kb-open .modal-card p, html.kb-open .modal-author-avatar { display: none; }
html.kb-open .modal-card h3 { margin-bottom: 8px !important; }

/* Список языков вынесен из кнопки — ему нужно самому принимать нажатия */
.lang-options { pointer-events: auto; }
