:root{--bg:#f3f7f5;--card:#fff;--text:#17231d;--muted:#64736b;--accent:#00a86b;--accent-dark:#008f5a;--accent-soft:#e7f7f0;--border:#dfe9e4;--shadow:0 8px 30px #123c2a12}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,Arial,sans-serif}header{height:68px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 max(20px,calc((100% - 1180px)/2));position:sticky;top:0;z-index:5}.logo{font-weight:900;font-size:20px;letter-spacing:-.5px}.logo span{color:var(--accent)}nav{display:flex;gap:7px}button{border:0;background:none;cursor:pointer;font:inherit;color:inherit}nav button{padding:10px 13px;border-radius:10px}nav button:hover{background:#edf6f1}.wrap{max-width:1180px;margin:auto;padding:28px 20px}.hero{background:linear-gradient(135deg,#fff,#e9f8f1);padding:28px;border:1px solid var(--border);border-radius:20px;box-shadow:0 10px 35px #123c2a0d}.hero h1{margin:0 0 8px;font-size:32px}.hero p{margin:0;color:var(--muted)}.search{display:flex;gap:10px;margin-top:20px}.search input,.field input,.field textarea,.field select{width:100%;padding:13px;border:1px solid var(--border);border-radius:10px;background:#fff;font:inherit}.search input{flex:1}.primary{background:var(--accent);color:#fff;padding:12px 17px;border-radius:10px;font-weight:700;box-shadow:0 5px 14px #00a86b2e}.primary:hover{background:var(--accent-dark)}.secondary{background:#edf6f1;padding:12px 17px;border-radius:10px}.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-top:22px}.card{background:var(--card);border:1px solid var(--border);border-radius:15px;overflow:hidden;box-shadow:var(--shadow)}.photo{position:relative;height:180px;min-height:180px;background:linear-gradient(135deg,#d9eee5,#f7fbf9);display:grid;place-items:center;font-size:38px;overflow:hidden}.photo img{display:block;width:100%;height:100%;object-fit:cover}.card-body{padding:14px}.price{font-weight:900;font-size:19px}.title{font-weight:700;margin:7px 0}.muted{color:var(--muted);font-size:13px}.section{margin-top:28px}.cats{display:flex;gap:9px;flex-wrap:wrap;margin-top:15px}.cat{background:#fff;border:1px solid var(--border);padding:10px 13px;border-radius:12px}.panel{background:#fff;border:1px solid var(--border);border-radius:16px;padding:22px;margin-top:18px}.form{display:grid;gap:14px;max-width:720px}.field label{display:block;font-weight:700;margin-bottom:6px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.stat{background:#fff;border:1px solid var(--border);border-radius:14px;padding:18px}.stat b{display:block;font-size:25px;margin-top:5px}.notice{padding:13px 15px;background:#fff8df;border:1px solid #f0df9b;border-radius:10px;margin-bottom:14px}.row{display:flex;gap:10px;align-items:center;justify-content:space-between}.list{display:grid;gap:10px}.item{padding:14px;border:1px solid var(--border);border-radius:12px;background:#fff}.pill{display:inline-block;padding:5px 9px;border-radius:99px;background:#e7f7f0;color:#008f5a;font-size:12px;font-weight:700}#toast{position:fixed;right:20px;bottom:20px;background:#17231d;color:#fff;padding:12px 16px;border-radius:10px;display:none;z-index:20}@media(max-width:850px){header{padding:0 12px}nav{gap:0}nav button{font-size:12px;padding:9px 7px}.grid{grid-template-columns:repeat(2,1fr)}.stats{grid-template-columns:repeat(2,1fr)}}@media(max-width:520px){header{height:auto;min-height:64px;align-items:flex-start;padding:12px;flex-direction:column;gap:8px}nav{width:100%;overflow:auto}.hero h1{font-size:25px}.search{flex-direction:column}.grid{grid-template-columns:1fr}.wrap{padding:18px 12px}.stats{grid-template-columns:1fr 1fr}}

/* v2 marketplace additions */
.app-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.stat-card{background:#fff;border:1px solid var(--border);border-radius:18px;padding:18px}.stat-card b{font-size:28px}.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.toolbar input,.toolbar select{min-width:180px}.notice{padding:12px 14px;border-radius:12px;background:var(--accent-soft);border:1px solid #bfead7}.preview-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.preview{aspect-ratio:1;border-radius:14px;background:#e7f7f0;display:flex;align-items:center;justify-content:center;overflow:hidden}.preview img{width:100%;height:100%;object-fit:cover}.modal{position:fixed;inset:0;background:#17231d66;display:flex;align-items:center;justify-content:center;padding:20px;z-index:20}.modal-card{width:min(620px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:22px;padding:24px}.hidden{display:none!important}.chat-list{display:grid;gap:8px}.chat-item{padding:12px;border:1px solid var(--border);border-radius:12px;cursor:pointer}.chat-item:hover{background:var(--accent-soft)}@media(max-width:900px){.app-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:600px){.app-grid{grid-template-columns:1fr}.preview-grid{grid-template-columns:repeat(2,1fr)}}



/* ACCOUNT WOW */
.account-wow [style*="font-size:9px"]{font-size:12px!important;line-height:1.45!important}
.account-wow [style*="font-size:10px"]{font-size:12.5px!important;line-height:1.45!important}
.account-wow [style*="font-size:11px"]{font-size:13.5px!important;line-height:1.5!important}
.account-wow [style*="font-size:12px"]{font-size:14px!important}
.account-wow [style*="font-size:13px"]{font-size:15px!important}
.account-wow [style*="color:#9297a4"]{color:#687184!important}
.account-wow [style*="color:#858b99"]{color:#687184!important}
.account-wow [style*="color:#8b90a0"]{color:#687184!important}
.account-wow [style*="color:#7b8190"]{color:#687184!important}
.account-wow h2{font-size:24px!important;letter-spacing:-.45px!important}
.account-wow button[onclick="go('chats')"]{border:0!important;background:linear-gradient(135deg,#4f7cff,#7457ff)!important;color:#fff!important;box-shadow:0 14px 32px rgba(86,93,225,.24)!important}
.account-wow button[onclick="chats('support')"]{border:0!important;background:linear-gradient(135deg,#7457ff,#38bff8)!important;color:#fff!important;box-shadow:0 14px 32px rgba(81,111,226,.22)!important}
.account-wow button[onclick="go('chats')"] [style*="color:#9297a4"]{color:rgba(255,255,255,.86)!important}
.account-wow button[onclick="chats('support')"] [style*="color:#9297a4"]{color:rgba(255,255,255,.86)!important}
.account-wow [style*="background:rgba(255,255,255,.78)"]{background:linear-gradient(145deg,#fff,#f7f8ff)!important;box-shadow:0 10px 26px rgba(55,58,90,.08)!important}
@media(max-width:700px){.account-wow [style*="font-size:9px"]{font-size:11.5px!important}.account-wow h2{font-size:22px!important}}

/* ADMIN SUPPORT WOW */
.admin-support-wow [style*="font-size:9px"]{font-size:12px!important;line-height:1.45!important}
.admin-support-wow [style*="font-size:10px"]{font-size:12.5px!important;line-height:1.5!important}
.admin-support-wow [style*="font-size:11px"]{font-size:13.5px!important;line-height:1.5!important}
.admin-support-wow [style*="font-size:12px"]{font-size:14px!important;line-height:1.5!important}
.admin-support-wow [style*="font-size:13px"]{font-size:15px!important}
.admin-support-wow [style*="color:#858b98"]{color:#687184!important}
.admin-support-wow [style*="color:#969ba7"]{color:#687184!important}
.admin-support-wow [style*="color:#a0a5af"]{color:#687184!important}
.admin-support-wow [style*="color:#73798a"]{color:#596173!important}
.admin-support-wow .panel{border-radius:22px!important;box-shadow:0 12px 34px rgba(42,45,75,.075)!important}
.admin-support-wow button{font-size:13px!important;font-weight:800!important}
.admin-support-wow h1{font-size:32px!important;letter-spacing:-.6px!important}
.admin-support-wow h2{font-size:23px!important;letter-spacing:-.3px!important}
.admin-support-wow [style*="background:#fff"]{transition:box-shadow .18s ease,border-color .18s ease}
@media(max-width:700px){.admin-support-wow h1{font-size:27px!important}.admin-support-wow [style*="font-size:10px"]{font-size:12px!important}.admin-support-wow [style*="font-size:11px"]{font-size:13px!important}}

/* ADMIN SETTINGS WOW */
.admin-settings-wow{max-width:920px!important;margin:0 auto!important;padding-bottom:50px!important}
.admin-settings-wow>button{min-height:44px!important;padding:0 16px!important;border:1px solid #e3e5ed!important;border-radius:14px!important;background:#fff!important;color:#4b5263!important;font-size:13px!important;font-weight:800!important;box-shadow:0 6px 18px rgba(35,40,65,.06)!important}
.admin-settings-wow>h1{margin:22px 0 6px!important;font-size:35px!important;line-height:1.15!important;font-weight:900!important;letter-spacing:-.8px!important;color:#20233b!important}
.admin-settings-wow>.muted{margin:0 0 22px!important;font-size:14px!important;line-height:1.6!important;color:#687184!important}
.admin-settings-wow>.panel{position:relative!important;overflow:hidden!important;padding:32px!important;border:1px solid rgba(116,87,255,.17)!important;border-radius:30px!important;background:radial-gradient(circle at 95% 0%,rgba(56,191,248,.20),transparent 32%),radial-gradient(circle at 0% 100%,rgba(255,102,135,.14),transparent 34%),linear-gradient(135deg,#fff 0%,#faf8ff 55%,#f4fbff 100%)!important;box-shadow:0 22px 60px rgba(47,45,90,.11)!important}
.admin-settings-wow>.panel:before{content:"⚙️";display:flex;align-items:center;justify-content:center;width:58px;height:58px;margin-bottom:18px;border-radius:18px;background:linear-gradient(135deg,#7457ff,#4388ff);font-size:27px;box-shadow:0 12px 28px rgba(86,82,225,.25)}
.admin-settings-wow>.panel h2{margin:0 0 24px!important;font-size:24px!important;line-height:1.25!important;font-weight:900!important;letter-spacing:-.4px!important;color:#292d42!important}
.admin-settings-wow .field{padding:21px!important;border:1px solid rgba(116,87,255,.12)!important;border-radius:20px!important;background:rgba(255,255,255,.72)!important;box-shadow:0 9px 28px rgba(48,50,80,.06)!important}
.admin-settings-wow .field label{display:block!important;margin-bottom:10px!important;font-size:14px!important;line-height:1.45!important;font-weight:850!important;color:#555d70!important}
.admin-settings-wow #secondPrice{width:100%!important;box-sizing:border-box!important;min-height:59px!important;padding:0 17px!important;border:1px solid #dcdfea!important;border-radius:16px!important;outline:none!important;background:#fff!important;color:#25283a!important;font-size:20px!important;font-weight:900!important;box-shadow:0 7px 20px rgba(45,48,80,.05)!important;transition:.18s ease!important}
.admin-settings-wow #secondPrice:focus{border-color:#8875f4!important;box-shadow:0 0 0 5px rgba(116,87,255,.10)!important}
.admin-settings-wow #saveConfig{width:100%!important;min-height:58px!important;margin-top:18px!important;border:0!important;border-radius:17px!important;background:linear-gradient(135deg,#7457ff 0%,#5578ff 52%,#38bff8 100%)!important;color:#fff!important;font-size:15px!important;font-weight:900!important;box-shadow:0 15px 34px rgba(89,88,225,.29)!important;cursor:pointer!important;transition:.18s ease!important}
.admin-settings-wow #saveConfig:hover{transform:translateY(-2px)!important;box-shadow:0 19px 40px rgba(89,88,225,.34)!important}
@media(max-width:700px){.admin-settings-wow>h1{font-size:29px!important}.admin-settings-wow>.panel{padding:22px!important;border-radius:23px!important}.admin-settings-wow>.panel h2{font-size:21px!important}.admin-settings-wow #secondPrice{font-size:18px!important}}

/* ADMIN OWNER WOW */
.admin-owner-wow{max-width:920px!important;margin:0 auto!important;padding-bottom:50px!important}
.admin-owner-wow>button{min-height:44px!important;padding:0 16px!important;border:1px solid #e3e5ed!important;border-radius:14px!important;background:#fff!important;color:#4b5263!important;font-size:13px!important;font-weight:800!important;box-shadow:0 6px 18px rgba(35,40,65,.06)!important}
.admin-owner-wow>h1{margin:22px 0 6px!important;font-size:35px!important;line-height:1.15!important;font-weight:900!important;letter-spacing:-.8px!important;color:#20233b!important}
.admin-owner-wow>.muted{margin:0 0 22px!important;font-size:14px!important;color:#687184!important}
.admin-owner-wow>.panel{position:relative!important;overflow:hidden!important;padding:30px!important;border:1px solid rgba(116,87,255,.16)!important;border-radius:30px!important;background:radial-gradient(circle at 92% 5%,rgba(56,191,248,.19),transparent 30%),radial-gradient(circle at 5% 100%,rgba(255,102,135,.15),transparent 32%),linear-gradient(135deg,#fff 0%,#faf8ff 52%,#f4fbff 100%)!important;box-shadow:0 22px 60px rgba(47,45,90,.11)!important}
.admin-owner-wow>.panel:before{content:"👑";display:flex;align-items:center;justify-content:center;width:72px;height:72px;margin-bottom:20px;border-radius:22px;background:linear-gradient(135deg,#7457ff,#4388ff,#38bff8);font-size:32px;box-shadow:0 15px 32px rgba(80,87,225,.28)}
.admin-owner-wow>.panel>div:first-of-type{padding:20px!important;margin-bottom:18px!important;border:1px solid rgba(116,87,255,.12)!important;border-radius:20px!important;background:rgba(255,255,255,.78)!important;box-shadow:0 9px 28px rgba(50,52,85,.06)!important}
.admin-owner-wow>.panel h2{font-size:26px!important;font-weight:900!important;letter-spacing:-.5px!important;color:#25283a!important}
.admin-owner-wow>.panel>div:first-of-type button{width:48px!important;height:48px!important;border:0!important;border-radius:15px!important;background:linear-gradient(135deg,#7457ff,#4388ff)!important;color:#fff!important;font-size:21px!important;box-shadow:0 10px 22px rgba(84,84,220,.23)!important}
.admin-owner-wow>.panel p{margin:10px 0!important;padding:15px 17px!important;border:1px solid #e8eaf1!important;border-radius:16px!important;background:rgba(255,255,255,.82)!important;color:#4e5566!important;font-size:14px!important;line-height:1.5!important;box-shadow:0 6px 18px rgba(45,48,80,.045)!important}
.admin-owner-wow>.panel p b{color:#25283a!important;font-weight:850!important}
.admin-owner-wow>.panel>button[onclick="logout()"]{width:100%!important;min-height:52px!important;margin-top:18px!important;border:1px solid #f1d9df!important;border-radius:16px!important;background:linear-gradient(135deg,#fff5f7,#fff)!important;color:#c34f66!important;font-size:14px!important;font-weight:900!important;cursor:pointer!important;box-shadow:0 8px 22px rgba(190,70,95,.07)!important}
.admin-owner-wow>.panel>button[onclick="logout()"]:hover{background:linear-gradient(135deg,#ffedf1,#fff8fa)!important}
@media(max-width:700px){.admin-owner-wow>h1{font-size:29px!important}.admin-owner-wow>.panel{padding:21px!important;border-radius:23px!important}.admin-owner-wow>.panel h2{font-size:22px!important}.admin-owner-wow>.panel:before{width:62px;height:62px;font-size:28px}}

/* ADMIN OWNER WOW V2 */
.admin-owner-wow>.panel{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}
.admin-owner-wow>.panel:before{grid-column:1/-1!important;width:82px!important;height:82px!important;margin:0 auto 4px!important;border-radius:26px!important;background:linear-gradient(135deg,#7457ff 0%,#4f7cff 45%,#38bff8 100%)!important;font-size:37px!important;box-shadow:0 18px 42px rgba(77,86,225,.32)!important}
.admin-owner-wow>.panel>div:first-of-type{grid-column:1/-1!important;position:relative!important;min-height:92px!important;padding:24px 24px 24px 88px!important;margin:0!important;border:1px solid rgba(116,87,255,.16)!important;border-radius:24px!important;background:radial-gradient(circle at 90% 0%,rgba(56,191,248,.18),transparent 35%),linear-gradient(135deg,#fff,#f7f5ff)!important;box-shadow:0 14px 38px rgba(52,50,95,.09)!important}
.admin-owner-wow>.panel>div:first-of-type:before{content:"👤";position:absolute!important;left:22px!important;top:50%!important;transform:translateY(-50%)!important;width:50px!important;height:50px!important;display:flex!important;align-items:center!important;justify-content:center!important;border-radius:17px!important;background:linear-gradient(135deg,#ece8ff,#e7f8ff)!important;font-size:23px!important;box-shadow:0 8px 22px rgba(78,72,160,.12)!important}
.admin-owner-wow>.panel>div:first-of-type:after{content:"ВЛАДЕЛЕЦ ПЛОЩАДКИ";position:absolute!important;left:88px!important;bottom:18px!important;padding:5px 9px!important;border-radius:999px!important;background:linear-gradient(135deg,#7457ff,#4f7cff)!important;color:#fff!important;font-size:9px!important;font-weight:900!important;letter-spacing:.08em!important;box-shadow:0 6px 16px rgba(90,79,220,.20)!important}
.admin-owner-wow>.panel h2{padding-bottom:24px!important;font-size:28px!important;color:#20243a!important}
.admin-owner-wow>.panel>div:first-of-type button{position:absolute!important;right:20px!important;top:20px!important;width:50px!important;height:50px!important;border-radius:16px!important;background:linear-gradient(135deg,#7457ff,#4388ff,#38bff8)!important;box-shadow:0 12px 27px rgba(80,88,225,.28)!important;transition:.18s ease!important}
.admin-owner-wow>.panel>div:first-of-type button:hover{transform:translateY(-2px) scale(1.03)!important}
.admin-owner-wow>.panel p{position:relative!important;min-height:78px!important;margin:0!important;padding:20px 18px 18px 58px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;border-radius:20px!important;font-size:15px!important;overflow:hidden!important}
.admin-owner-wow>.panel p:before{position:absolute!important;left:16px!important;top:50%!important;transform:translateY(-50%)!important;width:32px!important;height:32px!important;display:flex!important;align-items:center!important;justify-content:center!important;border-radius:11px!important;font-size:17px!important}
.admin-owner-wow>.panel p:nth-of-type(1){background:linear-gradient(145deg,#fff,#f3f7ff)!important;border-color:#dfe7ff!important}
.admin-owner-wow>.panel p:nth-of-type(1):before{content:"📱";background:#eaf0ff!important}
.admin-owner-wow>.panel p:nth-of-type(2){background:linear-gradient(145deg,#fff,#f8f4ff)!important;border-color:#e9ddff!important}
.admin-owner-wow>.panel p:nth-of-type(2):before{content:"✉️";background:#f1eaff!important}
.admin-owner-wow>.panel p:nth-of-type(3){background:linear-gradient(145deg,#fff,#f1fbf7)!important;border-color:#d9f1e7!important}
.admin-owner-wow>.panel p:nth-of-type(3):before{content:"🛡️";background:#e5f8ef!important}
.admin-owner-wow>.panel p:nth-of-type(4){background:linear-gradient(145deg,#fff,#fff7f0)!important;border-color:#f4e6d8!important}
.admin-owner-wow>.panel p:nth-of-type(4):before{content:"#";background:#fff0e2!important;color:#b26b32!important;font-weight:900!important}
.admin-owner-wow>.panel p b{margin-bottom:4px!important;font-size:11px!important;text-transform:uppercase!important;letter-spacing:.06em!important;color:#777f91!important}
.admin-owner-wow>.panel>button[onclick="logout()"]{grid-column:1/-1!important;min-height:56px!important;margin-top:4px!important;background:linear-gradient(135deg,#fff4f6,#fffafb)!important;font-size:15px!important;transition:.18s ease!important}
.admin-owner-wow>.panel>button[onclick="logout()"]:hover{transform:translateY(-1px)!important;box-shadow:0 12px 28px rgba(190,70,95,.12)!important}
@media(max-width:700px){.admin-owner-wow>.panel{grid-template-columns:1fr!important}.admin-owner-wow>.panel p{grid-column:1!important}.admin-owner-wow>.panel>div:first-of-type{padding:82px 18px 20px!important;text-align:center!important}.admin-owner-wow>.panel>div:first-of-type:before{left:50%!important;top:18px!important;transform:translateX(-50%)!important}.admin-owner-wow>.panel>div:first-of-type:after{position:static!important;display:inline-flex!important;margin-top:7px!important}.admin-owner-wow>.panel>div:first-of-type button{right:14px!important;top:14px!important}.admin-owner-wow>.panel h2{padding-bottom:0!important;font-size:24px!important}}

/* ADMIN OWNER DETAILS */
.admin-owner-wow>.panel p:nth-of-type(5){background:linear-gradient(145deg,#fff,#f2fbf6)!important;border-color:#d8f1e4!important}
.admin-owner-wow>.panel p:nth-of-type(5):before{content:"✓";background:#e4f8ed!important;color:#27845a!important;font-weight:900!important}
.admin-owner-wow>.panel p:nth-of-type(6){background:linear-gradient(145deg,#fff,#f5f7ff)!important;border-color:#e0e5fb!important}
.admin-owner-wow>.panel p:nth-of-type(6):before{content:"📅";background:#ebefff!important}
.admin-owner-wow>.panel p:nth-of-type(7){background:linear-gradient(145deg,#fff,#fff8ef)!important;border-color:#f3e5d5!important}
.admin-owner-wow>.panel p:nth-of-type(7):before{content:"#";background:#fff0df!important;color:#ad6a34!important;font-weight:900!important}

/* LISTING EDITOR WOW V2 */
.listing-editor{max-width:1060px!important}
.listing-editor-title{font-size:36px!important;padding:34px 34px 8px!important;background:radial-gradient(circle at 88% 0%,rgba(255,102,135,.28),transparent 28%),radial-gradient(circle at 65% 12%,rgba(56,191,248,.24),transparent 30%),radial-gradient(circle at 5% 100%,rgba(116,87,255,.22),transparent 34%),linear-gradient(135deg,#fff,#f7f4ff 48%,#f2fbff)!important}
.listing-editor-subtitle{padding:0 34px 30px!important;font-size:15px!important;color:#626a7a!important;background:linear-gradient(135deg,#fff,#f7f4ff 48%,#f2fbff)!important}
.listing-editor-form{gap:20px!important}
.listing-editor-form .field{padding:26px!important;border-radius:24px!important;border:1px solid rgba(116,87,255,.15)!important;box-shadow:0 16px 42px rgba(42,45,80,.08)!important}
.listing-editor-form .field:hover{transform:translateY(-3px)!important;box-shadow:0 22px 50px rgba(60,53,110,.13)!important;border-color:rgba(116,87,255,.32)!important}
.listing-editor-form .field:nth-of-type(1){background:linear-gradient(145deg,#fff,#f6f1ff)!important}
.listing-editor-form .field:nth-of-type(2){background:linear-gradient(145deg,#fff,#eefaff)!important}
.listing-editor-form .field:nth-of-type(3){background:linear-gradient(145deg,#fff,#fff5ec)!important}
.listing-editor-form .field:nth-of-type(4){background:linear-gradient(145deg,#fff,#f3f0ff)!important}
.listing-editor-form .field:nth-of-type(5){background:linear-gradient(145deg,#fff,#eefbf6)!important}
.listing-editor-form .field:nth-of-type(6){background:linear-gradient(145deg,#fff,#eef7ff)!important}
.listing-editor-form .field:nth-of-type(7){background:linear-gradient(145deg,#fff,#fff1f5)!important}
.listing-editor-form label{font-size:13px!important;font-weight:900!important;color:#50586c!important}
.listing-editor-form input:not([type=file]),.listing-editor-form select,.listing-editor-form textarea{font-size:15px!important;border-radius:16px!important;background:rgba(255,255,255,.90)!important}
.listing-editor-form input:not([type=file]),.listing-editor-form select{min-height:56px!important}
.listing-editor-form textarea{min-height:175px!important;line-height:1.65!important}
.listing-editor #photos{padding:30px!important;border:2px dashed rgba(116,87,255,.38)!important;border-radius:20px!important;background:radial-gradient(circle at 90% 0%,rgba(56,191,248,.12),transparent 32%),linear-gradient(135deg,#faf7ff,#f1fbff)!important;font-size:14px!important}
.listing-editor #photos::file-selector-button{padding:13px 18px!important;border-radius:13px!important;background:linear-gradient(135deg,#7457ff,#5578ff,#38bff8)!important;box-shadow:0 10px 24px rgba(89,87,225,.27)!important}
.listing-editor-form>.primary{min-height:62px!important;border-radius:18px!important;font-size:16px!important;background:linear-gradient(135deg,#7457ff 0%,#5578ff 45%,#38bff8 100%)!important;box-shadow:0 17px 38px rgba(85,93,230,.32)!important;transition:.18s ease!important}
.listing-editor-form>.primary:hover{transform:translateY(-2px)!important;box-shadow:0 22px 46px rgba(85,93,230,.38)!important}
@media(max-width:700px){.listing-editor-title{font-size:28px!important;padding:25px 21px 6px!important}.listing-editor-subtitle{padding:0 21px 22px!important;font-size:13px!important}.listing-editor-form .field{padding:19px!important;border-radius:20px!important}.listing-editor-form textarea{min-height:150px!important}}

/* ADMIN DASHBOARD WOW */
.admin-dashboard-wow{max-width:1180px!important;margin:0 auto!important;padding-bottom:55px!important}
.admin-dashboard-wow>div:first-child{padding:26px 28px!important;border:1px solid rgba(116,87,255,.14)!important;border-radius:28px!important;background:radial-gradient(circle at 92% 0%,rgba(56,191,248,.20),transparent 30%),radial-gradient(circle at 10% 100%,rgba(116,87,255,.20),transparent 34%),linear-gradient(135deg,#fff,#f8f6ff 55%,#f1fbff)!important;box-shadow:0 20px 55px rgba(45,45,90,.10)!important}
.admin-dashboard-wow h1{font-size:34px!important;font-weight:900!important;letter-spacing:-.8px!important;color:#20233b!important}
.admin-dashboard-wow>div:first-child .muted{font-size:14px!important;color:#687184!important}
.admin-dashboard-logout{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;min-height:46px!important;padding:0 18px!important;border:1px solid #f0d9df!important;border-radius:15px!important;background:linear-gradient(135deg,#fff5f7,#fff)!important;color:#c34f66!important;font-size:13px!important;font-weight:900!important;cursor:pointer!important;box-shadow:0 8px 22px rgba(190,70,95,.08)!important;transition:.18s ease!important}
.admin-dashboard-logout:hover{transform:translateY(-2px)!important;box-shadow:0 13px 28px rgba(190,70,95,.14)!important}
.admin-dashboard-wow>.panel{margin-top:18px!important;padding:24px!important;border:1px solid #e8eaf1!important;border-radius:26px!important;background:#fff!important;box-shadow:0 15px 42px rgba(38,42,70,.07)!important}
.admin-dashboard-wow>.panel h2{margin:0 0 18px!important;font-size:23px!important;font-weight:900!important;letter-spacing:-.4px!important;color:#292d42!important}
.admin-dashboard-wow>.panel .grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;gap:14px!important}
.admin-dashboard-wow>.panel .grid>button{position:relative!important;overflow:hidden!important;min-height:180px!important;padding:22px!important;border-radius:22px!important;text-align:left!important;transition:transform .18s ease,box-shadow .18s ease!important}
.admin-dashboard-wow>.panel .grid>button:hover{transform:translateY(-4px)!important}
.admin-dashboard-wow button[onclick="adminUsers()"]{border:1px solid #ded8ff!important;background:radial-gradient(circle at 100% 0%,rgba(116,87,255,.18),transparent 38%),linear-gradient(145deg,#fff,#f6f2ff)!important;box-shadow:0 13px 32px rgba(93,76,190,.10)!important}
.admin-dashboard-wow button[onclick="adminUsers()"]:hover{box-shadow:0 18px 42px rgba(93,76,190,.17)!important}
.admin-dashboard-wow button[onclick="adminListings()"]{border:1px solid #d9e9ff!important;background:radial-gradient(circle at 100% 0%,rgba(56,191,248,.18),transparent 38%),linear-gradient(145deg,#fff,#f0f8ff)!important;box-shadow:0 13px 32px rgba(61,128,190,.10)!important}
.admin-dashboard-wow button[onclick="adminListings()"]:hover{box-shadow:0 18px 42px rgba(61,128,190,.17)!important}
.admin-dashboard-wow button[onclick="adminPayments()"]{border:1px solid #d9f0e4!important;background:radial-gradient(circle at 100% 0%,rgba(50,184,121,.17),transparent 38%),linear-gradient(145deg,#fff,#effaf5)!important;box-shadow:0 13px 32px rgba(48,150,102,.10)!important}
.admin-dashboard-wow button[onclick="adminPayments()"]:hover{box-shadow:0 18px 42px rgba(48,150,102,.17)!important}
.admin-dashboard-wow button[onclick="go('chats')"]{border:1px solid #dce4ff!important;background:radial-gradient(circle at 100% 0%,rgba(79,124,255,.18),transparent 38%),linear-gradient(145deg,#fff,#f2f5ff)!important;box-shadow:0 13px 32px rgba(72,93,190,.10)!important}
.admin-dashboard-wow button[onclick="go('chats')"]:hover{box-shadow:0 18px 42px rgba(72,93,190,.17)!important}
.admin-dashboard-wow button[onclick="adminSupport()"]{border:1px solid #e1d9ff!important;background:radial-gradient(circle at 100% 0%,rgba(255,102,135,.16),transparent 32%),radial-gradient(circle at 0% 100%,rgba(116,87,255,.17),transparent 35%),linear-gradient(145deg,#fff,#f6f1ff)!important;box-shadow:0 15px 35px rgba(106,77,190,.13)!important}
.admin-dashboard-wow button[onclick="adminSupport()"]:hover{box-shadow:0 21px 46px rgba(106,77,190,.21)!important}
.admin-dashboard-wow button[onclick="adminSettings()"]{border:1px solid #f0e3d4!important;background:radial-gradient(circle at 100% 0%,rgba(255,177,92,.18),transparent 38%),linear-gradient(145deg,#fff,#fff7ee)!important;box-shadow:0 13px 32px rgba(170,111,54,.09)!important}
.admin-dashboard-wow button[onclick="adminSettings()"]:hover{box-shadow:0 18px 42px rgba(170,111,54,.16)!important}
.admin-dashboard-wow button[onclick="adminOwner()"]{border:1px solid #eadcf2!important;background:radial-gradient(circle at 100% 0%,rgba(201,117,226,.18),transparent 38%),linear-gradient(145deg,#fff,#faf2ff)!important;box-shadow:0 13px 32px rgba(137,73,160,.09)!important}
.admin-dashboard-wow button[onclick="adminOwner()"]:hover{box-shadow:0 18px 42px rgba(137,73,160,.16)!important}
.admin-dashboard-wow>.panel .grid>button>div:first-child{font-size:34px!important;margin-bottom:14px!important}
.admin-dashboard-wow>.panel .grid>button [style*="font-size:15px"]{font-size:17px!important;font-weight:900!important;color:#282c40!important}
.admin-dashboard-wow>.panel .grid>button .price{font-size:28px!important;font-weight:900!important;color:#20233b!important;margin-top:8px!important}
.admin-dashboard-wow>.panel .grid>button .muted{font-size:12.5px!important;line-height:1.5!important;color:#6f7788!important}
.admin-dashboard-wow button[onclick="adminSupport()"] [style*="font-size:15px"]{font-size:17px!important}
.admin-dashboard-wow button[onclick="adminSupport()"] [style*="font-size:10px"]{font-size:12px!important}
.admin-dashboard-wow button[onclick="adminSupport()"] [style*="font-size:11px"]{font-size:12.5px!important;line-height:1.5!important}
@media(max-width:700px){.admin-dashboard-wow>div:first-child{padding:21px!important;border-radius:22px!important}.admin-dashboard-wow h1{font-size:28px!important}.admin-dashboard-wow>.panel{padding:17px!important;border-radius:22px!important}.admin-dashboard-wow>.panel .grid{grid-template-columns:1fr!important}.admin-dashboard-wow>.panel .grid>button{min-height:155px!important}.admin-dashboard-logout{width:100%!important;margin-top:12px!important}}

/* MOBILE APP LAYER V1 */
@media(max-width:700px){
html,body{max-width:100%!important;overflow-x:hidden!important}
body{font-size:15px!important}
header{height:auto!important;min-height:0!important;padding:10px 12px!important;gap:8px!important;align-items:flex-start!important}
.logo{font-size:18px!important;white-space:nowrap!important}
nav{width:100%!important;display:flex!important;gap:6px!important;overflow-x:auto!important;padding-bottom:2px!important;scrollbar-width:none!important}
nav::-webkit-scrollbar{display:none!important}
nav button{flex:0 0 auto!important;min-height:40px!important;padding:9px 11px!important;font-size:12.5px!important;border-radius:11px!important}
.wrap{width:100%!important;max-width:100%!important;padding:16px 12px 28px!important}
.hero{padding:20px 16px!important;border-radius:19px!important}
.hero h1{font-size:27px!important;line-height:1.15!important}
.search{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}
.search input,.search button{width:100%!important;min-width:0!important}
.panel{width:100%!important;max-width:100%!important;padding:16px!important;border-radius:20px!important}
.grid,.app-grid{grid-template-columns:1fr!important}
.stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
.stat,.stat-card{min-width:0!important;padding:15px!important}
.stat b,.stat-card b{font-size:23px!important}
.form{width:100%!important;max-width:none!important}
.field{min-width:0!important}
.field input,.field textarea,.field select{width:100%!important;max-width:100%!important;min-width:0!important;font-size:16px!important}
textarea{max-width:100%!important;resize:vertical!important}
.row{max-width:100%!important;flex-wrap:wrap!important}
.row>.primary,.row>.secondary{flex:1 1 150px!important}
.toolbar{display:grid!important;grid-template-columns:1fr!important;width:100%!important}
.toolbar input,.toolbar select,.toolbar button{width:100%!important;min-width:0!important}
.preview-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.modal{padding:10px!important;align-items:flex-end!important}
.modal-card{width:100%!important;max-width:100%!important;max-height:92dvh!important;padding:18px!important;border-radius:22px 22px 14px 14px!important}
img,video{max-width:100%!important}
#toast{left:12px!important;right:12px!important;bottom:12px!important;width:auto!important;max-width:none!important}
.listing-editor{width:100%!important;max-width:100%!important}
.listing-editor-form{grid-template-columns:1fr!important}
.listing-editor-form .field{grid-column:1!important;min-width:0!important}
.listing-editor-form>.primary{width:100%!important}
.listing-page [style*="grid-template-columns:minmax(0,1fr) 360px"]{grid-template-columns:1fr!important}
.wrap [style*="grid-template-columns:repeat(2,minmax(0,1fr))"]{grid-template-columns:1fr!important}
.wrap [style*="grid-template-columns:1fr 1fr"]{grid-template-columns:1fr!important}
.wrap [style*="max-width:860px"]{max-width:100%!important}
.wrap [style*="max-width:560px"]{max-width:100%!important}
.account-wow{width:100%!important}
.admin-support-wow{width:100%!important}
.admin-settings-wow{width:100%!important}
.admin-owner-wow{width:100%!important}
.admin-dashboard-wow{width:100%!important}
}
@media(max-width:420px){
.wrap{padding-left:10px!important;padding-right:10px!important}
.stats{grid-template-columns:1fr!important}
.hero{padding:18px 14px!important}
.hero h1{font-size:24px!important}
.panel{padding:14px!important}
.preview-grid{gap:7px!important}
.wrap [style*="grid-template-columns:minmax(105px,140px) minmax(0,1fr)"]{grid-template-columns:1fr!important}
.wrap [style*="grid-template-columns:105px minmax(0,1fr)"]{grid-template-columns:1fr!important}
}



/* CHAT MOBILE FINAL */

.chat-avito-mobile-back{
  display:none;
}

@media(max-width:900px){

  body:has(.chat-avito-screen){
    overflow:hidden!important;
    background:#f5f5f5!important;
  }

  body:has(.chat-avito-screen) header{
    display:none!important;
  }

  .chat-avito-screen{
    width:100%!important;
    max-width:none!important;
    height:100dvh!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }

  .chat-avito-old-topbar{
    display:none!important;
  }

  .chat-avito-panel{
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    max-width:none!important;
    height:100dvh!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    overflow:hidden!important;
    background:#fff!important;
  }

  .chat-avito-peerbar{
    flex:0 0 auto!important;
    width:100%!important;
    min-height:64px!important;
    margin:0!important;
    padding:9px 10px!important;
    gap:9px!important;
    border-bottom:1px solid #eceef0!important;
    background:#fff!important;
    box-shadow:0 1px 4px rgba(0,0,0,.04)!important;
    z-index:5!important;
  }

  .chat-avito-mobile-back{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    padding:0!important;
    border:0!important;
    border-radius:50%!important;
    background:transparent!important;
    font-size:25px!important;
    color:#202124!important;
  }

  .chat-avito-peerbar>div{
    min-width:0!important;
  }

  .chat-avito-messages{
    flex:1 1 auto!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:14px 10px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    background:#f5f5f5!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
  }

  .chat-avito-message-row{
    width:100%!important;
    margin-bottom:8px!important;
  }

  .chat-avito-bubble{
    max-width:84%!important;
    min-width:0!important;
    padding:9px 12px!important;
    border-radius:16px!important;
    box-shadow:none!important;
    font-size:15px!important;
    line-height:1.4!important;
    overflow-wrap:anywhere!important;
  }

  .chat-avito-message-row[style*="flex-end"] .chat-avito-bubble{
    background:#dff3e9!important;
    color:#17231d!important;
    border:1px solid #c9e8d9!important;
    border-radius:16px 16px 4px 16px!important;
  }

  .chat-avito-message-row[style*="flex-start"] .chat-avito-bubble{
    background:#fff!important;
    color:#17231d!important;
    border:1px solid #e4e6e8!important;
    border-radius:16px 16px 16px 4px!important;
  }

  .chat-avito-quick{
    display:none!important;
  }

  .chat-avito-composer{
    flex:0 0 auto!important;
    width:100%!important;
    margin:0!important;
    padding:
      8px
      9px
      max(8px,env(safe-area-inset-bottom))
      9px!important;
    border-top:1px solid #e8eaed!important;
    background:#fff!important;
    z-index:5!important;
  }

  .chat-avito-form{
    display:grid!important;
    grid-template-columns:42px minmax(0,1fr) 44px!important;
    align-items:end!important;
    gap:7px!important;
    width:100%!important;
  }

  .chat-avito-form #chatAttachButton{
    grid-column:1!important;
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:50%!important;
    background:#f0f1f3!important;
    font-size:25px!important;
    box-shadow:none!important;
  }

  .chat-avito-form #messageText{
    grid-column:2!important;
    width:100%!important;
    min-width:0!important;
    min-height:42px!important;
    max-height:110px!important;
    margin:0!important;
    padding:10px 13px!important;
    border:1px solid #dedfe2!important;
    border-radius:21px!important;
    background:#f5f5f5!important;
    font-size:16px!important;
    line-height:1.35!important;
    box-shadow:none!important;
  }

  .chat-avito-form #chatChooseVoice,
  .chat-avito-form button[type="submit"]{
    grid-column:3!important;
    grid-row:1!important;
    width:44px!important;
    height:42px!important;
    min-width:44px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:50%!important;
    align-items:center!important;
    justify-content:center!important;
    box-shadow:none!important;
  }

  .chat-avito-form #chatChooseVoice{
    background:#f0f1f3!important;
    color:#596273!important;
    font-size:20px!important;
  }

  .chat-avito-form button[type="submit"]{
    background:#00a86b!important;
    color:#fff!important;
    font-size:19px!important;
  }

  .chat-avito-composer #chatAttachMenu{
    left:0!important;
    bottom:52px!important;
    width:min(220px,calc(100vw - 20px))!important;
    max-width:calc(100vw - 20px)!important;
  }

  .chat-avito-composer #chatAttachmentPreview{
    max-width:100%!important;
    overflow:hidden!important;
  }

}

@media(max-width:380px){

  .chat-avito-bubble{
    max-width:89%!important;
  }

  .chat-avito-messages{
    padding-left:7px!important;
    padding-right:7px!important;
  }

}


/* LISTING QUICK QUESTIONS */

.listing-quick-questions{
  margin-top:14px;
  padding:16px;
  border:1px solid #e5ebe8;
  border-radius:20px;
  background:
    linear-gradient(145deg,#ffffff 0%,#f7fbf9 100%);
  box-shadow:0 7px 24px rgba(25,55,43,.06);
}

.listing-quick-head{
  display:flex;
  align-items:center;
  gap:11px;
  margin-bottom:13px;
}

.listing-quick-icon{
  width:40px;
  height:40px;
  flex:0 0 40px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:13px;
  background:#e8f8f1;
  font-size:19px;
}

.listing-quick-title{
  color:#17231d;
  font-size:15px;
  font-weight:850;
}

.listing-quick-subtitle{
  margin-top:2px;
  color:#77837d;
  font-size:11px;
  line-height:1.35;
}

.listing-quick-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.listing-quick-chip{
  min-width:0;
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:10px 12px;
  border:1px solid #e3e9e6;
  border-radius:14px;
  background:#fff;
  color:#26342d;
  text-align:left;
  font-size:12px;
  font-weight:720;
  line-height:1.3;
  box-shadow:0 3px 10px rgba(20,50,38,.035);
  transition:.16s ease;
}

.listing-quick-chip:hover{
  transform:translateY(-1px);
  border-color:#a9ddc7;
  background:#f2fbf7;
}

.listing-quick-chip span{
  min-width:0;
}

.listing-quick-chip b{
  flex:none;
  color:#00a86b;
  font-size:21px;
  font-weight:500;
}

@media(max-width:700px){

  .listing-quick-questions{
    margin-top:12px;
    padding:14px;
    border-radius:18px;
  }

  .listing-quick-grid{
    grid-template-columns:1fr;
    gap:7px;
  }

  .listing-quick-chip{
    min-height:48px;
    padding:11px 13px;
    font-size:13px;
    border-radius:14px;
  }

  .listing-quick-title{
    font-size:16px;
  }

  .listing-quick-subtitle{
    font-size:12px;
  }

}

/* SELLER QUICK REPLIES */
@media(max-width:900px){
.chat-avito-quick{display:flex!important;align-items:center!important;gap:7px!important;width:100%!important;max-width:100%!important;margin:0 0 8px!important;padding:2px 0 4px!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important;-webkit-overflow-scrolling:touch!important}
.chat-avito-quick::-webkit-scrollbar{display:none!important}
.chat-avito-quick::before{content:"Быстрый вопрос";flex:0 0 auto!important;padding:7px 2px!important;color:#7a837e!important;font-size:11px!important;font-weight:750!important;white-space:nowrap!important}
.chat-avito-quick-reply{flex:0 0 auto!important;min-height:36px!important;padding:8px 12px!important;border:1px solid #dfe8e3!important;border-radius:999px!important;background:#f6faf8!important;color:#244036!important;font-size:12px!important;font-weight:720!important;line-height:1!important;white-space:nowrap!important;box-shadow:none!important}
.chat-avito-quick-reply:active{transform:scale(.97)!important;background:#e9f7f0!important;border-color:#b8dfcc!important}
}

@media(max-width:900px){
  .chat-avito-quick.chat-avito-quick-seller::before{
    content:"Быстрый ответ";
  }

  .chat-avito-quick.chat-avito-quick-buyer::before{
    content:"Что спросить";
  }
}


/* CHAT LISTING CONTEXT */

.chat-avito-listing-card{
  display:none;
}

@media(max-width:900px){

  .chat-avito-listing-card{
    display:flex;
    align-items:center;
    gap:11px;
    width:100%;
    min-height:72px;
    padding:9px 12px;
    border:0;
    border-bottom:1px solid #e8ecea;
    background:#fff;
    text-align:left;
    cursor:pointer;
    flex:0 0 auto;
  }

  .chat-avito-listing-photo{
    width:52px;
    height:52px;
    min-width:52px;
    border-radius:13px;
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f1f3f2;
    font-size:22px;
  }

  .chat-avito-listing-photo img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
  }

  .chat-avito-listing-info{
    flex:1;
    min-width:0;
  }

  .chat-avito-listing-title{
    margin-bottom:4px;
    color:#212622;
    font-size:13px;
    line-height:1.25;
    font-weight:720;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .chat-avito-listing-price{
    color:#111713;
    font-size:15px;
    line-height:1.2;
    font-weight:850;
  }

  .chat-avito-listing-arrow{
    flex:none;
    padding:0 3px;
    color:#8b938f;
    font-size:25px;
    font-weight:300;
  }

  .chat-avito-listing-card:active{
    background:#f7faf8;
  }
}


/* MODERN MOBILE CHAT HEADER */
@media(max-width:900px){

  .chat-avito-peerbar{
    min-height:62px!important;
    padding:8px 11px!important;
    gap:9px!important;
    background:rgba(255,255,255,.98)!important;
    border-bottom:1px solid #edf0ee!important;
    box-shadow:0 2px 12px rgba(22,34,28,.05)!important;
  }

  .chat-avito-mobile-back{
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    font-size:24px!important;
    color:#1f2924!important;
    transition:background .15s ease,transform .15s ease!important;
  }

  .chat-avito-mobile-back:active{
    background:#f0f3f1!important;
    transform:scale(.94)!important;
  }

  .chat-avito-avatar{
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    border-radius:50%!important;
    background:#e8f5ee!important;
    color:#16724b!important;
    font-size:16px!important;
    font-weight:850!important;
    box-shadow:inset 0 0 0 1px #d6eadf!important;
  }

  .chat-avito-peerinfo{
    min-width:0!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    gap:2px!important;
  }

  .chat-avito-peername{
    font-size:15px!important;
    line-height:1.2!important;
    font-weight:850!important;
    letter-spacing:-.15px!important;
    color:#17201b!important;
  }

  .chat-avito-peername span{
    color:#17201b!important;
  }

  .chat-avito-peerstatus{
    margin-top:0!important;
    font-size:11px!important;
    line-height:1.25!important;
    font-weight:650!important;
    color:#87908b!important;
  }

}


/* MODERN CHAT MESSAGES */
@media(max-width:900px){

  .chat-avito-day-divider{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    margin:13px 0 11px;
    clear:both;
  }

  .chat-avito-day-divider:first-child{
    margin-top:2px;
  }

  .chat-avito-day-divider span{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:25px;
    padding:5px 10px;
    border:1px solid rgba(210,218,214,.8);
    border-radius:999px;
    background:rgba(237,241,239,.94);
    color:#75807a;
    font-size:11px;
    line-height:1;
    font-weight:750;
    box-shadow:0 1px 3px rgba(30,45,38,.03);
  }

  .chat-avito-message-time{
    margin-top:4px!important;
    font-size:10px!important;
    line-height:1!important;
    font-weight:600!important;
    letter-spacing:.05px!important;
    color:#929b96!important;
    user-select:none;
  }

  .chat-avito-message-row[style*="flex-end"]
  .chat-avito-message-time{
    color:#71827a!important;
  }

  .chat-avito-bubble{
    transition:none!important;
  }

}


/* CHAT PREMIUM POLISH */
@media(max-width:900px){

  body:has(.chat-avito-screen){
    background:#f2f5f3!important;
  }

  .chat-avito-messages{
    padding:14px 10px 18px!important;
    background:
      radial-gradient(
        circle at 15% 5%,
        rgba(220,238,228,.42),
        transparent 30%
      ),
      radial-gradient(
        circle at 90% 95%,
        rgba(232,238,235,.65),
        transparent 34%
      ),
      #f3f6f4!important;
  }

  .chat-avito-bubble{
    max-width:82%!important;
    padding:10px 12px 8px!important;
    border-radius:18px!important;
    font-size:15px!important;
    line-height:1.42!important;
    letter-spacing:-.05px!important;
  }

  .chat-avito-message-row[style*="flex-end"]
  .chat-avito-bubble{
    background:
      linear-gradient(
        145deg,
        #dcf4e7,
        #d5efe1
      )!important;
    border:1px solid #c6e6d5!important;
    border-radius:18px 18px 5px 18px!important;
    box-shadow:
      0 2px 7px rgba(30,85,58,.06)!important;
  }

  .chat-avito-message-row[style*="flex-start"]
  .chat-avito-bubble{
    background:rgba(255,255,255,.98)!important;
    border:1px solid #e3e8e5!important;
    border-radius:18px 18px 18px 5px!important;
    box-shadow:
      0 2px 8px rgba(30,45,38,.045)!important;
  }

  .chat-avito-message-time{
    opacity:.82!important;
    margin-top:5px!important;
  }

  .chat-avito-day-divider{
    margin:15px 0 12px!important;
  }

  .chat-avito-day-divider span{
    min-height:26px!important;
    padding:5px 11px!important;
    border:1px solid rgba(210,221,216,.8)!important;
    background:rgba(255,255,255,.78)!important;
    backdrop-filter:blur(8px)!important;
    -webkit-backdrop-filter:blur(8px)!important;
    color:#748079!important;
    box-shadow:
      0 2px 8px rgba(30,45,38,.04)!important;
  }

  .chat-avito-listing-card{
    min-height:70px!important;
    padding:9px 11px!important;
    gap:11px!important;
    border-bottom:1px solid #e7ece9!important;
    background:#fbfcfb!important;
  }

  .chat-avito-listing-photo{
    width:50px!important;
    height:50px!important;
    min-width:50px!important;
    border-radius:14px!important;
    background:#edf1ef!important;
    box-shadow:
      0 1px 4px rgba(30,45,38,.08)!important;
  }

  .chat-avito-listing-title{
    font-size:13px!important;
    font-weight:760!important;
    color:#28312c!important;
  }

  .chat-avito-listing-price{
    margin-top:3px!important;
    font-size:15px!important;
    font-weight:900!important;
    color:#131a16!important;
  }

  .chat-avito-listing-arrow{
    width:30px!important;
    height:30px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:50%!important;
    background:#f0f3f1!important;
    color:#68736d!important;
    font-size:21px!important;
  }

  .chat-avito-composer{
    padding:
      8px
      9px
      max(8px,env(safe-area-inset-bottom))
      9px!important;
    border-top:1px solid #e4e9e6!important;
    background:rgba(255,255,255,.97)!important;
    box-shadow:
      0 -6px 22px rgba(30,45,38,.045)!important;
    backdrop-filter:blur(12px)!important;
    -webkit-backdrop-filter:blur(12px)!important;
  }

  .chat-avito-form #messageText{
    min-height:43px!important;
    padding:10px 14px!important;
    border:1px solid #dce3df!important;
    border-radius:22px!important;
    background:#f5f7f6!important;
    color:#17201b!important;
    box-shadow:
      inset 0 1px 2px rgba(30,45,38,.025)!important;
    transition:
      border-color .16s ease,
      background .16s ease!important;
  }

  .chat-avito-form #messageText:focus{
    outline:none!important;
    border-color:#a8d4bd!important;
    background:#fff!important;
  }

  .chat-avito-form #chatAttachButton{
    background:#edf1ef!important;
    color:#51605a!important;
    transition:
      transform .15s ease,
      background .15s ease!important;
  }

  .chat-avito-form #chatAttachButton:active{
    transform:scale(.94)!important;
    background:#e3e9e6!important;
  }

  .chat-avito-form button[type="submit"]{
    border:0!important;
    border-radius:50%!important;
    background:#159b68!important;
    color:#fff!important;
    box-shadow:
      0 4px 12px rgba(21,155,104,.22)!important;
  }

  .chat-avito-form button[type="submit"]:active{
    transform:scale(.94)!important;
  }

  .chat-avito-form #chatChooseVoice{
    border:0!important;
    border-radius:50%!important;
    background:#edf1ef!important;
    color:#44534c!important;
  }

  .chat-avito-quick{
    gap:7px!important;
    margin-bottom:7px!important;
    padding-bottom:2px!important;
  }

  .chat-avito-quick-reply{
    min-height:35px!important;
    padding:8px 12px!important;
    border:1px solid #dce7e1!important;
    border-radius:999px!important;
    background:#f8fbf9!important;
    color:#315244!important;
    font-size:12px!important;
    font-weight:750!important;
    box-shadow:
      0 1px 3px rgba(30,70,50,.035)!important;
  }

  .chat-avito-quick-reply:active{
    transform:scale(.97)!important;
    background:#eaf6f0!important;
  }

}


/* ==================================================
   MODERN MARKET HEADER
   ================================================== */

.market-header{
  position:sticky!important;
  top:0!important;
  z-index:100!important;
  width:100%!important;
  height:auto!important;
  padding:0!important;
  border-bottom:1px solid rgba(229,232,240,.92)!important;
  background:rgba(255,255,255,.88)!important;
  box-shadow:0 5px 24px rgba(35,39,60,.035)!important;
  backdrop-filter:blur(18px)!important;
  -webkit-backdrop-filter:blur(18px)!important;
}

.market-header-inner{
  width:100%;
  max-width:1220px;
  min-height:72px;
  margin:0 auto;
  padding:10px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
}

.market-logo{
  flex:none;
  padding:6px 2px;
  border:0;
  background:transparent;
  color:#252836;
  font-size:20px;
  line-height:1;
  font-weight:950;
  letter-spacing:-.8px;
  cursor:pointer;
  white-space:nowrap;
}

.market-logo span{
  margin-left:2px;
  color:#7258f6;
}

.market-nav{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
}

.market-nav button{
  position:relative;
  border:0;
  cursor:pointer;
  transition:
    background .18s ease,
    color .18s ease,
    transform .18s ease,
    box-shadow .18s ease;
}

.market-nav-btn{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:0 13px!important;
  border-radius:13px!important;
  background:transparent!important;
  color:#5f6676!important;
  font-size:13px!important;
  font-weight:800!important;
}

.market-nav-btn:hover{
  background:#f4f4f8!important;
  color:#292d3a!important;
}

.market-nav-btn.is-active{
  background:#f1efff!important;
  color:#6853dd!important;
}

.market-nav-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:17px;
  line-height:1;
}

.market-create-btn{
  min-height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:0 16px!important;
  border-radius:14px!important;
  background:linear-gradient(135deg,#7457ff,#4f82fa)!important;
  color:#fff!important;
  font-size:13px!important;
  font-weight:900!important;
  box-shadow:0 10px 25px rgba(86,82,218,.22)!important;
}

.market-create-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 30px rgba(86,82,218,.29)!important;
}

.market-create-plus{
  font-size:18px;
  line-height:1;
}

.market-account-btn{
  min-height:46px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:5px 11px 5px 6px!important;
  border:1px solid #e8eaf0!important;
  border-radius:15px!important;
  background:#fff!important;
  color:#343845!important;
  font-size:12.5px!important;
  font-weight:850!important;
  box-shadow:0 5px 18px rgba(33,38,62,.045)!important;
}

.market-account-btn:hover{
  border-color:#dcd8f6!important;
  box-shadow:0 9px 22px rgba(56,54,96,.09)!important;
}

.market-account-avatar{
  width:34px;
  height:34px;
  flex:0 0 34px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:11px;
  background:linear-gradient(135deg,#eeeaff,#e9f8ff);
  color:#6857d8;
  font-size:15px;
  font-weight:900;
}

.market-account-avatar img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

.market-account-text{
  max-width:105px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.market-unread-badge{
  position:absolute;
  top:2px;
  right:2px;
  min-width:19px;
  height:19px;
  padding:0 5px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:2px solid #fff;
  border-radius:999px;
  background:#ff4f6d;
  color:#fff;
  font-size:9px;
  line-height:1;
  font-weight:950;
  box-shadow:0 4px 10px rgba(255,79,109,.26);
}

.market-unread-badge[hidden]{
  display:none!important;
}


/* Tablet */

@media(max-width:850px){

  .market-header-inner{
    padding:9px 12px;
    gap:10px;
  }

  .market-logo{
    font-size:18px;
  }

  .market-nav{
    gap:4px;
  }

  .market-nav-btn,
  .market-create-btn{
    padding-left:10px!important;
    padding-right:10px!important;
  }

  .market-account-text{
    display:none;
  }

  .market-account-btn{
    padding-right:6px!important;
  }
}


/* Mobile */

@media(max-width:700px){

  .market-header{
    display:block!important;
  }

  .market-header-inner{
    min-height:58px;
    padding:8px 10px;
    align-items:center!important;
    flex-direction:row!important;
  }

  .market-logo{
    font-size:17px;
  }

  .market-nav{
    width:auto!important;
    flex:1;
    justify-content:flex-end;
    overflow:visible!important;
    padding:0!important;
  }

  .market-nav-btn{
    width:40px;
    min-width:40px;
    height:40px;
    min-height:40px!important;
    padding:0!important;
    border-radius:12px!important;
  }

  .market-nav-btn > span:not(.market-nav-icon):not(.market-unread-badge){
    display:none;
  }

  .market-nav-icon{
    font-size:18px;
  }

  .market-create-btn{
    width:42px;
    min-width:42px;
    height:42px;
    min-height:42px;
    padding:0!important;
    border-radius:13px!important;
  }

  .market-create-btn span:last-child{
    display:none;
  }

  .market-create-plus{
    font-size:21px;
  }

  .market-account-btn{
    width:42px;
    min-width:42px;
    height:42px;
    min-height:42px;
    padding:4px!important;
    border-radius:13px!important;
  }

  .market-account-avatar{
    width:32px;
    height:32px;
    flex-basis:32px;
    border-radius:10px;
  }

  .market-account-text{
    display:none!important;
  }

  .market-unread-badge{
    top:-2px;
    right:-3px;
  }
}


@media(max-width:390px){

  .market-header-inner{
    padding-left:8px;
    padding-right:8px;
  }

  .market-logo{
    font-size:15.5px;
  }

  .market-nav{
    gap:2px;
  }

  .market-nav-btn{
    width:36px;
    min-width:36px;
  }

  .market-create-btn,
  .market-account-btn{
    width:39px;
    min-width:39px;
  }
}


/* ==================================================
   MODERN MARKET LISTING CARDS
   ================================================== */

.market-listing-card{
  position:relative!important;
  overflow:hidden!important;
  min-width:0!important;
  border:1px solid #e8eaf0!important;
  border-radius:22px!important;
  background:#fff!important;
  cursor:pointer!important;
  box-shadow:0 9px 28px rgba(36,40,62,.06)!important;
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    border-color .2s ease!important;
}

.market-listing-card:hover{
  transform:translateY(-4px)!important;
  border-color:#dedbef!important;
  box-shadow:0 20px 46px rgba(36,40,62,.12)!important;
}

.market-card-photo{
  position:relative!important;
  overflow:hidden!important;
  height:210px!important;
  min-height:210px!important;
  background:linear-gradient(145deg,#eef1f5,#f8f9fb)!important;
}

.market-card-image{
  inset:0;
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  transition:
    opacity .22s ease,
    transform .35s ease!important;
}

.market-listing-card:hover .market-card-image{
  transform:scale(1.025);
}

.market-card-empty-photo{
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  color:#939aa8;
  font-size:11px;
  font-weight:750;
  background:
    radial-gradient(circle at 50% 25%,rgba(116,87,255,.09),transparent 35%),
    linear-gradient(145deg,#f3f4f8,#fafbfc);
}

.market-card-empty-icon{
  font-size:38px;
  filter:grayscale(.15);
}

.market-card-category{
  position:absolute;
  left:11px;
  bottom:11px;
  z-index:5;
  max-width:55%;
  overflow:hidden;
  padding:6px 9px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:999px;
  background:rgba(24,27,38,.58);
  color:#fff;
  font-size:9.5px;
  line-height:1;
  font-weight:850;
  text-overflow:ellipsis;
  white-space:nowrap;
  backdrop-filter:blur(11px);
  -webkit-backdrop-filter:blur(11px);
}

.market-card-action{
  position:absolute;
  top:10px;
  z-index:8;
  width:38px;
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0!important;
  border:1px solid rgba(255,255,255,.48)!important;
  border-radius:50%!important;
  background:rgba(255,255,255,.92)!important;
  color:#333744!important;
  box-shadow:0 5px 16px rgba(18,22,34,.13)!important;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  transition:
    transform .16s ease,
    background .16s ease!important;
}

.market-card-action:hover{
  transform:scale(1.06);
  background:#fff!important;
}

.market-card-favorite{
  left:10px;
  font-size:22px!important;
  line-height:1!important;
}

.market-card-menu{
  right:10px;
  font-size:23px!important;
  line-height:1!important;
}

.market-card-nav{
  position:absolute;
  top:50%;
  z-index:7;
  width:34px;
  height:34px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0!important;
  border:1px solid rgba(255,255,255,.32)!important;
  border-radius:50%!important;
  background:rgba(20,24,34,.52)!important;
  color:#fff!important;
  font-size:23px!important;
  line-height:1!important;
  opacity:0;
  transform:translateY(-50%);
  box-shadow:0 5px 14px rgba(0,0,0,.16)!important;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  transition:
    opacity .18s ease,
    background .18s ease!important;
}

.market-card-nav:hover{
  background:rgba(20,24,34,.72)!important;
}

.market-card-nav-prev{
  left:9px;
}

.market-card-nav-next{
  right:9px;
}

.market-card-count{
  position:absolute;
  right:11px;
  bottom:11px;
  z-index:6;
  padding:5px 8px;
  border-radius:999px;
  background:rgba(20,24,34,.55);
  color:#fff;
  font-size:9px;
  font-weight:850;
  opacity:0;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  transition:opacity .18s ease;
}

.market-card-dots{
  position:absolute;
  left:50%;
  bottom:14px;
  z-index:6;
  display:flex;
  gap:4px;
  transform:translateX(-50%);
}

.market-card-dot{
  width:5px;
  height:5px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 4px rgba(0,0,0,.3);
  transition:
    opacity .18s ease,
    transform .18s ease;
}

.market-card-body{
  padding:15px 15px 16px!important;
}

.market-card-price{
  color:#20232f;
  font-size:20px;
  line-height:1.15;
  font-weight:950;
  letter-spacing:-.35px;
}

.market-card-title{
  display:-webkit-box;
  min-height:38px;
  margin-top:7px;
  overflow:hidden;
  color:#343846;
  font-size:14px;
  line-height:1.35;
  font-weight:800;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}

.market-card-location{
  min-width:0;
  display:flex;
  align-items:center;
  gap:5px;
  margin-top:9px;
  color:#7e8491;
  font-size:11px;
  font-weight:650;
  overflow:hidden;
}

.market-card-location span:last-child{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.market-card-seller{
  min-width:0;
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:6px;
  color:#9298a4;
  font-size:10.5px;
  font-weight:650;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.market-card-seller-dot{
  width:6px;
  height:6px;
  flex:0 0 6px;
  border-radius:50%;
  background:#48ba82;
  box-shadow:0 0 0 3px rgba(72,186,130,.11);
}

.market-card-message{
  width:100%;
  min-height:39px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  margin-top:12px;
  padding:0 12px!important;
  border:1px solid #e5e1ff!important;
  border-radius:12px!important;
  background:linear-gradient(145deg,#f7f5ff,#f1f5ff)!important;
  color:#6554d4!important;
  font-size:11.5px!important;
  font-weight:850!important;
  box-shadow:none!important;
  transition:
    background .18s ease,
    transform .18s ease!important;
}

.market-card-message:hover{
  transform:translateY(-1px);
  background:linear-gradient(145deg,#f2efff,#edf3ff)!important;
}


/* Mobile cards */

@media(max-width:760px){

  .market-listing-card{
    border-radius:17px!important;
  }

  .market-card-photo{
    height:158px!important;
    min-height:158px!important;
  }

  .market-card-body{
    padding:10px 10px 11px!important;
  }

  .market-card-price{
    font-size:16px!important;
  }

  .market-card-title{
    min-height:34px;
    margin-top:5px;
    font-size:12px!important;
    line-height:1.35;
  }

  .market-card-location{
    margin-top:7px;
    font-size:9.5px;
  }

  .market-card-seller{
    font-size:9px;
  }

  .market-card-action{
    width:34px;
    height:34px;
  }

  .market-card-favorite{
    left:8px;
    top:8px;
    font-size:19px!important;
  }

  .market-card-menu{
    right:8px;
    top:8px;
    font-size:20px!important;
  }

  .market-card-category{
    left:8px;
    bottom:8px;
    max-width:62%;
    padding:5px 7px;
    font-size:8.5px;
  }

  .market-card-nav{
    display:none!important;
  }

  .market-card-count{
    display:none!important;
  }

  .market-card-dots{
    bottom:10px;
  }

  .market-card-message{
    min-height:35px;
    margin-top:9px;
    padding:0 7px!important;
    border-radius:10px!important;
    font-size:10px!important;
  }
}


@media(max-width:390px){

  .market-card-photo{
    height:145px!important;
    min-height:145px!important;
  }

  .market-card-price{
    font-size:15px!important;
  }

  .market-card-seller{
    display:none;
  }
}


/* ==================================================
   MOBILE BOTTOM NAVIGATION
   ================================================== */

.mobile-bottom-nav{
  display:none;
}

@media(max-width:700px){

  body{
    padding-bottom:
      calc(76px + env(safe-area-inset-bottom))!important;
  }

  .mobile-bottom-nav{
    position:fixed;
    left:8px;
    right:8px;
    bottom:
      calc(8px + env(safe-area-inset-bottom));
    z-index:120;
    height:64px;
    display:grid;
    grid-template-columns:
      1fr 1fr 62px 1fr 1fr;
    align-items:center;
    gap:2px;
    padding:5px 7px;
    border:1px solid rgba(222,225,234,.92);
    border-radius:22px;
    background:rgba(255,255,255,.94);
    box-shadow:
      0 16px 45px rgba(25,29,48,.16),
      0 2px 7px rgba(25,29,48,.05);
    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);
  }

  .mobile-bottom-btn{
    position:relative;
    min-width:0;
    height:52px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
    padding:0 2px!important;
    border:0!important;
    border-radius:15px!important;
    background:transparent!important;
    color:#858b99!important;
    font-size:8.5px!important;
    line-height:1!important;
    font-weight:800!important;
    transition:.16s ease!important;
  }

  .mobile-bottom-btn.is-active{
    background:#f2f0ff!important;
    color:#6853dc!important;
  }

  .mobile-bottom-icon{
    min-height:21px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:20px;
    line-height:1;
  }

  .mobile-bottom-avatar{
    width:23px;
    height:23px;
    flex:0 0 23px;
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    background:linear-gradient(135deg,#eeeaff,#eaf8ff);
    color:#6757d7;
    font-size:11px;
    font-weight:900;
  }

  .mobile-bottom-avatar img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
  }

  .mobile-bottom-create{
    position:relative;
    top:-12px;
    width:56px;
    height:56px;
    display:flex;
    align-items:center;
    justify-content:center;
    justify-self:center;
    padding:0!important;
    border:4px solid #fff!important;
    border-radius:19px!important;
    background:linear-gradient(
      135deg,
      #7457ff,
      #4e82fa
    )!important;
    color:#fff!important;
    font-size:29px!important;
    line-height:1!important;
    font-weight:500!important;
    box-shadow:
      0 12px 27px rgba(87,80,220,.32)!important;
    transition:.16s ease!important;
  }

  .mobile-bottom-create:active{
    transform:scale(.94);
  }

  .mobile-bottom-unread{
    position:absolute;
    top:2px;
    right:calc(50% - 25px);
    min-width:18px;
    height:18px;
    padding:0 4px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:2px solid #fff;
    border-radius:999px;
    background:#ff4f6d;
    color:#fff;
    font-size:8px;
    font-weight:950;
    box-shadow:0 4px 10px rgba(255,79,109,.27);
  }

  .mobile-bottom-unread[hidden]{
    display:none!important;
  }

  /* На телефоне верхняя шапка становится проще */
  .market-header .market-nav{
    display:none!important;
  }

  .market-header-inner{
    justify-content:flex-start!important;
  }

  /* В открытом чате нижнее меню не мешает */
  body:has(.chat-avito-screen){
    padding-bottom:0!important;
  }

  body:has(.chat-avito-screen) .mobile-bottom-nav{
    display:none!important;
  }

  #toast{
    bottom:
      calc(84px + env(safe-area-inset-bottom))!important;
  }
}

@media(max-width:390px){

  .mobile-bottom-nav{
    left:5px;
    right:5px;
    bottom:
      calc(5px + env(safe-area-inset-bottom));
    grid-template-columns:
      1fr 1fr 58px 1fr 1fr;
    padding-left:4px;
    padding-right:4px;
    border-radius:20px;
  }

  .mobile-bottom-btn{
    font-size:8px!important;
  }

  .mobile-bottom-create{
    width:53px;
    height:53px;
  }
}


/* ==================================================
   FAVORITES PAGE
   ================================================== */

.favorites-page{
  max-width:1220px!important;
  padding-bottom:50px!important;
}

.favorites-hero{
  position:relative;
  overflow:hidden;
  padding:27px 29px;
  border:1px solid rgba(116,87,255,.13);
  border-radius:27px;
  background:
    radial-gradient(
      circle at 90% 5%,
      rgba(255,91,127,.13),
      transparent 30%
    ),
    radial-gradient(
      circle at 5% 100%,
      rgba(116,87,255,.16),
      transparent 34%
    ),
    linear-gradient(135deg,#fff,#faf8ff);
  box-shadow:0 16px 42px rgba(42,43,78,.07);
}

.favorites-eyebrow{
  color:#826fe7;
  font-size:11px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.favorites-title{
  margin:5px 0 0;
  color:#222633;
  font-size:30px;
  line-height:1.12;
  font-weight:950;
  letter-spacing:-.7px;
}

.favorites-subtitle{
  margin-top:7px;
  color:#7d8493;
  font-size:13px;
  line-height:1.5;
}

.favorites-grid{
  grid-template-columns:
    repeat(4,minmax(0,1fr))!important;
  gap:16px!important;
}

.favorites-empty{
  margin-top:22px;
  padding:48px 24px;
  border:1px dashed #dfe2e9;
  border-radius:24px;
  background:#fafbfc;
  text-align:center;
  color:#7e8593;
}

@media(max-width:1050px){
  .favorites-grid{
    grid-template-columns:
      repeat(3,minmax(0,1fr))!important;
  }
}

@media(max-width:700px){

  .favorites-hero{
    padding:21px 18px;
    border-radius:22px;
  }

  .favorites-title{
    font-size:25px;
  }

  .favorites-grid{
    grid-template-columns:
      repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
  }
}


/* ==================================================
   MOBILE HOME LAYOUT FIX
   ================================================== */

@media(max-width:700px){

  body{
    padding-bottom:
      calc(96px + env(safe-area-inset-bottom))!important;
  }

  .home-modern{
    padding-bottom:
      calc(105px + env(safe-area-inset-bottom))!important;
  }

  /* Нижняя панель шире */
  .mobile-bottom-nav{
    left:2px!important;
    right:2px!important;
    bottom:
      calc(4px + env(safe-area-inset-bottom))!important;

    height:70px!important;

    grid-template-columns:
      1fr 1fr 60px 1fr 1fr!important;

    padding:6px 6px!important;

    border-radius:22px!important;
  }

  .mobile-bottom-btn{
    height:56px!important;
    font-size:9px!important;
  }

  .mobile-bottom-icon{
    font-size:21px!important;
  }

  .mobile-bottom-avatar{
    width:25px!important;
    height:25px!important;
    flex-basis:25px!important;
  }

  .mobile-bottom-create{
    width:58px!important;
    height:58px!important;
    top:-11px!important;
  }


  /* =========================================
     ГЛАВНАЯ — всегда 2 колонки
     ========================================= */

  .home-listings-grid{
    grid-template-columns:
      repeat(2,minmax(0,1fr))!important;

    gap:10px!important;
  }

  .home-listings-grid:not(.home-search-results)
  .market-card-photo{
    height:165px!important;
    min-height:165px!important;
  }

  .home-listings-grid:not(.home-search-results)
  .market-card-price{
    font-size:17px!important;
  }

  .home-listings-grid:not(.home-search-results)
  .market-card-title{
    font-size:12.5px!important;
  }


  /* =========================================
     ПОИСК / КАТЕГОРИЯ — 1 объявление в строку
     ========================================= */

  .home-search-results{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
  }

  .home-search-results .market-listing-card{
    display:grid!important;
    grid-template-columns:145px minmax(0,1fr)!important;
    min-height:155px!important;
    border-radius:19px!important;
  }

  .home-search-results .market-card-photo{
    width:145px!important;
    height:100%!important;
    min-height:155px!important;
    border-radius:18px 0 0 18px!important;
  }

  .home-search-results .market-card-body{
    min-width:0!important;
    padding:14px!important;
  }

  .home-search-results .market-card-price{
    font-size:20px!important;
    line-height:1.15!important;
  }

  .home-search-results .market-card-title{
    min-height:0!important;
    margin-top:7px!important;
    font-size:15px!important;
    line-height:1.35!important;
    -webkit-line-clamp:2!important;
  }

  .home-search-results .market-card-location{
    margin-top:9px!important;
    font-size:12px!important;
  }

  .home-search-results .market-card-seller{
    display:flex!important;
    margin-top:7px!important;
    font-size:11px!important;
  }

  .home-search-results .market-card-message{
    min-height:39px!important;
    margin-top:11px!important;
    font-size:11.5px!important;
  }

  .home-search-results .market-card-category{
    max-width:75%!important;
  }

  .home-search-results .market-card-dots{
    display:none!important;
  }
}


@media(max-width:390px){

  .mobile-bottom-nav{
    left:1px!important;
    right:1px!important;
  }

  .home-search-results .market-listing-card{
    grid-template-columns:125px minmax(0,1fr)!important;
  }

  .home-search-results .market-card-photo{
    width:125px!important;
  }

  .home-search-results .market-card-price{
    font-size:18px!important;
  }

  .home-search-results .market-card-title{
    font-size:14px!important;
  }
}


/* ==================================================
   MOBILE BOTTOM NAV FINAL SIZE FIX
   ================================================== */

@media(max-width:700px){

  /* Реальное место под фиксированную панель */
  #app{
    padding-bottom:
      calc(118px + env(safe-area-inset-bottom))!important;
  }

  body{
    padding-bottom:0!important;
  }

  .mobile-bottom-nav{
    left:0!important;
    right:0!important;
    bottom:0!important;

    width:100%!important;
    height:auto!important;
    min-height:78px!important;

    grid-template-columns:
      minmax(0,1fr)
      minmax(0,1fr)
      56px
      minmax(0,1fr)
      minmax(0,1fr)!important;

    gap:1px!important;

    padding:
      7px
      7px
      calc(7px + env(safe-area-inset-bottom))
      7px!important;

    border-left:0!important;
    border-right:0!important;
    border-bottom:0!important;

    border-radius:
      25px 25px 0 0!important;

    background:
      rgba(255,255,255,.97)!important;

    box-shadow:
      0 -10px 34px rgba(30,34,55,.13)!important;
  }

  .mobile-bottom-btn{
    height:59px!important;
    min-width:0!important;
    gap:5px!important;

    padding:3px 1px!important;

    font-size:10.5px!important;
    font-weight:850!important;
  }

  .mobile-bottom-icon{
    font-size:22px!important;
    min-height:24px!important;
  }

  .mobile-bottom-avatar{
    width:28px!important;
    height:28px!important;
    flex-basis:28px!important;
    border-radius:9px!important;
  }

  .mobile-bottom-create{
    top:-13px!important;

    width:58px!important;
    min-width:58px!important;
    height:58px!important;

    border-radius:19px!important;
    font-size:30px!important;
  }

  .mobile-bottom-unread{
    top:0!important;
    right:calc(50% - 27px)!important;
  }

  /* Последний элемент любой страницы можно
     полностью поднять выше панели */
  .wrap{
    padding-bottom:35px!important;
  }

  body:has(.chat-avito-screen) #app{
    padding-bottom:0!important;
  }

  body:has(.chat-avito-screen) .mobile-bottom-nav{
    display:none!important;
  }

  #toast{
    bottom:
      calc(92px + env(safe-area-inset-bottom))!important;
  }


  /* На двух карточках главной немного повышаем читаемость */
  .home-listings-grid:not(.home-search-results)
  .market-card-price{
    font-size:18px!important;
  }

  .home-listings-grid:not(.home-search-results)
  .market-card-title{
    font-size:13px!important;
    line-height:1.4!important;
  }


  /* Поиск — одна широкая карточка */
  .home-search-results{
    grid-template-columns:1fr!important;
  }

  .home-search-results .market-listing-card{
    grid-template-columns:
      150px minmax(0,1fr)!important;
  }

  .home-search-results .market-card-photo{
    width:150px!important;
    min-height:165px!important;
  }

  .home-search-results .market-card-price{
    font-size:21px!important;
  }

  .home-search-results .market-card-title{
    font-size:15px!important;
  }
}

@media(max-width:390px){

  .mobile-bottom-btn{
    font-size:10px!important;
  }

  .home-search-results .market-listing-card{
    grid-template-columns:
      132px minmax(0,1fr)!important;
  }

  .home-search-results .market-card-photo{
    width:132px!important;
  }
}


/* ==================================================
   MOBILE BOTTOM NAV ABSOLUTE FINAL
   ================================================== */

@media(max-width:700px){

  nav.mobile-bottom-nav{
    display:grid!important;

    position:fixed!important;

    left:0!important;
    right:0!important;
    bottom:0!important;

    width:100vw!important;
    max-width:none!important;

    min-height:82px!important;

    margin:0!important;

    grid-template-columns:
      repeat(2,minmax(0,1fr))
      62px
      repeat(2,minmax(0,1fr))!important;

    align-items:center!important;

    gap:2px!important;

    padding:
      8px
      8px
      calc(8px + env(safe-area-inset-bottom))
      8px!important;

    overflow:visible!important;

    border-radius:
      24px 24px 0 0!important;

    background:#fff!important;

    box-shadow:
      0 -12px 34px rgba(27,31,48,.16)!important;
  }

  nav.mobile-bottom-nav
  .mobile-bottom-btn{
    width:100%!important;
    min-width:0!important;

    height:60px!important;

    padding:3px 1px!important;

    display:flex!important;

    font-size:11px!important;
  }

  nav.mobile-bottom-nav
  .mobile-bottom-create{
    display:flex!important;

    width:60px!important;
    min-width:60px!important;
    height:60px!important;

    margin:0 auto!important;

    top:-15px!important;
  }

  #app{
    padding-bottom:
      calc(125px + env(safe-area-inset-bottom))!important;
  }

  .home-modern{
    padding-bottom:
      calc(55px + env(safe-area-inset-bottom))!important;
  }

  body:has(.chat-avito-screen)
  nav.mobile-bottom-nav{
    display:none!important;
  }
}


/* ==================================================
   MODERN AUTH
   ================================================== */

.auth-modern-page{
  max-width:1080px!important;
  padding-top:34px!important;
  padding-bottom:70px!important;
}

.auth-modern-shell{
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(390px,1fr);
  overflow:hidden;
  border:1px solid #e7e8f1;
  border-radius:32px;
  background:#fff;
  box-shadow:0 24px 70px rgba(38,40,70,.11);
}

.auth-modern-side{
  position:relative;
  overflow:hidden;
  min-height:640px;
  padding:42px;
  background:
    radial-gradient(circle at 85% 10%,
      rgba(56,191,248,.25),
      transparent 28%),
    radial-gradient(circle at 5% 95%,
      rgba(116,87,255,.32),
      transparent 38%),
    linear-gradient(145deg,#25243c,#37315e);
  color:#fff;
}

.auth-modern-side::after{
  content:"";
  position:absolute;
  width:290px;
  height:290px;
  right:-150px;
  bottom:-120px;
  border:52px solid rgba(255,255,255,.055);
  border-radius:50%;
}

.auth-modern-brand,
.auth-modern-mobile-brand{
  font-size:19px;
  font-weight:950;
  letter-spacing:-.7px;
}

.auth-modern-brand span,
.auth-modern-mobile-brand span{
  margin-left:2px;
  color:#8b78ff;
}

.auth-modern-side-icon{
  width:66px;
  height:66px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-top:110px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:22px;
  background:rgba(255,255,255,.09);
  font-size:30px;
  backdrop-filter:blur(12px);
}

.auth-modern-side h1{
  max-width:390px;
  margin:24px 0 0;
  font-size:37px;
  line-height:1.08;
  font-weight:950;
  letter-spacing:-1px;
}

.auth-modern-side>p{
  max-width:390px;
  margin:14px 0 0;
  color:rgba(255,255,255,.72);
  font-size:14px;
  line-height:1.65;
}

.auth-modern-points{
  display:grid;
  gap:12px;
  margin-top:31px;
}

.auth-modern-points>div{
  display:flex;
  align-items:center;
  gap:11px;
  color:rgba(255,255,255,.84);
  font-size:12px;
  font-weight:700;
}

.auth-modern-points b{
  width:26px;
  height:26px;
  flex:0 0 26px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:9px;
  background:rgba(255,255,255,.12);
  color:#fff;
  font-size:11px;
}

.auth-modern-card{
  padding:42px;
  background:
    radial-gradient(circle at 100% 0%,
      rgba(116,87,255,.07),
      transparent 27%),
    #fff;
}

.auth-modern-mobile-brand{
  display:none;
  margin-bottom:27px;
  color:#282b38;
}

.auth-modern-eyebrow{
  color:#7d69e9;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.auth-modern-card h2{
  margin:6px 0 0;
  color:#252833;
  font-size:30px;
  line-height:1.12;
  font-weight:950;
  letter-spacing:-.7px;
}

.auth-modern-description{
  margin-top:9px;
  color:#7d8392;
  font-size:12.5px;
  line-height:1.55;
}

.auth-modern-form{
  width:100%;
  max-width:none!important;
  display:grid;
  gap:16px;
  margin-top:27px;
}

.auth-modern-field{
  display:block;
}

.auth-modern-field>span{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:7px;
  color:#3d414e;
  font-size:12px;
  font-weight:850;
}

.auth-modern-field>span small{
  color:#a0a5b1;
  font-size:9px;
  font-weight:700;
}

.auth-modern-field>span small.optional{
  color:#9b91d7;
}

.auth-modern-input-wrap{
  min-height:51px;
  display:flex;
  align-items:center;
  overflow:hidden;
  border:1px solid #e3e6ed;
  border-radius:15px;
  background:#fafbfc;
  transition:
    border-color .17s ease,
    background .17s ease,
    box-shadow .17s ease;
}

.auth-modern-input-wrap:focus-within{
  border-color:#9787f0;
  background:#fff;
  box-shadow:0 0 0 4px rgba(116,87,255,.08);
}

.auth-modern-input-icon{
  width:46px;
  flex:0 0 46px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
}

.auth-modern-input-wrap input{
  width:100%!important;
  height:49px;
  min-width:0;
  padding:0 13px 0 0!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  color:#2e323d;
  font-size:14px!important;
  box-shadow:none!important;
}

.auth-modern-input-wrap input::placeholder{
  color:#adb1bb;
}

.auth-modern-hint{
  display:block;
  margin-top:6px;
  color:#9da2ad;
  font-size:9.5px;
  line-height:1.4;
}

.auth-modern-submit{
  min-height:53px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  margin-top:3px;
  padding:0 18px!important;
  border:0!important;
  border-radius:15px!important;
  background:linear-gradient(135deg,#7457ff,#4d82fa)!important;
  color:#fff!important;
  font-size:13px!important;
  font-weight:900!important;
  box-shadow:0 13px 28px rgba(83,77,218,.24)!important;
  transition:
    transform .17s ease,
    box-shadow .17s ease,
    opacity .17s ease!important;
}

.auth-modern-submit:hover{
  transform:translateY(-1px);
  box-shadow:0 17px 34px rgba(83,77,218,.30)!important;
}

.auth-modern-submit:disabled{
  opacity:.7;
  cursor:wait;
  transform:none!important;
}

.auth-modern-legal{
  margin-top:15px;
  color:#a1a6b0;
  font-size:9.5px;
  line-height:1.5;
  text-align:center;
}

.auth-modern-switch{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  margin-top:21px;
  padding-top:19px;
  border-top:1px solid #eceef2;
  color:#888e9b;
  font-size:11px;
}

.auth-modern-switch button{
  padding:3px;
  color:#6b58dc;
  font-size:11px;
  font-weight:900;
}

.auth-modern-progress{
  display:flex;
  align-items:center;
  margin-bottom:27px;
}

.auth-modern-progress>div{
  display:flex;
  align-items:center;
  gap:6px;
  color:#a3a7b1;
  font-size:9px;
  font-weight:800;
  white-space:nowrap;
}

.auth-modern-progress b{
  width:25px;
  height:25px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:9px;
  background:#f0f1f5;
  color:#969ba7;
  font-size:10px;
}

.auth-modern-progress .active{
  color:#6956dc;
}

.auth-modern-progress .active b{
  background:#eeeaff;
  color:#6956dc;
}

.auth-modern-progress .complete{
  color:#3aa879;
}

.auth-modern-progress .complete b{
  background:#e9f8f1;
  color:#36a474;
}

.auth-modern-progress i{
  width:34px;
  height:1px;
  margin:0 9px;
  background:#e4e6eb;
}

.auth-modern-verify-card{
  width:min(520px,100%);
  margin:35px auto 0;
  border:1px solid #e7e9f0;
  border-radius:29px;
  box-shadow:0 22px 60px rgba(37,41,70,.10);
  text-align:center;
}

.auth-modern-mobile-brand.always{
  display:block;
  text-align:left;
}

.auth-modern-verify-card .auth-modern-progress{
  justify-content:center;
}

.auth-modern-verify-icon{
  width:70px;
  height:70px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:13px auto 19px;
  border-radius:24px;
  background:linear-gradient(145deg,#f0ecff,#eaf8ff);
  font-size:30px;
  box-shadow:0 10px 28px rgba(90,80,190,.09);
}

.auth-modern-code-field>span{
  justify-content:center;
}

.auth-modern-code-field input{
  width:100%;
  height:64px;
  border:1px solid #e2e4ec;
  border-radius:16px;
  outline:0;
  background:#fafbfc;
  color:#2b2e3a;
  font-size:28px;
  font-weight:900;
  letter-spacing:14px;
  text-align:center;
  transition:.17s ease;
}

.auth-modern-code-field input:focus{
  border-color:#9584ed;
  background:#fff;
  box-shadow:0 0 0 4px rgba(116,87,255,.08);
}

.auth-modern-test-code{
  display:inline-flex;
  align-items:center;
  gap:9px;
  margin-top:18px;
  padding:7px 11px;
  border-radius:999px;
  background:#f3f1ff;
  color:#7b6ad8;
  font-size:9px;
  font-weight:800;
}

.auth-modern-test-code b{
  font-size:12px;
  letter-spacing:2px;
}


/* ======================
   AUTH MOBILE
   ====================== */

@media(max-width:700px){

  body:has(.auth-modern-page)
  .mobile-bottom-nav{
    display:grid!important;
  }

  body:has(.auth-modern-page)
  #app{
    padding-bottom:calc(125px + env(safe-area-inset-bottom))!important;
  }

  .auth-modern-page{
    padding:
      14px 12px
      35px!important;
  }

  .auth-modern-shell{
    display:block;
    border-radius:25px;
  }

  .auth-modern-side{
    display:none;
  }

  .auth-modern-card{
    padding:24px 18px 25px;
  }

  .auth-modern-mobile-brand{
    display:block;
  }

  .auth-modern-card h2{
    font-size:27px;
  }

  .auth-modern-description{
    font-size:12px;
  }

  .auth-modern-form{
    gap:14px;
    margin-top:23px;
  }

  .auth-modern-input-wrap{
    min-height:54px;
  }

  .auth-modern-input-wrap input{
    height:52px;
    font-size:16px!important;
  }

  .auth-modern-submit{
    min-height:54px;
    font-size:14px!important;
  }

  .auth-modern-switch{
    margin-top:19px;
  }

  .auth-modern-verify-card{
    margin:8px auto 0;
    border-radius:25px;
  }

  .auth-modern-code-field input{
    height:68px;
    font-size:29px!important;
  }
}



/* ==================================================
   CATEGORY ENGINE / LISTING CREATOR
   ================================================== */

.category-engine-field{
  grid-column:1/-1!important;
  padding:24px!important;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(116,87,255,.07),
      transparent 26%
    ),
    #fff!important;
}

.category-engine-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.category-engine-kicker{
  color:#765fe8;
  font-size:10px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.category-engine-title{
  margin-top:5px;
  color:#252833;
  font-size:22px;
  line-height:1.15;
  font-weight:950;
  letter-spacing:-.45px;
}

.category-engine-subtitle{
  max-width:590px;
  margin-top:7px;
  color:#8b919e;
  font-size:11px;
  line-height:1.55;
}

.category-draft-status{
  flex:0 0 auto;
  padding:7px 10px;
  border-radius:999px;
  background:#edf8f2;
  color:#3f9b71;
  font-size:9px;
  font-weight:900;
}

.category-breadcrumb{
  min-height:32px;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:5px;
  margin-bottom:15px;
  padding:7px 10px;
  border-radius:11px;
  background:#f7f7fa;
  color:#9a9eaa;
  font-size:9.5px;
  font-weight:750;
}

.category-breadcrumb button{
  min-height:0!important;
  padding:3px 5px!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#6252cf!important;
  font-size:9.5px!important;
  font-weight:900!important;
}

.category-breadcrumb i{
  color:#c0c3cc;
  font-style:normal;
}

.category-root-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}

.category-root-card{
  min-width:0!important;
  min-height:82px!important;
  display:grid!important;
  grid-template-columns:36px minmax(0,1fr) 14px;
  align-items:center;
  gap:8px!important;
  padding:12px!important;
  border:1px solid #e7e9ef!important;
  border-radius:16px!important;
  background:#fbfbfd!important;
  color:#353946!important;
  box-shadow:none!important;
  text-align:left;
  transition:.16s ease!important;
}

.category-root-card:hover{
  transform:translateY(-1px);
  border-color:#d6d0f5!important;
  background:#fff!important;
}

.category-root-card.active{
  border-color:#9787ee!important;
  background:#f4f1ff!important;
  box-shadow:
    0 8px 22px rgba(91,72,190,.10)!important;
}

.category-root-icon{
  width:36px;
  height:36px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:#fff;
  font-size:20px;
  box-shadow:0 4px 12px rgba(40,44,70,.07);
}

.category-root-name{
  overflow:hidden;
  color:#343845;
  font-size:10.5px;
  font-weight:900;
  line-height:1.25;
  text-overflow:ellipsis;
}

.category-root-arrow{
  color:#a6aab5;
  font-size:18px;
}

.category-levels{
  display:grid;
  gap:14px;
  margin-top:15px;
}

.category-level{
  padding:15px;
  border:1px solid #ececf2;
  border-radius:17px;
  background:#fafafd;
}

.category-level-title{
  margin-bottom:10px;
  color:#686e7c;
  font-size:10px;
  font-weight:900;
}

.category-choice-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.category-choice-card{
  min-width:0!important;
  min-height:52px!important;
  display:grid!important;
  grid-template-columns:30px minmax(0,1fr) 14px;
  align-items:center;
  gap:9px!important;
  padding:9px 11px!important;
  border:1px solid #e2e4eb!important;
  border-radius:13px!important;
  background:#fff!important;
  color:#4b5060!important;
  box-shadow:none!important;
  text-align:left;
}

.category-choice-card.active{
  border-color:#9381ee!important;
  background:#f3f0ff!important;
  color:#5643c5!important;
}

.category-choice-icon{
  width:30px;
  height:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:9px;
  background:#f3f4f7;
  font-size:16px;
}

.category-choice-card span:nth-child(2){
  overflow:hidden;
  font-size:10.5px;
  font-weight:850;
  line-height:1.3;
}

.category-choice-card b{
  color:#a8acb7;
  font-size:17px;
}

.category-dynamic-fields{
  margin-top:15px;
}

.category-characteristics{
  overflow:hidden;
  border:1px solid #e5e7ee;
  border-radius:19px;
  background:#fff;
}

.category-characteristics-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:17px 18px;
  border-bottom:1px solid #eeeeF3;
  background:
    linear-gradient(
      135deg,
      #fbfaff,
      #f8fbff
    );
}

.category-characteristics-title{
  margin-top:3px;
  color:#303440;
  font-size:16px;
  font-weight:950;
}

.category-characteristics-head>span{
  padding:6px 9px;
  border-radius:999px;
  background:#eeeaff;
  color:#705ed7;
  font-size:8.5px;
  font-weight:900;
}

.category-attributes-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  padding:17px;
}

.category-attribute{
  min-width:0;
}

.category-attribute-label{
  display:flex!important;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:6px!important;
  color:#555b69!important;
  font-size:10px!important;
  font-weight:850!important;
}

.category-attribute-label b{
  color:#7b68dc;
  font-size:7.5px;
  font-weight:900;
  text-transform:uppercase;
}

.category-attribute-label small{
  margin:0!important;
  color:#a3a7b1!important;
  font-size:8px!important;
}

.category-attribute-control{
  position:relative;
}

.category-attribute-control input,
.category-attribute-control select{
  width:100%!important;
  min-height:48px!important;
  box-sizing:border-box!important;
  padding:
    0 44px
    0 12px!important;
  border:1px solid #e1e4eb!important;
  border-radius:13px!important;
  background:#fafbfc!important;
  color:#303440!important;
  font-size:12px!important;
  outline:none!important;
}

.category-attribute-control input:focus,
.category-attribute-control select:focus{
  border-color:#9483ef!important;
  background:#fff!important;
  box-shadow:
    0 0 0 4px rgba(116,87,255,.07)!important;
}

.category-attribute-unit{
  position:absolute;
  top:50%;
  right:11px;
  transform:translateY(-50%);
  pointer-events:none;
  color:#999eaa;
  font-size:9px;
  font-weight:800;
}

.category-ready-card,
.category-next-hint{
  display:flex;
  align-items:center;
  gap:12px;
  padding:15px;
  border-radius:15px;
}

.category-ready-card{
  background:#edf9f3;
  color:#348b66;
}

.category-next-hint{
  background:#f5f2ff;
  color:#6855cb;
}

.category-ready-card>span,
.category-next-hint>span{
  width:34px;
  height:34px;
  flex:0 0 34px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:11px;
  background:rgba(255,255,255,.8);
  font-size:16px;
}

.category-ready-card b,
.category-next-hint b{
  display:block;
  font-size:10.5px;
}

.category-ready-card small,
.category-next-hint small{
  display:block;
  margin-top:3px!important;
  color:inherit!important;
  opacity:.72;
  font-size:9px!important;
}


/* ==========================
   CATEGORY ENGINE MOBILE
   ========================== */

@media(max-width:700px){

  .category-engine-field{
    padding:17px!important;
  }

  .category-engine-header{
    display:block;
  }

  .category-engine-title{
    font-size:20px;
  }

  .category-draft-status{
    display:inline-flex;
    margin-top:10px;
  }

  .category-root-grid{
    grid-template-columns:
      repeat(2,minmax(0,1fr));
    gap:8px;
  }

  .category-root-card{
    min-height:72px!important;
    grid-template-columns:
      34px minmax(0,1fr) 11px;
    padding:10px!important;
    border-radius:14px!important;
  }

  .category-root-icon{
    width:34px;
    height:34px;
    font-size:18px;
  }

  .category-root-name{
    font-size:10px;
  }

  .category-choice-grid{
    grid-template-columns:1fr;
  }

  .category-choice-card{
    min-height:51px!important;
  }

  .category-attributes-grid{
    grid-template-columns:1fr;
    gap:11px;
    padding:14px;
  }

  .category-characteristics-head{
    padding:14px;
  }

  .category-attribute-control input,
  .category-attribute-control select{
    min-height:52px!important;
    font-size:16px!important;
  }
}


/* ===== MARKETPLACE MODERN SEARCH 2026 ===== */

@media(max-width:760px){

  .home-search-shell{
    display:flex!important;
    align-items:center!important;
    flex-wrap:nowrap!important;
    gap:5px!important;

    width:100%!important;
    box-sizing:border-box!important;

    margin-top:16px!important;
    padding:5px!important;

    border:1px solid #e5e7ef!important;
    border-radius:17px!important;

    background:#ffffff!important;

    box-shadow:
      0 8px 24px rgba(31,35,48,.08)!important;
  }

  .home-search-shell:focus-within{
    border-color:#7867f5!important;

    box-shadow:
      0 0 0 3px rgba(120,103,245,.10),
      0 10px 28px rgba(31,35,48,.09)!important;
  }

  .home-search-icon{
    flex:0 0 32px!important;
    width:32px!important;
    height:42px!important;

    font-size:16px!important;
  }

  .home-search-shell #q{
    flex:1 1 auto!important;
    min-width:0!important;
    width:0!important;

    height:44px!important;
    padding:0 3px!important;

    font-size:14px!important;
  }

  .home-search-shell #visualSearchBtn{
    flex:0 0 42px!important;

    width:42px!important;
    height:42px!important;

    padding:0!important;

    border:0!important;
    border-radius:12px!important;

    background:#f0edff!important;
    color:#6757dc!important;

    font-size:19px!important;
  }

  .home-search-button{
    flex:0 0 auto!important;

    grid-column:auto!important;

    width:auto!important;
    min-width:70px!important;
    height:42px!important;

    padding:0 12px!important;

    border-radius:12px!important;

    background:
      linear-gradient(
        135deg,
        #7457ff,
        #536dfe
      )!important;

    color:#fff!important;

    font-size:12px!important;
    font-weight:900!important;

    box-shadow:
      0 6px 16px rgba(105,85,230,.24)!important;
  }

  .home-search-reset{
    flex:0 0 34px!important;

    grid-column:auto!important;

    width:34px!important;
    min-width:34px!important;
    height:34px!important;

    overflow:hidden!important;
    padding:0!important;

    font-size:0!important;

    border-radius:10px!important;
  }

  .home-search-reset::after{
    content:"×";
    font-size:19px;
    font-weight:700;
  }

}


/* ==================================================
   YOUR MARKET — MOBILE SEARCH BAR 2026
   ================================================== */

@media(max-width:760px){

  /* Компактнее верх главной */
  .home-hero{
    min-height:0!important;
    padding:18px 14px 20px!important;
    border-radius:24px!important;

    background:
      linear-gradient(
        135deg,
        #7257f6 0%,
        #645cf5 45%,
        #4f79f4 100%
      )!important;

    border:0!important;

    box-shadow:
      0 14px 34px rgba(82,78,205,.20)!important;
  }

  /* Пока убираем рекламный текст на мобильном */
  .home-eyebrow,
  .home-hero h1,
  .home-hero p{
    display:none!important;
  }

  /* Главная белая поисковая капсула */
  .home-search-shell{
    display:flex!important;
    align-items:center!important;
    flex-wrap:nowrap!important;

    width:100%!important;
    height:64px!important;

    box-sizing:border-box!important;

    margin:0!important;
    padding:6px 8px 6px 12px!important;

    gap:5px!important;

    border:0!important;
    border-radius:22px!important;

    background:#fff!important;

    box-shadow:
      0 8px 24px rgba(31,32,54,.16)!important;
  }

  .home-search-shell:focus-within{
    border:0!important;

    box-shadow:
      0 8px 28px rgba(31,32,54,.18),
      0 0 0 3px rgba(255,255,255,.20)!important;
  }

  /* Лупа */
  .home-search-icon{
    flex:0 0 42px!important;

    width:42px!important;
    height:52px!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    padding:0!important;

    color:#7257ef!important;
    font-size:23px!important;
  }

  /* Поле */
  .home-search-shell #q{
    flex:1 1 auto!important;

    min-width:0!important;
    width:0!important;
    height:52px!important;

    padding:0 5px!important;

    border:0!important;
    outline:0!important;

    background:transparent!important;

    color:#272a35!important;

    font-size:17px!important;
    font-weight:750!important;

    box-shadow:none!important;
  }

  .home-search-shell #q::placeholder{
    color:#8a72ef!important;
    opacity:1!important;
    font-weight:750!important;
  }

  /* Камера */
  .home-search-shell #visualSearchBtn{
    flex:0 0 50px!important;

    width:50px!important;
    height:50px!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    padding:0!important;
    margin:0!important;

    border:0!important;
    border-radius:16px!important;

    background:transparent!important;

    color:#7257ef!important;

    font-size:25px!important;

    box-shadow:none!important;
  }

  .home-search-shell #visualSearchBtn:active{
    background:#f2efff!important;
    transform:scale(.94);
  }

  /* Кнопку Найти оставляем в DOM для JS,
     но визуально скрываем */
  .home-search-button{
    position:absolute!important;

    width:1px!important;
    height:1px!important;
    min-width:0!important;

    overflow:hidden!important;

    padding:0!important;
    margin:0!important;

    opacity:0!important;
    pointer-events:none!important;
  }

  /* После введённого запроса вместо слова
     "Сбросить" показываем компактный крестик */
  .home-search-reset{
    flex:0 0 38px!important;

    width:38px!important;
    height:38px!important;
    min-width:38px!important;

    overflow:hidden!important;

    padding:0!important;
    margin:0!important;

    border:0!important;
    border-radius:50%!important;

    background:#f1effa!important;

    color:#77718e!important;

    font-size:0!important;
  }

  .home-search-reset::after{
    content:"×";

    display:flex;
    align-items:center;
    justify-content:center;

    width:100%;
    height:100%;

    font-size:22px;
    line-height:1;
    font-weight:500;
  }

}


/* ==================================================
   FIX — SEARCH LIKE REFERENCE
   ================================================== */

@media(max-width:760px){

  .home-hero{
    min-height:0!important;
    margin:0!important;
    padding:16px 18px!important;

    border:0!important;
    border-radius:0!important;

    background:transparent!important;
    box-shadow:none!important;
  }

  .home-hero::after{
    display:none!important;
  }

  .home-hero-content{
    width:100%!important;
    max-width:none!important;
  }

  .home-eyebrow,
  .home-hero h1,
  .home-hero p{
    display:none!important;
  }

  .home-search-shell{
    position:relative!important;

    display:flex!important;
    align-items:center!important;
    flex-wrap:nowrap!important;

    width:100%!important;
    height:64px!important;
    min-height:64px!important;

    box-sizing:border-box!important;

    margin:0!important;
    padding:6px 10px!important;

    gap:0!important;

    border:1px solid #ececf2!important;
    border-radius:22px!important;

    background:#fff!important;

    box-shadow:
      0 8px 25px rgba(30,35,50,.09)!important;

    overflow:hidden!important;
  }

  .home-search-icon{
    position:static!important;

    flex:0 0 43px!important;

    width:43px!important;
    height:52px!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    margin:0!important;
    padding:0!important;

    color:#7457f5!important;
    font-size:22px!important;
  }

  .home-search-shell #q{
    position:static!important;

    display:block!important;

    flex:1 1 auto!important;

    width:0!important;
    min-width:0!important;
    height:52px!important;

    box-sizing:border-box!important;

    margin:0!important;
    padding:0 8px!important;

    border:0!important;
    outline:0!important;

    background:transparent!important;

    color:#282b38!important;

    font-size:17px!important;
    font-weight:750!important;
    line-height:52px!important;

    box-shadow:none!important;
  }

  .home-search-shell #q::placeholder{
    color:#735bea!important;
    opacity:1!important;
    font-weight:750!important;
  }

  .home-search-shell #visualSearchBtn{
    position:static!important;

    flex:0 0 52px!important;

    width:52px!important;
    height:52px!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    box-sizing:border-box!important;

    margin:0!important;
    padding:0!important;

    border:0!important;
    border-radius:16px!important;

    background:transparent!important;

    color:#7457f5!important;

    font-size:25px!important;
    line-height:1!important;

    box-shadow:none!important;
  }

  .home-search-shell #visualSearchBtn:active{
    background:#f2efff!important;
  }

  .home-search-button{
    position:absolute!important;

    left:-9999px!important;
    top:auto!important;

    display:block!important;

    width:1px!important;
    height:1px!important;
    min-width:0!important;
    min-height:0!important;

    margin:0!important;
    padding:0!important;

    opacity:0!important;
    pointer-events:none!important;
  }

  .home-search-reset{
    position:static!important;

    flex:0 0 34px!important;

    grid-column:auto!important;

    width:34px!important;
    min-width:34px!important;
    height:34px!important;

    margin:0 2px!important;
    padding:0!important;

    border:0!important;
    border-radius:50%!important;

    background:#f2f1f7!important;

    color:#777b88!important;

    font-size:0!important;
  }

  .home-search-reset::after{
    content:"×"!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    width:34px!important;
    height:34px!important;

    font-size:20px!important;
  }

}

/* ==================================================
   FINAL MOBILE SEARCH — YOUR MARKET
   ================================================== */

@media screen and (max-width:760px){

  .home-modern .home-hero{
    display:block!important;
    min-height:0!important;
    height:auto!important;
    margin:0!important;
    padding:14px 16px!important;
    overflow:visible!important;

    border:0!important;
    border-radius:0!important;

    background:transparent!important;
    box-shadow:none!important;
  }

  .home-modern .home-hero-content{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
  }

  .home-modern .home-eyebrow,
  .home-modern .home-hero h1,
  .home-modern .home-hero p{
    display:none!important;
  }

  .home-modern .home-search-shell{
    position:relative!important;

    display:flex!important;
    align-items:center!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;

    width:100%!important;
    max-width:100%!important;
    height:64px!important;
    min-height:64px!important;

    box-sizing:border-box!important;

    margin:0!important;
    padding:5px 7px 5px 10px!important;

    gap:2px!important;

    overflow:visible!important;

    border:1px solid #e5e5ec!important;
    border-radius:22px!important;

    background:#fff!important;

    box-shadow:
      0 7px 24px rgba(26,30,45,.10)!important;
  }

  /* ЛУПА */

  .home-modern .home-search-icon{
    position:static!important;

    display:flex!important;
    visibility:visible!important;
    opacity:1!important;

    flex:0 0 42px!important;

    width:42px!important;
    min-width:42px!important;
    height:52px!important;

    align-items:center!important;
    justify-content:center!important;

    margin:0!important;
    padding:0!important;

    color:#7057e8!important;

    font-size:22px!important;
    line-height:1!important;
  }

  /* ТЕКСТ ПОИСКА */

  .home-modern .home-search-shell input#q{
    position:static!important;

    display:block!important;
    visibility:visible!important;
    opacity:1!important;

    flex:1 1 0!important;

    width:auto!important;
    min-width:0!important;
    height:52px!important;

    box-sizing:border-box!important;

    margin:0!important;
    padding:0 6px!important;

    border:0!important;
    outline:0!important;

    background:transparent!important;

    color:#171923!important;
    -webkit-text-fill-color:#171923!important;
    caret-color:#7057e8!important;

    font-family:inherit!important;
    font-size:16px!important;
    font-weight:700!important;
    line-height:normal!important;

    box-shadow:none!important;
  }

  .home-modern .home-search-shell input#q::placeholder{
    color:#7b65df!important;
    -webkit-text-fill-color:#7b65df!important;

    opacity:1!important;

    font-weight:700!important;
  }

  /* AI КАМЕРА */

  .home-modern .home-search-shell button#visualSearchBtn{
    position:static!important;

    display:flex!important;
    visibility:visible!important;
    opacity:1!important;

    flex:0 0 52px!important;

    width:52px!important;
    min-width:52px!important;
    max-width:52px!important;

    height:52px!important;
    min-height:52px!important;

    align-items:center!important;
    justify-content:center!important;

    box-sizing:border-box!important;

    margin:0!important;
    padding:0!important;

    overflow:visible!important;

    border:0!important;
    border-radius:16px!important;

    background:#f4f1ff!important;

    color:#7057e8!important;

    font-size:25px!important;
    line-height:1!important;

    box-shadow:none!important;

    cursor:pointer!important;
    pointer-events:auto!important;

    z-index:10!important;
  }

  .home-modern .home-search-shell button#visualSearchBtn:active{
    background:#e9e3ff!important;
    transform:scale(.94)!important;
  }

  /* Скрытая старая кнопка Найти */

  .home-modern .home-search-shell button#find{
    position:absolute!important;

    left:-10000px!important;
    top:0!important;

    display:block!important;

    width:1px!important;
    min-width:1px!important;
    height:1px!important;
    min-height:1px!important;

    padding:0!important;
    margin:0!important;

    overflow:hidden!important;

    opacity:0!important;

    pointer-events:none!important;
  }

  /* КРЕСТИК ПРИ АКТИВНОМ ПОИСКЕ */

  .home-modern .home-search-shell #resetSearch{
    position:static!important;

    display:flex!important;
    visibility:visible!important;
    opacity:1!important;

    flex:0 0 34px!important;

    width:34px!important;
    min-width:34px!important;
    height:34px!important;

    align-items:center!important;
    justify-content:center!important;

    padding:0!important;
    margin:0 2px!important;

    overflow:hidden!important;

    border:0!important;
    border-radius:50%!important;

    background:#f0eff5!important;

    color:#626673!important;

    font-size:0!important;

    pointer-events:auto!important;
  }

  .home-modern .home-search-shell #resetSearch::after{
    content:"×"!important;

    display:block!important;

    width:auto!important;
    height:auto!important;

    color:#626673!important;

    font-size:21px!important;
    font-weight:500!important;
    line-height:1!important;
  }

}


/* ===== HOME CATEGORIES 2026 ===== */

.home-category-grid{
  gap:14px!important;
}

.home-category{
  position:relative!important;
  overflow:hidden!important;

  min-height:150px!important;
  padding:0!important;

  border:1px solid #e8e9ef!important;
  border-radius:24px!important;

  background:#fff!important;

  box-shadow:
    0 8px 25px rgba(31,35,48,.06)!important;
}

.home-category-icon{
  position:relative!important;

  width:100%!important;
  height:102px!important;

  display:flex!important;
  align-items:center!important;
  justify-content:center!important;

  border-radius:0!important;

  background:
    radial-gradient(
      circle at 50% 65%,
      rgba(116,87,255,.16),
      transparent 55%
    ),
    linear-gradient(
      145deg,
      #f7f5ff,
      #eef5ff
    )!important;

  font-size:52px!important;

  transform:none!important;
}

.home-category-name{
  display:block!important;

  width:auto!important;

  padding:13px 14px 15px!important;

  overflow:visible!important;

  color:#252936!important;

  font-size:13px!important;
  font-weight:900!important;

  line-height:1.2!important;

  white-space:normal!important;
  text-overflow:clip!important;
}

.home-category.active{
  border-color:#7660ee!important;

  box-shadow:
    0 0 0 2px rgba(116,87,255,.10),
    0 12px 28px rgba(77,65,160,.13)!important;
}

.home-category.active::after{
  content:"✓";

  position:absolute;
  top:9px;
  right:9px;

  width:25px;
  height:25px;

  display:flex;
  align-items:center;
  justify-content:center;

  border-radius:50%;

  background:#7057e8;
  color:#fff;

  font-size:13px;
  font-weight:900;

  box-shadow:0 5px 12px rgba(83,67,190,.25);
}

@media(max-width:760px){

  .home-category-grid{
    gap:11px!important;
  }

  .home-category{
    flex:0 0 138px!important;

    width:138px!important;
    min-height:154px!important;

    border-radius:22px!important;
  }

  .home-category-icon{
    height:103px!important;
    font-size:54px!important;
  }

  .home-category-name{
    padding:13px!important;

    font-size:13px!important;
    font-weight:900!important;
  }

}


/* ===== CATEGORY SVG ICONS ===== */

.home-category-icon svg{
  width:64px;
  height:64px;

  fill:none;
  stroke:#6652d9;
  stroke-width:2.5;
  stroke-linecap:round;
  stroke-linejoin:round;

  filter:
    drop-shadow(0 5px 8px rgba(80,64,170,.12));

  transition:
    transform .22s ease,
    filter .22s ease;
}

.home-category:hover .home-category-icon svg{
  transform:scale(1.07) translateY(-2px);

  filter:
    drop-shadow(0 8px 10px rgba(80,64,170,.18));
}

.home-category-icon{
  background:
    radial-gradient(
      circle at 50% 60%,
      rgba(116,87,255,.17),
      transparent 48%
    ),
    linear-gradient(
      145deg,
      #faf9ff,
      #eef4ff
    )!important;
}

@media(max-width:760px){

  .home-category-icon svg{
    width:67px;
    height:67px;
  }

}


/* ===== REAL CATEGORY PHOTOS ===== */

.home-category-icon{
  overflow:hidden!important;
  padding:0!important;
  background:#f4f5f7!important;
}

.home-category-photo{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
  transition:transform .3s ease!important;
}

.home-category:hover .home-category-photo{
  transform:scale(1.06)!important;
}

@media(max-width:760px){
  .home-category-icon{
    height:105px!important;
  }

  .home-category-photo{
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
  }
}


/* ==================================================
   CATEGORY CARDS — REAL PHOTO FINAL
   ================================================== */

.home-category-grid{
  gap:12px!important;
}

.home-category{
  overflow:hidden!important;
  background:#fff!important;
  border:1px solid rgba(30,35,50,.06)!important;
  border-radius:22px!important;
  box-shadow:
    0 7px 22px rgba(31,38,58,.07)!important;
  transition:
    transform .2s ease,
    box-shadow .2s ease!important;
}

.home-category:active{
  transform:scale(.97)!important;
}

.home-category-icon{
  width:100%!important;
  height:112px!important;
  overflow:hidden!important;
  padding:0!important;
  border-radius:0!important;
  background:#f2f3f5!important;
}

.home-category-photo{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
  transform:scale(1.01);
  transition:transform .3s ease!important;
}

.home-category-name{
  display:flex!important;
  align-items:center!important;
  min-height:48px!important;
  padding:11px 13px 12px!important;
  margin:0!important;
  color:#252936!important;
  font-size:14px!important;
  line-height:1.15!important;
  font-weight:800!important;
}

/* Индивидуальное кадрирование фотографий */

.home-category[data-category="Авто"] .home-category-photo{
  object-position:center 55%!important;
}

.home-category[data-category="Недвижимость"] .home-category-photo{
  object-position:center 52%!important;
}

.home-category[data-category="Электроника"] .home-category-photo{
  object-position:center center!important;
}

.home-category[data-category="Дом и сад"] .home-category-photo{
  object-position:center 55%!important;
}

.home-category[data-category="Работа"] .home-category-photo{
  object-position:center 45%!important;
}

.home-category[data-category="Услуги"] .home-category-photo{
  object-position:center 40%!important;
}

.home-category[data-category="Одежда"] .home-category-photo{
  object-position:center 48%!important;
}

.home-category[data-category="Спорт"] .home-category-photo{
  object-position:center 50%!important;
}

@media(max-width:760px){

  .home-category-grid{
    gap:11px!important;
  }

  .home-category{
    flex:0 0 142px!important;
    width:142px!important;
    min-height:0!important;
    border-radius:21px!important;
  }

  .home-category-icon{
    height:108px!important;
  }

  .home-category-name{
    min-height:49px!important;
    padding:11px 13px 12px!important;
    font-size:14px!important;
  }
}


/* ==================================================
   LISTING CARD BODY — SOFT MARKET PALETTE
   ================================================== */

.market-listing-card .market-card-body{
  position:relative!important;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(255,214,232,.32),
      transparent 48%
    ),
    radial-gradient(
      circle at 0% 100%,
      rgba(213,205,255,.34),
      transparent 52%
    ),
    linear-gradient(
      145deg,
      #ffffff 0%,
      #fbf9ff 48%,
      #f8f6ff 100%
    )!important;
}

/* цена */
.market-listing-card .market-card-price{
  color:#242735!important;
}

/* название */
.market-listing-card .market-card-title{
  color:#353846!important;
}

/* город и второстепенная информация */
.market-listing-card .market-card-meta,
.market-listing-card .muted{
  color:#858a98!important;
}

/* плавный переход между фото и информацией */
.market-listing-card .market-card-body::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:1px;
  background:linear-gradient(
    90deg,
    transparent,
    rgba(116,87,255,.12),
    transparent
  );
  pointer-events:none;
}


/* ==================================================
   LISTING CARD — FULL COLOR BODY
   ================================================== */

/* Вся нижняя часть карточки */
.market-listing-card{
  background:
    radial-gradient(
      circle at 100% 15%,
      rgba(255,214,232,.42),
      transparent 48%
    ),
    radial-gradient(
      circle at 0% 100%,
      rgba(213,205,255,.42),
      transparent 55%
    ),
    linear-gradient(
      145deg,
      #ffffff 0%,
      #fbf7ff 50%,
      #f5f2ff 100%
    )!important;
}

/* Информация после фотографии */
.market-listing-card .market-card-body{
  background:transparent!important;
}

/* Нижняя зона с хэштегами */
.market-listing-card .market-card-tags,
.market-listing-card .market-card-hashtags,
.market-listing-card .listing-tags{
  background:transparent!important;
}

/* Если хэштеги находятся в отдельном footer */
.market-listing-card footer,
.market-listing-card .card-footer{
  background:transparent!important;
}

/* Сами плашки хэштегов */
.market-listing-card .market-card-tags span,
.market-listing-card .market-card-hashtags span,
.market-listing-card .listing-tags span{
  background:rgba(255,255,255,.48)!important;
  border:1px solid rgba(116,87,255,.06)!important;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}


/* ==================================================
   LISTING CARD COLOR — FINAL OVERRIDE
   ================================================== */

.market-listing-card .market-card-body{
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(255,210,230,.46) 0%,
      rgba(255,210,230,.20) 35%,
      transparent 62%
    ),
    radial-gradient(
      circle at 0% 100%,
      rgba(210,202,255,.48) 0%,
      rgba(210,202,255,.20) 38%,
      transparent 65%
    ),
    linear-gradient(
      145deg,
      #fff 0%,
      #fdf8ff 42%,
      #f7f3ff 100%
    )!important;

  /* чтобы цвет доходил до самого низа */
  flex:1 1 auto!important;
}

/* Убираем белый фон у вложенных элементов */
.market-listing-card .market-card-body > *{
  background-color:transparent;
}

/* Цена */
.market-listing-card .market-card-price{
  color:#242735!important;
}

/* Название */
.market-listing-card .market-card-title{
  color:#353846!important;
}

/* Город */
.market-listing-card .market-card-location{
  color:#858a98!important;
}

/* Продавец */
.market-listing-card .market-card-seller{
  color:#858a98!important;
}


/* HOME LISTING TAG AREA — SAME PALETTE AS CARD */
.home-modern .market-listing-card [data-smart-card-tags],
.market-listing-card [data-smart-card-tags]{
  background:
    radial-gradient(
      circle at 0% 100%,
      rgba(210,202,255,.48) 0%,
      rgba(210,202,255,.22) 42%,
      transparent 70%
    ),
    linear-gradient(
      145deg,
      #fdf8ff 0%,
      #f7f3ff 100%
    ) !important;

  border-top:0 !important;
}

/* убираем возможную белую прослойку внизу карточки */
.market-listing-card{
  overflow:hidden !important;
}


/* ==================================================
   HOME LISTINGS SECTION — SOFT MARKET PALETTE
   ================================================== */

.home-modern .home-section{
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(255,210,230,.32) 0%,
      rgba(255,210,230,.13) 34%,
      transparent 60%
    ),
    radial-gradient(
      circle at 0% 100%,
      rgba(210,202,255,.38) 0%,
      rgba(210,202,255,.15) 38%,
      transparent 66%
    ),
    linear-gradient(
      145deg,
      #ffffff 0%,
      #fdf8ff 45%,
      #f7f3ff 100%
    ) !important;

  border-radius:24px !important;
  padding:18px 14px 22px !important;
}


/* ==================================================
   HOME PAGE BACKGROUND — SOFT CONTRAST
   ================================================== */

.home-modern{
  background:
    linear-gradient(
      180deg,
      #f5f8f8 0%,
      #f1f5f6 55%,
      #f4f6f8 100%
    ) !important;
}

/* пространство между основными секциями */
.home-modern .wrap{
  background:transparent !important;
}


/* ==================================================
   FRESH LISTINGS — CONTRAST BACKGROUND FINAL
   ================================================== */

.home-modern .home-section{
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(213,225,255,.55) 0%,
      transparent 48%
    ),
    radial-gradient(
      circle at 0% 100%,
      rgba(221,235,242,.70) 0%,
      transparent 55%
    ),
    linear-gradient(
      145deg,
      #f8fafc 0%,
      #eef3f7 52%,
      #e9f0f5 100%
    ) !important;

  border:1px solid rgba(215,223,232,.75) !important;
  border-radius:24px !important;
  padding:18px 14px 22px !important;
}


/* ==================================================
   HOME PALETTE SWAP — FINAL
   ================================================== */

/* Розово-лавандовая подложка секций */
.home-modern .home-section{
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(255,210,230,.46) 0%,
      transparent 52%
    ),
    radial-gradient(
      circle at 0% 100%,
      rgba(210,202,255,.48) 0%,
      transparent 58%
    ),
    linear-gradient(
      145deg,
      #fff8fc 0%,
      #faf5ff 48%,
      #f2efff 100%
    ) !important;

  border:1px solid rgba(226,216,244,.65) !important;
}

/* Карточки объявлений — холодный голубовато-серый */
.market-listing-card .market-card-body{
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(220,232,245,.65) 0%,
      transparent 58%
    ),
    linear-gradient(
      145deg,
      #f9fbfc 0%,
      #eef4f7 52%,
      #e8f0f5 100%
    ) !important;
}

/* Низ карточки с тегами — продолжение того же цвета */
.market-listing-card [data-smart-card-tags]{
  background:
    linear-gradient(
      145deg,
      #eef4f7 0%,
      #e8f0f5 100%
    ) !important;
}

/* Карточки категорий — такая же холодная палитра */
.home-modern .home-category{
  background:
    linear-gradient(
      145deg,
      #fbfcfd 0%,
      #eef4f7 55%,
      #e8f0f5 100%
    ) !important;

  border:1px solid rgba(215,225,232,.85) !important;
}


/* ==================================================
   CARD TAGS — MATCH BLUE-GREY CARD BODY
   ================================================== */

html body .home-modern article.market-listing-card [data-smart-card-tags]{
  background:
    linear-gradient(
      180deg,
      #edf4f7 0%,
      #e8f0f5 100%
    ) !important;

  border-top:0 !important;
  box-shadow:none !important;
}

/* сами маленькие теги оставляем выделенными */
html body .home-modern article.market-listing-card [data-smart-card-tags] button{
  background:rgba(255,255,255,.60) !important;
  color:#675bc3 !important;
}


/* REMOVE WHITE LINE UNDER CARD TAGS */
.home-modern article.market-listing-card{
  border-bottom:0 !important;
  box-shadow:none !important;
}

.home-modern article.market-listing-card::before,
.home-modern article.market-listing-card::after,
.home-modern article.market-listing-card [data-smart-card-tags]::before,
.home-modern article.market-listing-card [data-smart-card-tags]::after{
  border-bottom:0 !important;
  box-shadow:none !important;
}

.home-modern article.market-listing-card [data-smart-card-tags]{
  border-bottom:0 !important;
  margin-bottom:0 !important;
}


/* ==================================================
   LISTING CARD ROOT BACKGROUND FIX
   Убирает белую полоску под тегами
   ================================================== */

html body .home-modern article.card.market-listing-card{
  background:#e8f0f5 !important;
  overflow:hidden !important;
}


/* ==================================================
   HOME CARD FAVORITE — HEART ONLY
   ================================================== */

html body .home-modern .market-card-favorite{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;

  width:auto !important;
  height:auto !important;
  min-width:0 !important;
  min-height:0 !important;
  padding:0 !important;

  font-size:34px !important;
  line-height:1 !important;

  color:#20232e !important;
  filter:drop-shadow(0 2px 3px rgba(255,255,255,.9));
}

/* нажатие без белого круга */
html body .home-modern .market-card-favorite:hover,
html body .home-modern .market-card-favorite:active,
html body .home-modern .market-card-favorite:focus{
  background:transparent !important;
  box-shadow:none !important;
}


/* FAVORITE HEART — CLEAN ICON */
html body .home-modern .market-card-favorite{
  filter:none !important;
  text-shadow:none !important;
  -webkit-filter:none !important;
  box-shadow:none !important;
}


/* ==================================================
   FAVORITE HEART — COMPLETE RESET
   ================================================== */

html body .home-modern button.market-card-action.market-card-favorite{
  position:absolute !important;
  left:8px !important;
  top:8px !important;
  z-index:10 !important;

  display:block !important;

  width:34px !important;
  height:34px !important;
  min-width:34px !important;
  min-height:34px !important;

  margin:0 !important;
  padding:0 !important;

  border:0 !important;
  border-radius:0 !important;

  background:none !important;
  background-color:transparent !important;
  background-image:none !important;

  box-shadow:none !important;
  text-shadow:none !important;

  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  filter:none !important;
  -webkit-filter:none !important;

  appearance:none !important;
  -webkit-appearance:none !important;

  transform:none !important;
  transition:none !important;

  overflow:visible !important;
}

/* SVG занимает кнопку ровно, без постороннего слоя */
html body .home-modern button.market-card-favorite svg{
  display:block !important;
  width:30px !important;
  height:30px !important;
  margin:0 !important;
  padding:0 !important;
  overflow:visible !important;
  filter:none !important;
}

/* никакой дополнительной графики вокруг сердца */
html body .home-modern button.market-card-favorite::before,
html body .home-modern button.market-card-favorite::after{
  content:none !important;
  display:none !important;
}

/* hover / active тоже полностью прозрачные */
html body .home-modern button.market-card-favorite:hover,
html body .home-modern button.market-card-favorite:active,
html body .home-modern button.market-card-favorite:focus{
  background:none !important;
  border:0 !important;
  box-shadow:none !important;
  filter:none !important;
  transform:none !important;
  outline:none !important;
}


/* ==================================================
   MOBILE BOTTOM NAV — MODERN ICONS 2026
   ================================================== */

.mobile-bottom-nav{
  background:rgba(255,255,255,.94) !important;
  border:1px solid rgba(218,222,230,.78) !important;
  box-shadow:
    0 -2px 10px rgba(28,32,45,.035),
    0 10px 35px rgba(28,32,45,.12) !important;
  backdrop-filter:blur(20px) !important;
  -webkit-backdrop-filter:blur(20px) !important;
}

/* обычные пункты */
.mobile-bottom-btn{
  color:#7b8290 !important;
}

/* SVG */
.mobile-bottom-btn .mobile-nav-svg{
  width:27px !important;
  height:27px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  color:inherit !important;
}

.mobile-bottom-btn .mobile-nav-svg svg{
  display:block;
  width:25px;
  height:25px;
  overflow:visible;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* активный раздел */
.mobile-bottom-btn.is-active{
  color:#6657d9 !important;
}

/* активная иконка чуть выразительнее */
.mobile-bottom-btn.is-active .mobile-nav-svg svg{
  stroke-width:2.15;
}

/* подписи */
.mobile-bottom-btn > span:last-child{
  font-weight:700;
}

/* центральная кнопка */
.mobile-bottom-create{
  background:
    linear-gradient(145deg,#7567e8 0%,#5c4fd0 100%) !important;

  border:4px solid rgba(255,255,255,.96) !important;

  box-shadow:
    0 8px 22px rgba(91,77,205,.30),
    0 2px 6px rgba(45,38,110,.12) !important;
}

.mobile-create-svg{
  display:flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
}

.mobile-create-svg svg{
  width:27px;
  height:27px;
  fill:none;
  stroke:#fff;
  stroke-width:2;
  stroke-linecap:round;
}

/* аватар кабинета */
.mobile-bottom-avatar{
  border:2px solid #dfe3e9 !important;
  background:#f2f5f7 !important;
  color:#59606e !important;
  box-shadow:none !important;
}

.mobile-bottom-btn.is-active .mobile-bottom-avatar{
  border-color:#7466df !important;
  background:#eeeaff !important;
  color:#6254d4 !important;
}

/* фото пользователя */
.mobile-bottom-avatar img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  border-radius:50%;
}

/* счётчик сообщений остаётся заметным */
.mobile-bottom-unread{
  background:#ef476f !important;
  color:#fff !important;
  border:2px solid #fff !important;
  box-shadow:0 3px 8px rgba(239,71,111,.25) !important;
}


/* BOTTOM ACCOUNT AVATAR — CLEAN PHOTO */
html body .mobile-bottom-nav .mobile-bottom-avatar{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  outline:0 !important;
  padding:0 !important;
  overflow:hidden !important;
}

html body .mobile-bottom-nav .mobile-bottom-avatar img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  border-radius:50% !important;
  border:0 !important;
  box-shadow:none !important;
}

/* активный кабинет — без подложки вокруг фото */
html body .mobile-bottom-nav .mobile-bottom-btn.is-active .mobile-bottom-avatar{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}

html body .mobile-bottom-nav .mobile-bottom-avatar::before,
html body .mobile-bottom-nav .mobile-bottom-avatar::after{
  content:none !important;
  display:none !important;
}


/* ==================================================
   HOME LISTINGS — MOBILE FULL WIDTH
   ================================================== */

@media (max-width:760px){

  /* Растягиваем только секцию объявлений */
  .home-modern .home-section:has(.home-listings-grid){
    margin-left:-10px !important;
    margin-right:-10px !important;
    padding-left:6px !important;
    padding-right:6px !important;
  }

  /* Две максимально широкие карточки */
  .home-modern .home-listings-grid:not(.home-search-results){
    width:100% !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:7px !important;
  }

  .home-modern .home-listings-grid:not(.home-search-results) .market-listing-card{
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
  }

}


/* ==================================================
   CHATS PAGE — PREMIUM SOFT BACKGROUND
   ================================================== */

.chats-modern-page{
  position:relative !important;
  isolation:isolate;
  min-height:calc(100vh - 80px);

  background:
    radial-gradient(
      circle at 8% 7%,
      rgba(218,207,255,.42) 0%,
      rgba(218,207,255,.15) 25%,
      transparent 48%
    ),
    radial-gradient(
      circle at 94% 32%,
      rgba(204,235,246,.48) 0%,
      rgba(204,235,246,.15) 27%,
      transparent 52%
    ),
    radial-gradient(
      circle at 20% 92%,
      rgba(255,219,234,.30) 0%,
      transparent 42%
    ),
    linear-gradient(
      160deg,
      #fbfcfd 0%,
      #f6f8fa 43%,
      #f8f6fc 72%,
      #f5f8fa 100%
    ) !important;
}

/* мягкое свечение сверху */
.chats-modern-page::before{
  content:"";
  position:absolute;
  z-index:-1;
  top:-70px;
  left:15%;
  width:70%;
  height:220px;
  pointer-events:none;

  background:
    radial-gradient(
      ellipse at center,
      rgba(119,101,229,.10),
      transparent 68%
    );

  filter:blur(22px);
}


/* CHATS BACKGROUND — FINAL */

html body #app > .chats-modern-page{
  min-height:calc(100vh - 70px) !important;

  background:
    radial-gradient(
      circle at 5% 5%,
      rgba(196,184,255,.42) 0%,
      rgba(222,214,255,.24) 22%,
      transparent 48%
    ),
    radial-gradient(
      circle at 100% 38%,
      rgba(181,226,244,.40) 0%,
      rgba(213,239,248,.22) 25%,
      transparent 52%
    ),
    radial-gradient(
      circle at 12% 88%,
      rgba(255,205,227,.27) 0%,
      transparent 43%
    ),
    linear-gradient(
      155deg,
      #faf9ff 0%,
      #f3f6fb 42%,
      #f5f9fa 68%,
      #faf5fb 100%
    ) !important;
}

@media(max-width:700px){
  html body #app > .chats-modern-page{
    padding-top:24px !important;
  }
}


/* ==================================================
   MOBILE BOTTOM GAP — FINAL FIX
   ================================================== */

@media(max-width:700px){

  /* Оставляем только необходимое место под нижнюю навигацию */
  html body #app{
    padding-bottom:
      calc(82px + env(safe-area-inset-bottom)) !important;
  }

  /* Главная — цветной фон доходит до панели */
  html body #app > .home-modern{
    margin-bottom:
      calc(-82px - env(safe-area-inset-bottom)) !important;

    padding-bottom:
      calc(100px + env(safe-area-inset-bottom)) !important;
  }

  /* Сообщения — фон также доходит до панели */
  html body #app > .chats-modern-page{
    margin-bottom:
      calc(-82px - env(safe-area-inset-bottom)) !important;

    padding-bottom:
      calc(105px + env(safe-area-inset-bottom)) !important;
  }

  /* Открытый чат остаётся как раньше */
  body:has(.chat-avito-screen) #app{
    padding-bottom:0 !important;
  }
}


/* ==================================================
   MOBILE BOTTOM CURTAIN — PERMANENT FIX
   ================================================== */

@media(max-width:700px){

  /* На главной и в сообщениях контейнер APP
     больше не создаёт белую область снизу */
  body:has(#app > .home-modern) #app,
  body:has(#app > .chats-modern-page) #app{
    padding-bottom:0 !important;
  }

  /* Убираем старую компенсацию */
  html body #app > .home-modern,
  html body #app > .chats-modern-page{
    margin-bottom:0 !important;
  }

  /* Цветной фон самой страницы продолжаем
     под фиксированную нижнюю навигацию */
  html body #app > .home-modern{
    padding-bottom:
      calc(90px + env(safe-area-inset-bottom)) !important;
  }

  html body #app > .chats-modern-page{
    padding-bottom:
      calc(90px + env(safe-area-inset-bottom)) !important;
  }

  /* Открытый чат не меняем */
  body:has(.chat-avito-screen) #app{
    padding-bottom:0 !important;
  }

}


/* MOBILE BOTTOM — REMOVE LAST VISIBLE SEAM */
@media(max-width:700px){

  html body #app > .home-modern,
  html body #app > .chats-modern-page{
    margin-bottom:-12px !important;
    padding-bottom:
      calc(102px + env(safe-area-inset-bottom)) !important;
  }

}


/* ==================================================
   HOME LISTINGS — EXTEND BACKGROUND TO BOTTOM NAV
   ================================================== */

@media(max-width:700px){

  /* Последняя цветная секция главной доходит прямо под навигацию */
  html body #app > .home-modern
  .home-section:has(.home-listings-grid){
    margin-bottom:0 !important;

    padding-bottom:
      calc(102px + env(safe-area-inset-bottom)) !important;
  }

  /* Сам контейнер главной больше не добавляет
     отдельный светлый участок после секции */
  html body #app > .home-modern{
    padding-bottom:0 !important;
    margin-bottom:0 !important;
  }

}



/* ==================================================
   MARKET CARD FAVORITE — GLOBAL CLEAN HEART
   Убирает белую кляксу под сердцем на всех карточках
   ================================================== */

html body button.market-card-action.market-card-favorite{
  background:transparent !important;
  background-color:transparent !important;
  background-image:none !important;

  border:0 !important;
  border-radius:0 !important;

  box-shadow:none !important;
  text-shadow:none !important;

  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;

  padding:0 !important;

  overflow:visible !important;
}

html body button.market-card-action.market-card-favorite:hover,
html body button.market-card-action.market-card-favorite:active,
html body button.market-card-action.market-card-favorite:focus{
  background:transparent !important;
  background-color:transparent !important;
  box-shadow:none !important;
  outline:none !important;
}

html body button.market-card-action.market-card-favorite::before,
html body button.market-card-action.market-card-favorite::after{
  content:none !important;
  display:none !important;
}


/* ==================================================
   CHAT — MODERN COMPOSER + QUICK REPLIES 2026
   ================================================== */

.chat-avito-composer{
  position:relative !important;
  padding:11px 12px 13px !important;
  border-top:1px solid rgba(218,222,231,.78) !important;
  background:
    radial-gradient(circle at 5% 0%,rgba(223,216,255,.42),transparent 35%),
    radial-gradient(circle at 95% 20%,rgba(215,237,246,.48),transparent 38%),
    linear-gradient(180deg,#ffffff 0%,#f8fafb 100%) !important;
  box-shadow:0 -10px 30px rgba(35,40,60,.045) !important;
}

/* Быстрые ответы — вся горизонтальная зона */
.chat-avito-composer > div:first-child{
  scrollbar-width:none;
}

.chat-avito-composer > div:first-child::-webkit-scrollbar{
  display:none;
}

/* Все небольшие кнопки быстрых ответов */
.chat-avito-composer button[data-message],
.chat-avito-composer button[data-quick-message],
.chat-avito-composer .chat-quick-message,
.chat-avito-composer .quick-message{
  min-height:39px !important;
  padding:0 17px !important;

  border:1px solid rgba(195,190,226,.65) !important;
  border-radius:999px !important;

  background:
    linear-gradient(135deg,
      rgba(255,255,255,.96),
      rgba(244,241,255,.94)
    ) !important;

  color:#4f486c !important;

  font-family:
    "Trebuchet MS",
    "Segoe UI",
    system-ui,
    sans-serif !important;

  font-size:13px !important;
  font-weight:700 !important;
  letter-spacing:.1px !important;

  box-shadow:
    0 4px 12px rgba(91,76,150,.055),
    inset 0 1px 0 rgba(255,255,255,.9) !important;

  transition:
    transform .14s ease,
    background .14s ease,
    box-shadow .14s ease !important;
}

.chat-avito-composer button[data-message]:active,
.chat-avito-composer button[data-quick-message]:active,
.chat-avito-composer .chat-quick-message:active,
.chat-avito-composer .quick-message:active{
  transform:scale(.96) !important;
  background:#eee9ff !important;
}

/* Нижняя строка ввода */
.chat-avito-form{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  margin-top:9px !important;
}

/* Кнопка + */
#chatAttachButton{
  width:46px !important;
  height:46px !important;

  border:1px solid rgba(215,222,228,.9) !important;
  border-radius:16px !important;

  background:
    linear-gradient(145deg,#f7fafb,#edf3f4) !important;

  color:#53636a !important;
  font-size:27px !important;
  font-weight:300 !important;

  box-shadow:
    0 5px 15px rgba(45,65,75,.07),
    inset 0 1px 0 #fff !important;
}

/* Поле сообщения */
#messageText{
  min-height:46px !important;
  padding:12px 16px !important;

  border:1px solid rgba(211,217,226,.95) !important;
  border-radius:18px !important;

  background:
    linear-gradient(145deg,#fbfcfd,#f3f6f7) !important;

  color:#262936 !important;

  font-family:
    "Trebuchet MS",
    "Segoe UI",
    system-ui,
    sans-serif !important;

  font-size:14px !important;
  font-weight:500 !important;

  box-shadow:
    inset 0 1px 3px rgba(40,50,65,.035),
    0 4px 14px rgba(40,50,65,.035) !important;

  transition:.16s ease !important;
}

#messageText::placeholder{
  color:#969da6 !important;
  font-weight:500 !important;
  letter-spacing:.1px !important;
}

#messageText:focus{
  border-color:#b9afe9 !important;
  background:#fff !important;
  box-shadow:
    0 0 0 3px rgba(116,87,255,.08),
    0 5px 16px rgba(70,60,120,.06) !important;
}

/* Голосовое */
#chatChooseVoice{
  width:46px !important;
  height:46px !important;

  border:1px solid rgba(210,205,235,.8) !important;
  border-radius:16px !important;

  background:
    linear-gradient(145deg,#faf9ff,#f0edff) !important;

  color:#6758ca !important;

  box-shadow:
    0 5px 15px rgba(80,65,145,.07) !important;
}

/* Отправить */
.chat-avito-form button[type="submit"]{
  width:46px !important;
  height:46px !important;
  border-radius:16px !important;

  background:
    linear-gradient(135deg,#765cff,#5d7df4) !important;

  box-shadow:
    0 7px 17px rgba(105,84,225,.20) !important;
}

/* Мобильная настройка */
@media(max-width:700px){
  .chat-avito-composer{
    padding-left:10px !important;
    padding-right:10px !important;
  }

  .chat-avito-form{
    gap:7px !important;
  }

  #chatAttachButton,
  #chatChooseVoice,
  .chat-avito-form button[type="submit"]{
    flex:0 0 44px !important;
    width:44px !important;
    height:44px !important;
  }

  #messageText{
    min-height:44px !important;
    border-radius:17px !important;
  }
}


/* ==================================================
   CHAT QUICK REPLIES — FINAL 2026
   ================================================== */

.chat-avito-quick{
  position:relative !important;
  display:flex !important;
  align-items:center !important;
  gap:8px !important;

  width:100% !important;
  margin:0 0 10px !important;
  padding:3px 0 4px !important;

  overflow-x:auto !important;
  overflow-y:hidden !important;

  scrollbar-width:none !important;
  -webkit-overflow-scrolling:touch;
}

.chat-avito-quick::-webkit-scrollbar{
  display:none !important;
}

/* Заголовок */
.chat-avito-quick::before{
  content:"Быстрый ответ";

  flex:0 0 auto;

  display:inline-flex;
  align-items:center;

  padding:0 5px 0 2px;

  color:#777d8b;

  font-family:
    "Trebuchet MS",
    "Segoe UI",
    system-ui,
    sans-serif;

  font-size:11px;
  font-weight:800;
  line-height:1;
  letter-spacing:.25px;

  white-space:nowrap;
}

/* Кнопки ответов */
html body .chat-avito-quick .chat-avito-quick-reply{
  flex:0 0 auto !important;

  min-height:38px !important;
  padding:0 16px !important;

  border:1px solid rgba(198,192,226,.72) !important;
  border-radius:999px !important;

  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,.98),
      rgba(244,241,255,.96)
    ) !important;

  color:#51496f !important;

  font-family:
    "Trebuchet MS",
    "Segoe UI",
    system-ui,
    sans-serif !important;

  font-size:12.5px !important;
  font-weight:700 !important;
  line-height:1.15 !important;
  letter-spacing:.1px !important;

  white-space:nowrap !important;

  box-shadow:
    0 4px 12px rgba(84,70,145,.06),
    inset 0 1px 0 rgba(255,255,255,.95) !important;

  cursor:pointer !important;

  transition:
    transform .14s ease,
    box-shadow .14s ease,
    border-color .14s ease !important;
}

html body .chat-avito-quick .chat-avito-quick-reply:active{
  transform:scale(.96) !important;

  border-color:#b9acec !important;

  background:
    linear-gradient(
      135deg,
      #f4efff,
      #ebe7ff
    ) !important;

  box-shadow:none !important;
}

/* Покупатель — лёгкий голубовато-лавандовый оттенок */
.chat-avito-quick-buyer .chat-avito-quick-reply{
  background:
    linear-gradient(135deg,#ffffff,#f1f5ff) !important;
}

/* Продавец — лёгкий лавандовый оттенок */
.chat-avito-quick-seller .chat-avito-quick-reply{
  background:
    linear-gradient(135deg,#ffffff,#f5f1ff) !important;
}

@media(max-width:700px){

  .chat-avito-quick{
    gap:7px !important;
    margin-bottom:9px !important;
  }

  .chat-avito-quick::before{
    font-size:10.5px !important;
  }

  html body .chat-avito-quick .chat-avito-quick-reply{
    min-height:37px !important;
    padding:0 15px !important;
    font-size:12px !important;
  }
}


/* ==================================================
   CHAT CONVERSATION — MODERN 2026
   ================================================== */

/* Основное полотно переписки */
html body .chat-avito-messages{
  position:relative !important;

  min-height:360px !important;

  background:
    radial-gradient(
      circle at 8% 8%,
      rgba(218,208,255,.46) 0%,
      rgba(218,208,255,.15) 24%,
      transparent 46%
    ),
    radial-gradient(
      circle at 94% 34%,
      rgba(202,232,246,.48) 0%,
      rgba(202,232,246,.14) 27%,
      transparent 50%
    ),
    radial-gradient(
      circle at 18% 92%,
      rgba(255,220,234,.28) 0%,
      transparent 40%
    ),
    linear-gradient(
      155deg,
      #faf9ff 0%,
      #f4f6fb 46%,
      #f3f8fa 100%
    ) !important;

  border-top:1px solid rgba(225,226,236,.72) !important;
  border-bottom:1px solid rgba(225,226,236,.72) !important;

  scrollbar-width:thin;
  scrollbar-color:#d7d1eb transparent;
}

/* Строки сообщений */
.chat-avito-message-row{
  position:relative;
}

/* Общая форма пузыря */
html body .chat-avito-message-row .chat-avito-bubble{
  position:relative !important;

  max-width:min(78%,520px) !important;

  padding:10px 13px 8px !important;

  font-family:
    "Trebuchet MS",
    "Segoe UI",
    system-ui,
    sans-serif !important;

  font-size:13.5px !important;
  line-height:1.48 !important;

  box-shadow:
    0 5px 16px rgba(48,50,75,.065) !important;

  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

/* Моё сообщение находится справа */
.chat-avito-message-row[style*="flex-end"] .chat-avito-bubble{
  border:1px solid rgba(103,84,218,.35) !important;

  background:
    linear-gradient(
      145deg,
      #7662e8 0%,
      #6659d9 52%,
      #5b70dc 100%
    ) !important;

  color:#fff !important;

  border-radius:18px 18px 5px 18px !important;

  box-shadow:
    0 7px 18px rgba(88,75,185,.18) !important;
}

/* Сообщение собеседника */
.chat-avito-message-row[style*="flex-start"] .chat-avito-bubble{
  border:1px solid rgba(218,220,231,.88) !important;

  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,.96),
      rgba(248,249,253,.93)
    ) !important;

  color:#30333e !important;

  border-radius:18px 18px 18px 5px !important;

  box-shadow:
    0 5px 16px rgba(45,48,70,.07) !important;
}

/* Время */
html body .chat-avito-message-time{
  margin-top:5px !important;

  font-family:
    "Trebuchet MS",
    "Segoe UI",
    system-ui,
    sans-serif !important;

  font-size:9.5px !important;
  font-weight:600 !important;
  letter-spacing:.15px !important;
}

.chat-avito-message-row[style*="flex-end"] .chat-avito-message-time{
  color:rgba(255,255,255,.72) !important;
}

.chat-avito-message-row[style*="flex-start"] .chat-avito-message-time{
  color:#9a9eaa !important;
}

/* Имя собеседника внутри пузыря */
.chat-avito-message-row[style*="flex-start"]
.chat-avito-bubble > div:first-child{
  letter-spacing:.1px;
}

/* Разделитель даты */
.chat-avito-day-divider{
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;

  margin:14px 0 !important;
}

.chat-avito-day-divider span{
  display:inline-flex !important;
  align-items:center !important;

  min-height:25px !important;
  padding:0 11px !important;

  border:1px solid rgba(214,211,229,.75) !important;
  border-radius:999px !important;

  background:rgba(255,255,255,.76) !important;

  color:#858795 !important;

  font-family:
    "Trebuchet MS",
    "Segoe UI",
    system-ui,
    sans-serif !important;

  font-size:9.5px !important;
  font-weight:700 !important;
  letter-spacing:.2px !important;

  box-shadow:0 3px 10px rgba(50,50,75,.04) !important;

  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}


/* ==================================================
   CHAT EMPTY STATE
   ================================================== */

.chat-avito-empty{
  min-height:300px;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;

  padding:35px 20px;

  text-align:center;
}

.chat-avito-empty-icon{
  width:58px;
  height:58px;

  display:flex;
  align-items:center;
  justify-content:center;

  margin-bottom:14px;

  border:1px solid rgba(196,187,235,.72);
  border-radius:21px;

  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,.96),
      rgba(236,231,255,.94)
    );

  color:#7461d9;

  font-size:24px;

  box-shadow:
    0 10px 25px rgba(91,76,160,.11),
    inset 0 1px 0 rgba(255,255,255,.95);
}

.chat-avito-empty-title{
  color:#343445;

  font-family:
    "Trebuchet MS",
    "Segoe UI",
    system-ui,
    sans-serif;

  font-size:17px;
  font-weight:800;
  letter-spacing:-.15px;
}

.chat-avito-empty-subtitle{
  max-width:280px;

  margin-top:6px;

  color:#9294a1;

  font-family:
    "Trebuchet MS",
    "Segoe UI",
    system-ui,
    sans-serif;

  font-size:11.5px;
  font-weight:500;
  line-height:1.45;
}


/* Телефон */
@media(max-width:700px){

  html body .chat-avito-messages{
    min-height:360px !important;
    padding:16px 10px !important;
  }

  html body .chat-avito-message-row .chat-avito-bubble{
    max-width:84% !important;
    font-size:13px !important;
  }

  .chat-avito-empty{
    min-height:300px;
  }

  .chat-avito-empty-icon{
    width:54px;
    height:54px;
    border-radius:19px;
  }
}


/* ==================================================
   CHAT MOBILE HEADER — ONE CLEAN HEADER
   ================================================== */

@media(max-width:700px){

  /* Старая дублирующая шапка "Чат" */
  .chat-avito-screen .chat-avito-old-topbar{
    display:none !important;
  }

  /* Основная шапка собеседника */
  html body .chat-avito-screen .chat-avito-peerbar{
    display:flex !important;
    align-items:center !important;
    gap:10px !important;

    padding:10px 12px !important;

    border-bottom:1px solid rgba(221,224,232,.78) !important;

    background:
      radial-gradient(
        circle at 100% 0%,
        rgba(215,235,245,.46),
        transparent 45%
      ),
      radial-gradient(
        circle at 0% 100%,
        rgba(229,220,255,.42),
        transparent 46%
      ),
      linear-gradient(
        145deg,
        #ffffff,
        #f8f9fd
      ) !important;
  }

  /* Кнопка назад внутри правильной шапки */
  html body .chat-avito-mobile-back{
    width:38px !important;
    height:38px !important;
    min-width:38px !important;

    display:flex !important;
    align-items:center !important;
    justify-content:center !important;

    padding:0 !important;

    border:0 !important;
    border-radius:13px !important;

    background:rgba(255,255,255,.70) !important;

    color:#454752 !important;

    font-size:21px !important;
    font-weight:500 !important;

    box-shadow:none !important;
  }

  /* Аватар */
  html body .chat-avito-avatar{
    width:46px !important;
    height:46px !important;
    min-width:46px !important;

    border:2px solid rgba(255,255,255,.94) !important;

    box-shadow:
      0 4px 13px rgba(45,48,70,.10) !important;
  }

  /* Имя */
  html body .chat-avito-peername{
    font-family:
      "Trebuchet MS",
      "Segoe UI",
      system-ui,
      sans-serif !important;

    font-size:15px !important;
    font-weight:800 !important;
    letter-spacing:-.1px !important;
  }

  html body .chat-avito-peername span{
    color:#292b35 !important;
  }

  /* Покупатель / Продавец */
  html body .chat-avito-peerstatus{
    margin-top:2px !important;

    color:#8b8e99 !important;

    font-family:
      "Trebuchet MS",
      "Segoe UI",
      system-ui,
      sans-serif !important;

    font-size:10.5px !important;
    font-weight:600 !important;
    letter-spacing:.15px !important;
  }

}

/* =========================================================
   SUPPORT CHAT — TRUE MOBILE SCREEN 2026
   ========================================================= */

.support-chat-mobile-back{
  display:none;
}

@media(max-width:700px){

  html body #app > .support-chat-screen{
    width:100% !important;
    max-width:none !important;
    min-height:calc(100dvh - 76px) !important;
    margin:0 !important;
    padding:0 !important;
    box-sizing:border-box !important;
    background:#f6f7fb !important;
  }

  /* Старый заголовок обращения больше не нужен */
  .support-chat-screen > .support-chat-page-top{
    display:none !important;
  }

  .support-chat-screen .support-chat-layout{
    display:flex !important;
    flex-direction:column !important;
    width:100% !important;
    min-height:calc(100dvh - 76px) !important;
    gap:0 !important;
    margin:0 !important;
    padding:0 !important;
  }

  /* Причина обращения остаётся в данных,
     но не занимает отдельный экранный блок */
  .support-chat-screen .support-chat-reason{
    display:none !important;
  }

  html body .support-chat-screen .support-chat-panel{
    flex:1 1 auto !important;
    display:flex !important;
    flex-direction:column !important;
    width:100% !important;
    min-width:0 !important;
    min-height:calc(100dvh - 76px) !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    background:#f6f7fb !important;
    overflow:hidden !important;
  }

  .support-chat-screen .support-chat-header{
    flex:0 0 auto !important;
    min-height:66px !important;
    padding:10px 12px !important;
    gap:10px !important;
    background:rgba(255,255,255,.96) !important;
    border-bottom:1px solid #e9ebf1 !important;
    box-shadow:0 3px 14px rgba(30,35,55,.04) !important;
  }

  .support-chat-mobile-back{
    width:38px !important;
    height:38px !important;
    flex:0 0 38px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:0 !important;
    border:0 !important;
    border-radius:12px !important;
    background:#f2f3f7 !important;
    color:#292d38 !important;
    font-size:21px !important;
    font-weight:700 !important;
    line-height:1 !important;
    box-shadow:none !important;
  }

  html body .support-chat-screen #supportMessages.support-chat-messages{
    flex:1 1 auto !important;
    width:100% !important;
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    box-sizing:border-box !important;
    overflow-y:auto !important;
    padding:16px 12px 20px !important;
    background:
      radial-gradient(circle at 100% 0%,
        rgba(226,218,255,.34),transparent 34%),
      radial-gradient(circle at 0% 100%,
        rgba(218,238,250,.42),transparent 38%),
      #f6f7fb !important;
    -webkit-overflow-scrolling:touch;
  }

  body:has(.support-chat-screen) #app{
    padding-bottom:0 !important;
  }
}


/* =========================================================
   SUPPORT CHAT — LISTING CARD
   ========================================================= */

.support-chat-listing-card{
  width:100%;
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border:0;
  border-bottom:1px solid #e8eaf0;
  background:#fff;
  color:#252833;
  text-align:left;
  cursor:pointer;
}

.support-chat-listing-photo{
  width:58px;
  height:58px;
  flex:0 0 58px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border:1px solid #e2e5eb;
  border-radius:15px;
  background:#f4f6f8;
  font-size:25px;
}

.support-chat-listing-photo img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

.support-chat-listing-info{
  flex:1;
  min-width:0;
}

.support-chat-listing-title{
  overflow:hidden;
  color:#30333d;
  font-size:13px;
  font-weight:800;
  line-height:1.3;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.support-chat-listing-price{
  margin-top:4px;
  color:#20232c;
  font-size:16px;
  font-weight:900;
}

.support-chat-listing-arrow{
  width:38px;
  height:38px;
  flex:0 0 38px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:#f5f6f9;
  color:#777e8d;
  font-size:27px;
  line-height:1;
}

@media(max-width:700px){

  .support-chat-listing-card{
    flex:0 0 auto;
    padding:10px 12px;
    background:
      linear-gradient(
        135deg,
        rgba(250,248,255,.98),
        rgba(246,251,255,.98)
      );
  }

  .support-chat-listing-photo{
    width:54px;
    height:54px;
    flex-basis:54px;
    border-radius:14px;
  }

}


/* =========================================================
   SUPPORT CHAT — MOBILE BOTTOM FIX
   Сообщения не уходят под нижнюю навигацию
   ========================================================= */

@media(max-width:700px){

  /*
    На экране поддержки убираем обычный нижний padding приложения.
    Высотой самого чата управляем отдельно.
  */
  body:has(.support-chat-screen) #app{
    padding-bottom:0 !important;
  }

  /*
    76px сверху — область верхней части приложения.
    92px снизу — нижняя навигация.
  */
  html body #app > .support-chat-screen{
    height:calc(100dvh - 76px - 92px) !important;
    min-height:0 !important;
    overflow:hidden !important;
  }

  .support-chat-screen .support-chat-layout{
    height:100% !important;
    min-height:0 !important;
    overflow:hidden !important;
  }

  html body .support-chat-screen .support-chat-panel{
    flex:1 1 auto !important;
    height:100% !important;
    min-height:0 !important;
    overflow:hidden !important;
  }

  /*
    Верх чата и карточка объявления
    остаются неподвижными.
  */
  .support-chat-screen .support-chat-header,
  .support-chat-screen .support-chat-listing-card{
    flex:0 0 auto !important;
  }

  /*
    Только сообщения занимают оставшееся место
    и прокручиваются.
  */
  html body .support-chat-screen #supportMessages.support-chat-messages{
    flex:1 1 0 !important;
    height:0 !important;
    min-height:0 !important;
    max-height:none !important;
    overflow-y:auto !important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    padding-bottom:22px !important;
  }

  /*
    Блок вложений и строка ввода не сжимаются.
  */
  .support-chat-screen #supportAttachmentPreview{
    flex:0 0 auto !important;
  }

  .support-chat-screen #supportMessageForm{
    flex:0 0 auto !important;
  }

  /*
    Контейнер формы остаётся поверх области сообщений.
  */
  .support-chat-screen #supportMessageForm{
    position:relative;
    z-index:5;
  }

}


/* =========================================================
   SUPPORT CHAT — MOBILE FINAL VISUAL TUNING
   ========================================================= */

@media(max-width:700px){

  /* ---------- ВЫСОТА ЭКРАНА ---------- */

  html body #app > .support-chat-screen{
    height:calc(100dvh - 76px - 72px) !important;
    min-height:0 !important;
    overflow:hidden !important;
  }

  .support-chat-screen .support-chat-layout{
    height:100% !important;
    min-height:0 !important;
    overflow:hidden !important;
  }

  html body .support-chat-screen .support-chat-panel{
    height:100% !important;
    min-height:0 !important;
    overflow:hidden !important;
    background:#f5f6fa !important;
  }

  /* ---------- ОБЛАСТЬ ПЕРЕПИСКИ ---------- */

  html body .support-chat-screen
  #supportMessages.support-chat-messages{
    flex:1 1 0 !important;
    height:0 !important;
    min-height:0 !important;
    max-height:none !important;

    overflow-y:auto !important;

    padding:
      20px
      16px
      26px !important;

    background:
      radial-gradient(
        circle at 100% 0%,
        rgba(116,87,255,.08),
        transparent 34%
      ),
      radial-gradient(
        circle at 0% 100%,
        rgba(70,180,230,.07),
        transparent 38%
      ),
      #f5f6fa !important;

    -webkit-overflow-scrolling:touch;
  }

  /*
    Каждый внешний контейнер сообщения.
    Даём сообщениям больше воздуха.
  */
  .support-chat-screen
  #supportMessages > div{
    margin-bottom:16px !important;
  }

  /*
    Имя отправителя "Поддержка"
  */
  .support-chat-screen
  #supportMessages > div > div > div:first-child:not(:last-child){
    color:#737a89 !important;
    font-weight:800 !important;
  }

  /*
    Текст становится чётче.
    Вложенные элементы renderChatMessageContent
    наследуют более контрастный цвет.
  */
  .support-chat-screen
  #supportMessages{
    color:#252934 !important;
  }

  /* ---------- ВЛОЖЕНИЯ ---------- */

  .support-chat-screen
  #supportMessages audio{
    max-width:100% !important;
  }

  .support-chat-screen
  #supportMessages a{
    opacity:1 !important;
  }

  /* ---------- ВРЕМЯ СООБЩЕНИЙ ---------- */

  .support-chat-screen
  #supportMessages > div > div > div:last-child{
    color:#858c9b !important;
    opacity:1 !important;
    font-size:10px !important;
    font-weight:600 !important;
  }

  /* ---------- НИЖНЯЯ СТРОКА ВВОДА ---------- */

  .support-chat-screen
  #supportMessageForm{
    gap:8px !important;
  }

  .support-chat-screen
  #supportMessageText{
    min-height:46px !important;
    height:46px;
    padding:11px 14px !important;

    border:1px solid #d9dde6 !important;
    border-radius:15px !important;

    background:#fff !important;

    color:#252934 !important;
    font-size:14px !important;

    box-shadow:
      0 3px 12px
      rgba(30,35,55,.04) !important;
  }

  .support-chat-screen
  #supportMessageText::placeholder{
    color:#858b97 !important;
    opacity:1 !important;
  }

  .support-chat-screen
  #supportAttachButton,
  .support-chat-screen
  #supportChooseVoice{
    width:46px !important;
    height:46px !important;
    flex-basis:46px !important;

    border:1px solid #dde1e8 !important;
    border-radius:15px !important;

    background:#fff !important;

    box-shadow:
      0 3px 12px
      rgba(30,35,55,.04) !important;
  }

  .support-chat-screen
  #supportMessageForm > button.primary{
    width:48px !important;
    height:46px !important;
    flex-basis:48px !important;

    border-radius:15px !important;

    background:
      linear-gradient(
        135deg,
        #7457ff,
        #5679f5
      ) !important;

    box-shadow:
      0 8px 20px
      rgba(103,87,230,.25) !important;
  }

  /*
    Родитель формы.
    Делаем его полноценной нижней панелью чата.
  */
  .support-chat-screen
  #supportMessageForm{
    padding:0 !important;
    background:#fff !important;
  }

  .support-chat-screen
  #supportMessageForm textarea{
    box-sizing:border-box !important;
  }

}

/* =========================================================
   SUPPORT CHAT — CLEAR MESSAGE BUBBLES
   ========================================================= */

.support-message-wrap{
  min-width:0;
}

.support-message-bubble{
  padding:11px 14px;
  border-radius:17px;
  font-size:14px;
  line-height:1.5;
  word-break:break-word;
}

/* Моё сообщение */
.support-message-wrap.is-mine .support-message-bubble{
  background:linear-gradient(135deg,#7457ff,#5d70ec);
  color:#fff;
  border:1px solid rgba(80,65,210,.20);
  border-bottom-right-radius:5px;
  box-shadow:0 6px 18px rgba(92,79,220,.18);
}

/* Сообщение поддержки */
.support-message-wrap.is-other .support-message-bubble{
  background:#fff;
  color:#242733;
  border:1px solid #dfe3eb;
  border-bottom-left-radius:5px;
  box-shadow:0 4px 14px rgba(30,35,55,.07);
}

.support-message-time{
  margin-top:5px !important;
  padding:0 5px !important;
  color:#8d94a2 !important;
  font-size:10px !important;
  line-height:1.2 !important;
}

/* =========================================================
   SUPPORT CHAT — MOBILE HEIGHT
   ========================================================= */

@media(max-width:700px){

  html body #app > .support-chat-screen{
    height:calc(100dvh - 76px) !important;
    min-height:0 !important;
    overflow:hidden !important;
  }

  .support-chat-screen .support-chat-layout{
    height:100% !important;
    min-height:0 !important;
    overflow:hidden !important;
  }

  html body .support-chat-screen .support-chat-panel{
    height:100% !important;
    min-height:0 !important;
    max-height:none !important;

    display:flex !important;
    flex-direction:column !important;

    overflow:hidden !important;
  }

  html body .support-chat-screen #supportMessages.support-chat-messages{
    flex:1 1 0 !important;

    height:auto !important;
    min-height:0 !important;
    max-height:none !important;

    overflow-y:auto !important;

    padding:18px 13px 14px !important;

    background:
      radial-gradient(
        circle at 100% 0%,
        rgba(224,218,255,.38),
        transparent 34%
      ),
      radial-gradient(
        circle at 0% 100%,
        rgba(220,239,250,.45),
        transparent 38%
      ),
      #f5f6fa !important;

    -webkit-overflow-scrolling:touch;
  }

  .support-message-wrap{
    max-width:84% !important;
  }

  .support-message-bubble{
    padding:11px 13px !important;
    font-size:14px !important;
  }
}


/* =========================================================
   SUPPORT CHAT — BUBBLE VISIBILITY FIX
   ========================================================= */

/* Обычный текст моего сообщения */
.support-message-wrap.is-mine .support-message-bubble,
.support-message-wrap.is-mine .support-message-bubble > div{
  color:#fff !important;
}

/* Обычный текст поддержки */
.support-message-wrap.is-other .support-message-bubble,
.support-message-wrap.is-other .support-message-bubble > div{
  color:#242733 !important;
}

/* Вложение внутри моего сообщения не должно получать
   второй огромный фиолетовый контейнер */
.support-message-wrap.is-mine .support-message-bubble > div:first-child{
  color:#fff !important;
}

/* Текст геопозиции */
.support-message-wrap.is-mine .support-message-bubble a{
  color:#fff !important;
}

.support-message-wrap.is-mine .support-message-bubble audio{
  opacity:1 !important;
}

/* Чуть компактнее сами сообщения */
.support-message-wrap.is-mine .support-message-bubble{
  background:linear-gradient(135deg,#7657f6,#586fe8) !important;
}

.support-message-wrap.is-other .support-message-bubble{
  background:#fff !important;
}

/* Имя отправителя над левым сообщением */
.support-message-wrap.is-other > div:first-child{
  color:#707786 !important;
}

/* Время делаем заметным */
.support-message-time{
  color:#858c9b !important;
  font-size:10px !important;
  font-weight:600 !important;
}

/* На телефоне уменьшаем слишком большие пузыри */
@media(max-width:700px){

  .support-message-wrap{
    max-width:82% !important;
  }

  .support-message-bubble{
    padding:10px 13px !important;
  }

  .support-message-wrap.is-mine .support-message-bubble{
    box-shadow:0 5px 14px rgba(83,68,205,.16) !important;
  }

  .support-message-wrap.is-other .support-message-bubble{
    box-shadow:0 3px 10px rgba(25,30,50,.06) !important;
  }
}



/* =========================================================
   SUPPORT CHAT — FINAL MOBILE HEIGHT FIX
   ========================================================= */

@media(max-width:700px){

  /*
    Чат заканчивается НАД нижней навигацией.
    76px — верхняя область приложения.
    92px — нижняя навигация.
  */
  html body #app > .support-chat-screen{
    height:calc(100dvh - 76px - 92px) !important;
    min-height:0 !important;
    max-height:calc(100dvh - 76px - 92px) !important;
    overflow:hidden !important;
  }

  .support-chat-screen .support-chat-layout{
    height:100% !important;
    min-height:0 !important;
    max-height:100% !important;
    overflow:hidden !important;
  }

  html body .support-chat-screen .support-chat-panel{
    height:100% !important;
    min-height:0 !important;
    max-height:100% !important;

    display:flex !important;
    flex-direction:column !important;

    overflow:hidden !important;
  }

  /* Шапка поддержки */
  .support-chat-screen .support-chat-header{
    flex:0 0 auto !important;
  }

  /* Карточка объявления */
  .support-chat-screen .support-chat-listing-card{
    flex:0 0 auto !important;
  }

  /* Только эта область прокручивается */
  html body .support-chat-screen
  #supportMessages.support-chat-messages{
    flex:1 1 0 !important;
    height:0 !important;
    min-height:0 !important;
    max-height:none !important;

    overflow-y:auto !important;
    overflow-x:hidden !important;

    padding-bottom:20px !important;

    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }

  /* Предпросмотр вложений */
  .support-chat-screen #supportAttachmentPreview{
    flex:0 0 auto !important;
  }

  /*
    Нижняя панель ввода всегда остаётся
    между сообщениями и основной навигацией.
  */
  .support-chat-screen #supportMessageForm{
    flex:0 0 auto !important;
  }

  .support-chat-screen #supportMessageForm{
    position:relative !important;
    z-index:10 !important;
  }

}


/* =========================================================
   SUPPORT CHAT — FULLSCREEN MODE
   Внутри переписки скрываем основную нижнюю навигацию
   ========================================================= */

@media(max-width:700px){

  /* В конкретной переписке поддержки главное меню не показываем */
  body:has(.support-chat-screen) .mobile-bottom-nav{
    display:none !important;
  }

  /*
    После скрытия нижней навигации больше не резервируем
    под неё 92px. Чат занимает всё оставшееся место.
  */
  html body #app > .support-chat-screen{
    height:calc(100dvh - 76px) !important;
    max-height:calc(100dvh - 76px) !important;
    min-height:0 !important;
    overflow:hidden !important;
  }

  .support-chat-screen .support-chat-layout{
    height:100% !important;
    min-height:0 !important;
    max-height:100% !important;
    overflow:hidden !important;
  }

  html body .support-chat-screen .support-chat-panel{
    height:100% !important;
    min-height:0 !important;
    max-height:100% !important;
    overflow:hidden !important;
  }

  html body .support-chat-screen
  #supportMessages.support-chat-messages{
    flex:1 1 0 !important;
    height:0 !important;
    min-height:0 !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
  }

  /*
    У приложения больше нет необходимости оставлять
    место под нижнее меню.
  */
  body:has(.support-chat-screen) #app{
    padding-bottom:0 !important;
  }

}


/* ==================================================
   YOURMARKET — HOME BRAND / MOBILE
   ================================================== */

@media (max-width:760px){

  /* На внутренних экранах верхняя шапка не занимает место */
  body:not(.market-home-view) .market-header{
    display:none!important;
  }

  /* Главная */
  body.market-home-view .market-header{
    display:block!important;
    background:#fff!important;
    border:0!important;
    box-shadow:none!important;
  }

  body.market-home-view .market-header-inner{
    min-height:0!important;
    padding:22px 18px 16px!important;
    justify-content:flex-start!important;
  }

  /* На мобильном основная навигация уже находится снизу */
  body.market-home-view .market-nav{
    display:none!important;
  }

  body.market-home-view .market-logo{
    display:inline-flex!important;
    align-items:center!important;

    margin:0!important;
    padding:0!important;

    border:0!important;
    background:transparent!important;

    color:#171922!important;

    font-size:27px!important;
    line-height:.92!important;
    font-weight:950!important;
    letter-spacing:-1.8px!important;

    cursor:pointer;
  }

  body.market-home-view .market-logo span{
    position:relative;
    margin-left:3px!important;
    color:#6c55ed!important;
    letter-spacing:-1.7px!important;
  }

  /* маленький фирменный штрих */
  body.market-home-view .market-logo span::after{
    content:"";
    position:absolute;
    left:2px;
    right:1px;
    bottom:-6px;

    height:3px;
    border-radius:999px;

    background:linear-gradient(
      90deg,
      #7457ff,
      #567cf4
    );
  }

}


/* ==================================================
   HOME — FLOATING SCROLL TO TOP
   ================================================== */

.market-home-scroll-top{
  position:fixed;

  right:17px;
  bottom:88px;

  z-index:950;

  width:48px;
  height:48px;

  display:flex;
  align-items:center;
  justify-content:center;

  padding:0;

  border:1px solid rgba(110,105,145,.14);
  border-radius:16px;

  background:rgba(255,255,255,.88);

  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);

  color:#5f55dc;

  box-shadow:
    0 9px 30px rgba(35,38,65,.13),
    0 2px 7px rgba(35,38,65,.06);

  opacity:0;
  visibility:hidden;

  transform:
    translateY(12px)
    scale(.92);

  pointer-events:none;

  transition:
    opacity .22s ease,
    transform .22s ease,
    visibility .22s ease,
    box-shadow .18s ease;

  cursor:pointer;
}

.market-home-scroll-top svg{
  width:21px;
  height:21px;

  fill:none;
  stroke:currentColor;

  stroke-width:2.15;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.market-home-scroll-top.is-visible{
  opacity:1;
  visibility:visible;

  transform:
    translateY(0)
    scale(1);

  pointer-events:auto;
}

.market-home-scroll-top:active{
  transform:scale(.92);
  box-shadow:
    0 5px 18px rgba(35,38,65,.12);
}


/* На больших экранах немного дальше от края */
@media(min-width:761px){

  .market-home-scroll-top{
    right:28px;
    bottom:28px;
  }

}


/* ==================================================
   SCREEN TRANSITION — ATOMIC SWITCH
   ================================================== */

/*
  Во время асинхронной смены экрана старый DOM
  остаётся на месте, но невидим.

  Никаких opacity/fade-анимаций:
  новый экран показывается одним готовым кадром.
*/
#app.market-screen-switching{
  visibility:hidden !important;
  pointer-events:none !important;
}


/* ==================================================
   ACCOUNT — PROFILE ACTIONS
   ================================================== */

.account-profile-logout{
  min-height:42px;
  padding:0 13px;

  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;

  border:1px solid #f0dde0;
  border-radius:13px;

  background:rgba(255,250,250,.88);

  color:#ae4e5a;

  font-size:12px;
  font-weight:800;

  cursor:pointer;

  box-shadow:0 5px 16px rgba(100,35,45,.04);
}

.account-profile-logout svg{
  width:17px;
  height:17px;

  fill:none;
  stroke:currentColor;

  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.account-profile-logout:active{
  transform:scale(.96);
}


/* Телефон */
@media(max-width:760px){

  .account-profile-actions{
    width:100%;
    flex-wrap:nowrap!important;
  }

  .account-profile-actions > button:first-child{
    flex:1 1 auto;
  }

  .account-profile-logout{
    flex:0 0 auto;
  }

}


/* ==================================================
   ACCOUNT — MY LISTINGS 2026
   ================================================== */

.account-listings-section{
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(116,87,255,.07),
      transparent 25%
    ),
    linear-gradient(
      180deg,
      #ffffff 0%,
      #fbfbfe 100%
    )!important;
}

.account-listing-card{
  position:relative;

  border:1px solid #e4e6ee!important;
  border-radius:22px!important;

  background:
    linear-gradient(
      145deg,
      #ffffff 0%,
      #fafaff 100%
    )!important;

  box-shadow:
    0 12px 32px rgba(32,36,58,.065)!important;
}


/* PHONE */

@media(max-width:760px){

  /*
    Секция почти во всю ширину телефона.
    Компенсируем стандартные поля .wrap.
  */
  .account-listings-section{
    margin-left:-14px!important;
    margin-right:-14px!important;

    padding:18px 14px 22px!important;

    border-left:0!important;
    border-right:0!important;

    border-radius:24px!important;

    box-shadow:
      0 10px 34px rgba(32,36,58,.055)!important;
  }


  .account-listings-grid{
    gap:16px!important;
    margin-top:14px!important;
  }


  .account-listing-card{
    width:100%!important;
    box-sizing:border-box!important;

    border-radius:24px!important;

    background:
      radial-gradient(
        circle at 100% 0%,
        rgba(116,87,255,.075),
        transparent 29%
      ),
      linear-gradient(
        150deg,
        #ffffff 0%,
        #fafaff 100%
      )!important;

    box-shadow:
      0 14px 38px rgba(31,35,58,.075)!important;
  }


  /*
    На телефоне:
    большое фото сверху,
    информация под ним.
  */
  .account-listing-layout{
    display:grid!important;
    grid-template-columns:1fr!important;

    gap:13px!important;
    padding:12px 14px 16px!important;
  }


  .account-listing-photo{
    width:100%!important;

    /*
      Уже не гигантский квадрат.
      Получаем широкое фото маркетплейса.
    */
    aspect-ratio:16/10!important;
    min-height:0!important;

    border-radius:19px!important;

    background:
      radial-gradient(
        circle at 50% 40%,
        #f5f4ff 0%,
        #f0f1f6 65%,
        #eceef3 100%
      )!important;

    box-shadow:
      inset 0 0 0 1px rgba(80,85,110,.035);
  }


  /*
    Если внутри реальная фотография,
    она полностью заполняет блок.
  */
  .account-listing-photo img{
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
  }


  /*
    Типографика внутри карточки.
    Усиливаем её без изменения HTML.
  */
  .account-listing-layout > div:last-child{
    padding:1px 3px 0!important;
  }


  /*
    Кнопки внизу становятся крупнее
    и удобнее для пальца.
  */
  .account-listing-layout button{
    min-height:42px!important;
    border-radius:13px!important;
    font-size:11px!important;
  }

}


/* ==================================================
   ACCOUNT LISTING — FULL WIDTH PHOTO
   ================================================== */

@media(max-width:760px){

  /*
    Убираем внутренние боковые поля layout.
    Благодаря этому фото идёт от края до края карточки.
  */
  .account-listing-layout{
    padding:
      12px 0
      16px!important;

    gap:0!important;
  }


  /*
    Фото становится полноценной верхней частью карточки.
  */
  .account-listing-photo{
    width:100%!important;

    aspect-ratio:16/10!important;
    min-height:0!important;

    margin:0!important;

    border-radius:0!important;

    overflow:hidden!important;

    background:#f1f2f6!important;

    box-shadow:none!important;
  }


  .account-listing-photo img{
    width:100%!important;
    height:100%!important;

    display:block!important;

    object-fit:cover!important;

    border-radius:0!important;
  }


  /*
    Текстовая часть снова получает нормальные
    внутренние поля независимо от фотографии.
  */
  .account-listing-layout > div:last-child{
    padding:
      18px 30px
      2px!important;
  }


  /*
    Саму карточку обрезаем по её скруглению.
    Поэтому фотография будет частью карточки,
    а не отдельной вложенной плиткой.
  */
  .account-listing-card{
    overflow:hidden!important;
  }


  /*
    Меню с тремя точками не должно создавать
    отдельную полосу над фотографией.
    Накладываем его поверх фото.
  */
  .account-listing-card
  [data-account-owner-menu]{
    position:absolute!important;

    top:14px!important;
    right:14px!important;

    z-index:5!important;

    padding:0!important;
  }


  .account-listing-card
  [data-account-owner-menu] button{
    width:44px!important;
    height:44px!important;

    min-height:44px!important;

    border:1px solid rgba(255,255,255,.72)!important;
    border-radius:15px!important;

    background:rgba(255,255,255,.90)!important;

    box-shadow:
      0 8px 24px rgba(20,24,40,.16)!important;

    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
  }

}


/* ACCOUNT LISTING — remove gap above photo */
@media(max-width:760px){

  .account-listing-layout{
    padding-top:0!important;
  }

}


/* ==================================================
   ACCOUNT LISTING — TYPOGRAPHY / INFO / ACTIONS
   ================================================== */

@media(max-width:760px){

  .account-listing-info{
    padding:4px 10px 5px!important;
  }

  .account-listing-title{
    color:#252735!important;
    font-size:18px!important;
    line-height:1.25!important;
    font-weight:900!important;
    letter-spacing:-.35px!important;
  }

  .account-listing-status{
    padding:7px 11px!important;
    font-size:11px!important;
    font-weight:850!important;
  }

  .account-listing-price{
    margin-top:12px!important;
    color:#20222d!important;
    font-size:25px!important;
    line-height:1.05!important;
    font-weight:950!important;
    letter-spacing:-.6px!important;
  }

  .account-listing-meta{
    margin-top:9px!important;
    gap:7px 13px!important;
    color:#858b99!important;
    font-size:12px!important;
    line-height:1.4!important;
    font-weight:600!important;
  }

  .account-listing-stats{
    margin-top:14px!important;
    gap:9px!important;
  }

  .account-listing-stats > div{
    min-height:36px!important;
    padding:0 12px!important;
    border:1px solid rgba(80,85,110,.04)!important;
    border-radius:12px!important;
    font-size:12px!important;
    font-weight:800!important;
  }

  .account-listing-actions{
    display:grid!important;
    grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)!important;
    gap:9px!important;
    margin-top:16px!important;
  }

  .account-listing-actions button{
    width:100%!important;
    min-height:48px!important;
    padding:0 12px!important;
    border-radius:15px!important;
    font-size:13px!important;
    font-weight:850!important;
    white-space:nowrap!important;
  }

  .account-listing-open{
    border:1px solid #dfe2e9!important;
    background:#fff!important;
    color:#515766!important;
    box-shadow:0 4px 12px rgba(35,40,60,.025)!important;
  }

  .account-listing-edit{
    border:1px solid rgba(116,87,255,.05)!important;
    background:
      linear-gradient(
        135deg,
        #f3f1ff 0%,
        #efefff 100%
      )!important;
    color:#6257d8!important;
    box-shadow:0 5px 14px rgba(98,87,216,.06)!important;
  }

  .account-listing-open:active,
  .account-listing-edit:active{
    transform:scale(.97);
  }

}


/* ==================================================
   ACCOUNT — PREMIUM BACKGROUND / LISTING CARDS
   ================================================== */

/* Общий фон личного кабинета */
body:not(.market-home-view){
  background:
    radial-gradient(
      circle at 8% 12%,
      rgba(116,87,255,.09),
      transparent 27%
    ),
    radial-gradient(
      circle at 94% 34%,
      rgba(70,137,255,.08),
      transparent 30%
    ),
    linear-gradient(
      180deg,
      #f7f8fc 0%,
      #f3f5fa 48%,
      #f7f8fc 100%
    );
}


/* Секция "Мои объявления" */
.account-listings-section{
  position:relative;
  overflow:hidden;

  border:1px solid rgba(112,103,190,.13)!important;

  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(116,87,255,.13),
      transparent 30%
    ),
    radial-gradient(
      circle at 0% 100%,
      rgba(73,142,255,.08),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      #f9f9ff 0%,
      #f5f6ff 48%,
      #f8faff 100%
    )!important;

  box-shadow:
    0 18px 48px rgba(46,48,85,.08)!important;
}


/* Карточка объявления */
.account-listing-card{
  position:relative;

  border:1px solid rgba(104,95,185,.15)!important;

  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(116,87,255,.12),
      transparent 35%
    ),
    radial-gradient(
      circle at 0% 100%,
      rgba(74,143,255,.07),
      transparent 40%
    ),
    linear-gradient(
      145deg,
      #ffffff 0%,
      #f8f7ff 55%,
      #f4f7ff 100%
    )!important;

  box-shadow:
    0 14px 38px rgba(45,48,82,.10),
    0 2px 7px rgba(116,87,255,.05)!important;

  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease;
}


/* Очень тонкий световой акцент */
.account-listing-card::after{
  content:"";

  position:absolute;
  left:18px;
  right:18px;
  bottom:0;

  height:1px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(116,87,255,.25),
      transparent
    );

  pointer-events:none;
}


/* Счётчики просмотров / избранного */
.account-listing-stats > div{
  background:
    rgba(255,255,255,.72)!important;

  border:
    1px solid rgba(103,98,155,.09)!important;

  box-shadow:
    0 4px 12px rgba(45,48,75,.035);
}


/* Кнопка "Открыть" */
.account-listing-open{
  background:
    rgba(255,255,255,.82)!important;

  border:
    1px solid rgba(94,96,125,.15)!important;

  color:#4c5262!important;

  box-shadow:
    0 5px 14px rgba(40,43,65,.05)!important;
}


/* Кнопка "Редактировать" */
.account-listing-edit{
  border:
    1px solid rgba(116,87,255,.12)!important;

  background:
    linear-gradient(
      135deg,
      #ebe8ff 0%,
      #e8edff 100%
    )!important;

  color:#5d52ce!important;

  box-shadow:
    0 7px 18px rgba(99,84,215,.10)!important;
}


/* Нажатие */
.account-listing-card:active{
  transform:scale(.992);
}


@media(max-width:760px){

  .account-listings-section{
    background:
      radial-gradient(
        circle at 100% 0%,
        rgba(116,87,255,.14),
        transparent 31%
      ),
      radial-gradient(
        circle at 0% 100%,
        rgba(70,139,255,.09),
        transparent 36%
      ),
      linear-gradient(
        155deg,
        #f9f9ff 0%,
        #f4f5ff 52%,
        #f7f9ff 100%
      )!important;
  }


  .account-listing-card{
    border:
      1px solid rgba(105,94,190,.16)!important;

    background:
      radial-gradient(
        circle at 100% 0%,
        rgba(116,87,255,.13),
        transparent 35%
      ),
      linear-gradient(
        150deg,
        #ffffff 0%,
        #f8f7ff 57%,
        #f3f6ff 100%
      )!important;

    box-shadow:
      0 15px 38px rgba(43,45,78,.105),
      0 3px 10px rgba(116,87,255,.045)!important;
  }

}


/* =========================================================
   FINAL MOBILE FIX — ACCOUNT BOTTOM + SUPPORT CHAT HEIGHT
   ========================================================= */

@media(max-width:700px){

  /* =======================================================
     1. ЛИЧНЫЙ КАБИНЕТ
     Убираем белую полосу между контентом и нижним меню
     ======================================================= */

  body:has(.account-wow){
    background:
      radial-gradient(
        circle at 8% 20%,
        rgba(116,87,255,.08),
        transparent 28%
      ),
      radial-gradient(
        circle at 95% 65%,
        rgba(65,150,255,.07),
        transparent 32%
      ),
      linear-gradient(
        180deg,
        #f7f8fc 0%,
        #f3f5fa 48%,
        #f7f8fc 100%
      ) !important;
  }

  body:has(.account-wow) #app{
    min-height:calc(100dvh - 76px) !important;

    padding-bottom:
      calc(100px + env(safe-area-inset-bottom)) !important;

    background:transparent !important;
  }

  body:has(.account-wow) .account-wow{
    min-height:
      calc(
        100dvh
        - 76px
        - 92px
        - env(safe-area-inset-bottom)
      ) !important;

    padding-bottom:24px !important;

    background:transparent !important;
  }


  /* =======================================================
     2. ЧАТ ПОДДЕРЖКИ
     На внутренних экранах header уже скрыт.
     Поэтому НЕ вычитаем старые 76px.
     ======================================================= */

  body:has(.support-chat-screen){
    overflow:hidden !important;
    background:#f5f6fa !important;
  }

  body:has(.support-chat-screen) #app{
    height:100dvh !important;
    min-height:100dvh !important;
    max-height:100dvh !important;

    padding:0 !important;
    margin:0 !important;

    overflow:hidden !important;
    background:#f5f6fa !important;
  }

  html body #app > .support-chat-screen{
    width:100% !important;

    height:100dvh !important;
    min-height:100dvh !important;
    max-height:100dvh !important;

    margin:0 !important;
    padding:
      14px
      12px
      max(10px,env(safe-area-inset-bottom))
      !important;

    display:flex !important;
    flex-direction:column !important;

    overflow:hidden !important;

    background:#f5f6fa !important;
  }

  /* Верхняя строка: назад / Поддержка / Объявление */
  .support-chat-screen .support-chat-page-top{
    flex:0 0 auto !important;
    margin-bottom:12px !important;
  }

  /*
    Всё пространство после верхней строки отдаём чату.
  */
  .support-chat-screen .support-chat-layout{
    flex:1 1 0 !important;

    width:100% !important;

    height:auto !important;
    min-height:0 !important;
    max-height:none !important;

    display:flex !important;
    flex-direction:column !important;

    gap:10px !important;

    overflow:hidden !important;
  }

  /*
    Причина обращения не должна растягиваться.
  */
  .support-chat-screen .support-chat-reason{
    flex:0 0 auto !important;
  }

  /*
    Сам чат получает всё оставшееся пространство.
  */
  html body .support-chat-screen .support-chat-panel{
    flex:1 1 0 !important;

    height:auto !important;
    min-height:0 !important;
    max-height:none !important;

    display:flex !important;
    flex-direction:column !important;

    overflow:hidden !important;
  }

  /*
    Прокручиваются только сообщения.
  */
  html body .support-chat-screen
  #supportMessages.support-chat-messages{
    flex:1 1 0 !important;

    height:0 !important;
    min-height:0 !important;
    max-height:none !important;

    overflow-y:auto !important;
    overflow-x:hidden !important;

    padding-bottom:14px !important;

    overscroll-behavior:contain !important;
    -webkit-overflow-scrolling:touch;
  }

  /*
    Предпросмотр вложения и строка отправки
    всегда остаются снизу.
  */
  .support-chat-screen #supportAttachmentPreview{
    flex:0 0 auto !important;
  }

  .support-chat-screen #supportMessageForm{
    flex:0 0 auto !important;

    position:relative !important;
    z-index:20 !important;

    margin:0 !important;

    background:#fff !important;
  }

  /*
    В конкретной переписке поддержки
    нижнее основное меню скрыто.
  */
  body:has(.support-chat-screen) .mobile-bottom-nav{
    display:none !important;
  }

}


/* =========================================================
   ACCOUNT — FINAL BOTTOM GAP FIX
   ========================================================= */

@media(max-width:700px){

  /*
    Нижняя навигация имеет высоту около 82px.
    Оставляем кабинету только реальное место под неё,
    без лишней белой зоны.
  */
  body:has(.account-wow) #app{
    min-height:100dvh !important;

    padding-bottom:
      calc(82px + env(safe-area-inset-bottom)) !important;

    background:
      radial-gradient(
        circle at 8% 20%,
        rgba(116,87,255,.08),
        transparent 28%
      ),
      radial-gradient(
        circle at 95% 65%,
        rgba(65,150,255,.07),
        transparent 32%
      ),
      linear-gradient(
        180deg,
        #f7f8fc 0%,
        #f3f5fa 48%,
        #f7f8fc 100%
      ) !important;
  }

  body:has(.account-wow) .account-wow{
    min-height:0 !important;
    padding-bottom:12px !important;
    background:transparent !important;
  }

}

/* =========================================================
   ACCOUNT — CONTINUOUS FULL PAGE BACKGROUND
   ========================================================= */

@media(max-width:700px){

  /*
    Единый фон всей страницы кабинета.
    Он продолжается между секциями и до нижней навигации.
  */
  body:has(.account-wow),
  body:has(.account-wow) #app{
    background:
      radial-gradient(
        circle at 10% 18%,
        rgba(116,87,255,.10),
        transparent 30%
      ),
      radial-gradient(
        circle at 92% 68%,
        rgba(74,145,255,.08),
        transparent 34%
      ),
      linear-gradient(
        180deg,
        #f6f7fc 0%,
        #f1f3fa 48%,
        #f5f7fb 100%
      ) !important;
  }

  /*
    #app всегда покрывает весь экран.
  */
  body:has(.account-wow) #app{
    min-height:100dvh !important;
    box-sizing:border-box !important;

    padding-bottom:
      calc(82px + env(safe-area-inset-bottom)) !important;
  }

  /*
    Сам кабинет прозрачный — через него виден
    единый фон #app.
  */
  body:has(.account-wow) .account-wow{
    background:transparent !important;
    min-height:0 !important;
    padding-bottom:0 !important;
  }

  /*
    После секции объявлений не создаём
    отдельную белую поверхность.
  */
  body:has(.account-wow) .account-listings-section{
    margin-bottom:0 !important;
  }

  /*
    Область непосредственно перед фиксированной
    нижней навигацией получает тот же фон.
  */
  body:has(.account-wow)::after{
    content:"";
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    height:
      calc(100px + env(safe-area-inset-bottom));

    background:
      linear-gradient(
        180deg,
        #f4f5fa 0%,
        #f5f7fb 100%
      );

    pointer-events:none;
    z-index:0;
  }

  /*
    Навигация всегда выше фонового слоя.
  */
  body:has(.account-wow) .mobile-bottom-nav{
    z-index:100 !important;
  }

  body:has(.account-wow) #app{
    position:relative;
    z-index:1;
  }

}


/* =========================================================
   ADMIN DASHBOARD — COMPACT GRID 2026
   ========================================================= */

.admin-dashboard-wow{
  width:100%;
}

/* Два основных раздела */
.admin-dashboard-wow > .panel{
  border:1px solid rgba(105,94,190,.12) !important;
  border-radius:26px !important;
  background:
    radial-gradient(circle at 100% 0%,rgba(116,87,255,.07),transparent 28%),
    linear-gradient(145deg,#fff,#fafaff) !important;
  box-shadow:0 14px 38px rgba(42,45,75,.065) !important;
}

/* Сетка админских функций */
.admin-dashboard-wow > .panel > .grid{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:14px !important;
  margin-top:16px !important;
}

/* Все кнопки-карточки внутри сеток */
.admin-dashboard-wow > .panel > .grid > button{
  width:100% !important;
  min-width:0 !important;
  min-height:150px !important;

  margin:0 !important;
  padding:17px !important;

  border:1px solid rgba(105,94,190,.13) !important;
  border-radius:21px !important;

  background:
    linear-gradient(145deg,#fff 0%,#f9f9ff 100%) !important;

  box-shadow:
    0 8px 24px rgba(43,46,78,.06) !important;

  text-align:left !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
}

/* Заголовки разделов */
.admin-dashboard-wow > .panel > h2{
  margin:0 !important;
  color:#25283a !important;
  font-size:22px !important;
  font-weight:900 !important;
  letter-spacing:-.35px !important;
}

/* Числа статистики */
.admin-dashboard-wow > .panel > .grid > button .price{
  font-size:27px !important;
  line-height:1.1 !important;
  font-weight:900 !important;
  color:#25283a !important;
}

/* =========================================================
   PHONE
   ========================================================= */

@media(max-width:700px){

  .admin-dashboard-wow{
    padding:14px 12px 115px !important;
  }

  /* Верхняя область "Панель владельца" */
  .admin-dashboard-wow > div:first-child{
    margin-bottom:15px !important;
    padding:17px !important;

    border:1px solid rgba(116,87,255,.12) !important;
    border-radius:22px !important;

    background:
      radial-gradient(circle at 100% 0%,rgba(56,191,248,.13),transparent 38%),
      radial-gradient(circle at 0% 100%,rgba(116,87,255,.10),transparent 40%),
      #fff !important;

    box-shadow:0 10px 28px rgba(42,45,75,.06) !important;
  }

  .admin-dashboard-wow > div:first-child h1{
    font-size:25px !important;
    line-height:1.12 !important;
  }

  /* Выход больше не занимает всю ширину */
  .admin-dashboard-wow .admin-dashboard-logout{
    width:auto !important;
    min-height:42px !important;
    padding:0 14px !important;
    border-radius:13px !important;
  }

  /* Сами большие секции */
  .admin-dashboard-wow > .panel{
    padding:16px !important;
    margin-top:14px !important;
    border-radius:23px !important;
  }

  .admin-dashboard-wow > .panel > h2{
    font-size:20px !important;
  }

  /* Главное изменение — 2 карточки в ряд */
  .admin-dashboard-wow > .panel > .grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
    margin-top:14px !important;
  }

  .admin-dashboard-wow > .panel > .grid > button{
    min-height:132px !important;
    padding:14px !important;
    border-radius:18px !important;
  }

  /* Уменьшаем огромные emoji */
  .admin-dashboard-wow > .panel > .grid > button > div:first-of-type{
    font-size:24px !important;
    margin-bottom:8px !important;
  }

  .admin-dashboard-wow > .panel > .grid > button .price{
    margin-top:5px !important;
    font-size:24px !important;
  }

  /* Второстепенный текст компактнее */
  .admin-dashboard-wow > .panel > .grid > button .muted{
    font-size:11px !important;
    line-height:1.3 !important;
  }

  /*
    Поддержка сейчас содержит много текста.
    Убираем лишнюю высоту, но счётчики сохраняем.
  */
  .admin-dashboard-wow > .panel > .grid >
  button[onclick="adminSupport()"]{
    min-height:132px !important;
  }

  .admin-dashboard-wow > .panel > .grid >
  button[onclick="adminSupport()"] > div:nth-last-child(-n+2){
    font-size:10px !important;
    line-height:1.25 !important;
  }
}

/* Очень узкие телефоны всё равно оставляем 2×N */
@media(max-width:390px){

  .admin-dashboard-wow > .panel > .grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:8px !important;
  }

  .admin-dashboard-wow > .panel > .grid > button{
    padding:12px !important;
  }
}


/* =========================================================
   ADMIN OWNER PROFILE — CLEAN 2026
   ========================================================= */

.admin-owner-profile{
  max-width:980px !important;
  margin:0 auto !important;
}

.admin-owner-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}

.admin-owner-back,
.admin-owner-edit-top{
  min-height:44px;
  padding:0 15px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid #e2e4ec !important;
  border-radius:14px !important;
  background:#fff !important;
  color:#4e5565 !important;
  font-size:13px !important;
  font-weight:800 !important;
  box-shadow:0 5px 17px rgba(35,40,65,.05);
}

.admin-owner-edit-top{
  color:#6555d9 !important;
  background:#f8f7ff !important;
}

.admin-owner-profile-card{
  position:relative;
  overflow:hidden;
  padding:24px;
  border:1px solid rgba(110,98,190,.14);
  border-radius:28px;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(69,174,255,.13),
      transparent 34%
    ),
    radial-gradient(
      circle at 0% 100%,
      rgba(116,87,255,.10),
      transparent 36%
    ),
    linear-gradient(145deg,#fff,#fafaff);
  box-shadow:0 17px 45px rgba(42,45,75,.075);
}

.admin-owner-identity{
  display:flex;
  align-items:center;
  gap:16px;
  padding-bottom:22px;
}

.admin-owner-avatar{
  width:72px;
  height:72px;
  flex:none;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:23px;
  background:linear-gradient(135deg,#7457ff,#38bff8);
  color:#fff;
  font-size:29px;
  font-weight:900;
  box-shadow:0 11px 27px rgba(89,88,225,.22);
}

.admin-owner-avatar img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

.admin-owner-name-block{
  min-width:0;
}

.admin-owner-name{
  overflow:hidden;
  text-overflow:ellipsis;
  color:#242738;
  font-size:25px;
  line-height:1.15;
  font-weight:900;
  letter-spacing:-.45px;
}

.admin-owner-role{
  display:inline-flex;
  align-items:center;
  min-height:29px;
  margin-top:8px;
  padding:0 11px;
  border-radius:999px;
  background:#eeeaff;
  color:#6551da;
  font-size:11px;
  font-weight:850;
}

.admin-owner-info-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:11px;
}

.admin-owner-info-card{
  min-width:0;
  min-height:82px;
  padding:14px;
  display:flex;
  align-items:center;
  gap:12px;
  border:1px solid rgba(105,94,190,.11);
  border-radius:18px;
  background:rgba(255,255,255,.78);
  box-shadow:0 6px 18px rgba(40,44,70,.04);
}

.admin-owner-info-icon{
  width:43px;
  height:43px;
  flex:none;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  background:linear-gradient(135deg,#f0edff,#edf8ff);
  font-size:18px;
}

.admin-owner-info-content{
  min-width:0;
}

.admin-owner-info-label{
  margin-bottom:4px;
  color:#9297a5;
  font-size:10px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.45px;
}

.admin-owner-info-value{
  overflow:hidden;
  text-overflow:ellipsis;
  color:#454b5d;
  font-size:14px;
  line-height:1.35;
  font-weight:750;
}


/* PHONE */

@media(max-width:700px){

  .admin-owner-profile{
    padding:14px 12px 115px !important;
  }

  .admin-owner-topbar{
    margin-bottom:13px;
  }

  .admin-owner-back,
  .admin-owner-edit-top{
    min-height:42px;
    padding:0 12px;
    border-radius:13px !important;
    font-size:12px !important;
  }

  .admin-owner-edit-top span{
    display:none;
  }

  .admin-owner-profile-card{
    padding:17px;
    border-radius:23px;
  }

  .admin-owner-identity{
    gap:13px;
    padding-bottom:17px;
  }

  .admin-owner-avatar{
    width:61px;
    height:61px;
    border-radius:19px;
    font-size:24px;
  }

  .admin-owner-name{
    font-size:21px;
  }

  .admin-owner-role{
    min-height:27px;
    margin-top:6px;
    padding:0 9px;
    font-size:10px;
  }

  .admin-owner-info-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }

  .admin-owner-info-card{
    min-height:76px;
    padding:11px;
    gap:9px;
    border-radius:16px;
  }

  .admin-owner-info-icon{
    width:37px;
    height:37px;
    border-radius:12px;
    font-size:16px;
  }

  .admin-owner-info-label{
    font-size:9px;
  }

  .admin-owner-info-value{
    font-size:12px;
  }
}

@media(max-width:390px){

  .admin-owner-profile-card{
    padding:14px;
  }

  .admin-owner-info-card{
    padding:9px;
    gap:7px;
  }

  .admin-owner-info-icon{
    width:34px;
    height:34px;
  }
}


/* =========================================================
   ADMIN LISTINGS — SEPARATE CARDS
   ========================================================= */

.admin-listing-card{
  margin-bottom:14px !important;
  padding:18px !important;

  border:1px solid rgba(116,87,255,.16) !important;
  border-radius:20px !important;

  background:
    linear-gradient(145deg,#ffffff 0%,#fbfbff 100%) !important;

  box-shadow:
    0 7px 22px rgba(38,42,70,.07) !important;

  box-sizing:border-box !important;
}

.admin-listing-card:last-child{
  margin-bottom:0 !important;
}

@media(max-width:700px){

  .admin-listing-card{
    margin-bottom:12px !important;
    padding:16px !important;

    border:1px solid rgba(105,94,190,.20) !important;
    border-radius:19px !important;

    box-shadow:
      0 5px 16px rgba(38,42,70,.075),
      0 1px 3px rgba(38,42,70,.035) !important;
  }

}


/* =========================================================
   ADMIN LISTINGS — TYPOGRAPHY 2026
   ========================================================= */

/* Название объявления */
.admin-listing-card > div:first-child > div:first-child > div:first-child{
  color:#202331 !important;
  font-size:18px !important;
  line-height:1.25 !important;
  font-weight:850 !important;
  letter-spacing:-.25px !important;
}

/* Цена */
.admin-listing-card > div:first-child > div:first-child > div:nth-child(2){
  margin-top:7px !important;
  color:#242735 !important;
  font-size:17px !important;
  line-height:1.2 !important;
  font-weight:800 !important;
}

/* Имя продавца + телефон */
.admin-listing-card > div:first-child > div:first-child > .muted{
  margin-top:7px !important;
  color:#707684 !important;
  font-size:13px !important;
  line-height:1.35 !important;
  font-weight:600 !important;
}

/* Статус объявления */
.admin-listing-card > div:first-child > div:first-child > div:nth-child(4){
  display:inline-flex !important;
  align-items:center !important;

  margin-top:10px !important;
  padding:6px 10px !important;

  border-radius:999px !important;
  background:#f1f8f4 !important;

  font-size:12px !important;
  line-height:1 !important;
  font-weight:850 !important;
}


/* PHONE */
@media(max-width:700px){

  /* Название */
  .admin-listing-card > div:first-child > div:first-child > div:first-child{
    font-size:17px !important;
    line-height:1.25 !important;
    font-weight:900 !important;
  }

  /* Цена */
  .admin-listing-card > div:first-child > div:first-child > div:nth-child(2){
    font-size:16px !important;
    font-weight:800 !important;
  }

  /* Продавец */
  .admin-listing-card > div:first-child > div:first-child > .muted{
    font-size:12px !important;
    line-height:1.4 !important;
    font-weight:650 !important;
  }

  /* Статус */
  .admin-listing-card > div:first-child > div:first-child > div:nth-child(4){
    margin-top:10px !important;
    padding:6px 10px !important;
    font-size:11px !important;
    font-weight:900 !important;
  }

}




/* ==================================================
   SEARCH RESULTS — SAME CARDS AS HOME
   ================================================== */

@media(max-width:760px){

  .home-modern .home-listings-grid.home-search-results{
    display:grid!important;
    width:100%!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
  }

  .home-modern .home-listings-grid.home-search-results .market-listing-card{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    min-height:0!important;
    grid-template-columns:none!important;
    border-radius:18px!important;
  }

  .home-modern .home-listings-grid.home-search-results .market-card-photo{
    display:grid!important;
    width:100%!important;
    height:160px!important;
    min-height:160px!important;
    border-radius:0!important;
  }

  .home-modern .home-listings-grid.home-search-results .market-card-body{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    padding:11px!important;
  }

  .home-modern .home-listings-grid.home-search-results .market-card-price{
    font-size:17px!important;
    line-height:1.15!important;
    white-space:normal!important;
  }

  .home-modern .home-listings-grid.home-search-results .market-card-title{
    min-height:34px!important;
    margin-top:5px!important;
    font-size:12.5px!important;
    line-height:1.35!important;
  }
}

@media(max-width:390px){

  .home-modern .home-listings-grid.home-search-results .market-card-photo{
    width:100%!important;
    height:145px!important;
    min-height:145px!important;
  }

  .home-modern .home-listings-grid.home-search-results .market-card-price{
    font-size:15px!important;
  }
}

/* Защита экрана во время асинхронного перехода */
#app.market-screen-switching {
  pointer-events: none !important;
  user-select: none;
  touch-action: none;
}


/* ==================================================
   MOBILE BOTTOM NAV — TOUCH BARRIER
   Жест, начатый на нижней панели, не прокручивает
   страницу под ней. Обычные нажатия остаются рабочими.
   ================================================== */

@media(max-width:700px){

  nav.mobile-bottom-nav{
    touch-action:none !important;
    overscroll-behavior:none !important;
  }

  nav.mobile-bottom-nav .mobile-bottom-btn,
  nav.mobile-bottom-nav .mobile-bottom-create{
    touch-action:none !important;
  }
}


/* ==================================================
   MOBILE HOME HEADER — OUT OF DOCUMENT FLOW
   Не позволяем появлению YOUR MARKET менять
   геометрию #app и сохранённую позицию прокрутки.
   ================================================== */

@media(max-width:760px){

  body.market-home-view .market-header{
    display:block !important;
    position:fixed !important;
    top:0 !important;
    left:0 !important;
    right:0 !important;
    width:100% !important;
    z-index:100 !important;
  }

  body:not(.market-home-view) .market-header{
    display:none !important;
  }

  /*
    Шапка больше не участвует в document flow,
    поэтому место под неё создаём внутри Home
    постоянным отступом.

    63px — фактическая мобильная высота шапки,
    которую мы уже измеряли.
  */
  body.market-home-view #app{
    padding-top:63px !important;
  }

  body:not(.market-home-view) #app{
    padding-top:0 !important;
  }

}


/* ===== YOUR MARKET BUSINESS PROFILE V1 ===== */
.business-page{max-width:1180px;margin:0 auto}
.business-hero{display:flex;align-items:center;gap:18px;padding:26px;margin-bottom:18px;border:1px solid #e4e1f5;border-radius:28px;background:radial-gradient(circle at 92% 8%,rgba(116,87,255,.22),transparent 31%),radial-gradient(circle at 5% 100%,rgba(43,194,160,.11),transparent 30%),linear-gradient(135deg,#fff,#f8f7ff);box-shadow:0 20px 55px rgba(48,43,90,.09)}
.business-back{width:44px;height:44px;flex:0 0 44px;border:1px solid #e1e1ea;border-radius:14px;background:#fff;font-size:21px;cursor:pointer}
.business-hero-text{min-width:0;flex:1}.business-overline{color:#7457ff;font-size:10px;font-weight:900;letter-spacing:.12em}.business-hero h1{margin:5px 0 7px;font-size:30px;font-weight:950;color:#202331}.business-hero p{margin:0;color:#7c8290;font-size:12px;line-height:1.55}
.business-pill{display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border-radius:999px;font-size:10px;font-weight:900;white-space:nowrap}.business-approved{background:#eaf8ef;color:#2f8552}.business-pending{background:#fff7df;color:#936713}.business-rejected{background:#fff0f0;color:#b44747}.business-empty{background:#f0efff;color:#6657d9}
.business-notice{display:flex;flex-direction:column;gap:4px;margin-bottom:16px;padding:15px 18px;border-radius:18px;font-size:11px}.business-notice strong{font-size:14px}.business-notice.pending{background:#fff9e9;border:1px solid #f1e3b8;color:#815d18}.business-notice.approved{background:#effaf3;border:1px solid #d5efdf;color:#2d7148}.business-notice.rejected{background:#fff3f3;border:1px solid #f0d8d8;color:#984343}
.business-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:18px;align-items:start}.business-form-card,.business-preview{border:1px solid #e7e8ee;border-radius:24px;background:#fff;box-shadow:0 13px 38px rgba(35,40,60,.055)}.business-form-card{padding:22px}.business-card-head{display:flex;justify-content:space-between;gap:15px;align-items:flex-start;margin-bottom:18px}.business-card-head h2{margin:4px 0 0;font-size:20px}.business-card-head>span{color:#6c8c78;font-size:9px;font-weight:800}
.business-logo-row{display:flex;align-items:center;gap:13px;padding:12px;border:1px dashed #d9d9e8;border-radius:18px;background:#fbfbfe;cursor:pointer}.business-logo-row.disabled{cursor:default}.business-logo-row input{display:none}.business-logo{width:64px;height:64px;flex:0 0 64px;overflow:hidden;display:flex;align-items:center;justify-content:center;border-radius:18px;background:linear-gradient(135deg,#7457ff,#5288f7);color:#fff;font-size:24px}.business-logo img,.business-preview-logo img{width:100%;height:100%;object-fit:cover}.business-logo-row strong{display:block;font-size:13px}.business-logo-row small{display:block;margin-top:4px;color:#8b91a0;font-size:10px}
.business-fields{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin-top:16px}.business-fields label{display:flex;flex-direction:column;gap:6px}.business-fields label.wide{grid-column:1/-1}.business-fields label>span{color:#606675;font-size:10px;font-weight:850}.business-fields input,.business-fields textarea{box-sizing:border-box;width:100%;padding:12px 13px;border:1px solid #dfe2e8;border-radius:13px;background:#fff;color:#252936;font:inherit;font-size:12px;outline:none}.business-fields textarea{min-height:120px;resize:vertical;line-height:1.55}.business-fields input:focus,.business-fields textarea:focus{border-color:#8c7cff;box-shadow:0 0 0 3px rgba(116,87,255,.09)}.business-fields input:disabled,.business-fields textarea:disabled{background:#f7f8fa;color:#5f6571}.business-fields small{color:#9a9fab;font-size:9px}
.business-submit{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:19px;padding-top:17px;border-top:1px solid #eef0f3}.business-submit small{max-width:420px;color:#9095a1;font-size:9px;line-height:1.5}.business-submit button{min-height:44px;padding:0 17px;border:0;border-radius:13px;background:linear-gradient(135deg,#7457ff,#5a7df5);color:#fff;font-weight:900;cursor:pointer;box-shadow:0 9px 22px rgba(100,82,230,.22)}.business-submit button:disabled{opacity:.65}
.business-preview{position:sticky;top:86px;padding:21px;background:linear-gradient(145deg,#fff,#fafaff)}.business-preview-logo{width:72px;height:72px;margin-top:17px;overflow:hidden;display:flex;align-items:center;justify-content:center;border-radius:22px;background:linear-gradient(135deg,#7457ff,#5288f7);color:#fff;font-size:27px}.business-verified{display:inline-flex;margin-top:13px;padding:5px 8px;border-radius:999px;background:#eaf8ef;color:#2f8552;font-size:9px;font-weight:900}.business-preview h3{margin:9px 0 7px;font-size:20px}.business-preview p{margin:0 0 15px;color:#777e8d;font-size:11px;line-height:1.55}.business-preview>span{display:block;margin-top:7px;color:#666d7a;font-size:10px}
.business-account-card{width:100%;margin-top:20px;padding:18px;display:flex;align-items:center;gap:14px;text-align:left;border:1px solid #ddd9ff;border-radius:23px;background:radial-gradient(circle at 92% 10%,rgba(116,87,255,.15),transparent 30%),linear-gradient(135deg,#fff,#f9f8ff);box-shadow:0 12px 34px rgba(67,53,150,.07);cursor:pointer}.business-account-icon{width:50px;height:50px;flex:0 0 50px;display:flex;align-items:center;justify-content:center;border-radius:16px;background:linear-gradient(135deg,#7457ff,#4e8af7);color:#fff;font-size:22px;box-shadow:0 9px 21px rgba(102,82,225,.22)}.business-account-main{min-width:0;flex:1}.business-account-top{display:flex;align-items:center;gap:8px;color:#5d50c7;font-size:10px;font-weight:900}.business-account-main>strong{display:block;margin-top:5px;color:#262936;font-size:16px}.business-account-main>small{display:block;margin-top:4px;color:#858b99;font-size:10px;line-height:1.45}.business-account-arrow{color:#8b82c9;font-size:28px}.business-new{padding:3px 6px;border-radius:999px;background:#7457ff;color:#fff;font-size:8px}
@media(max-width:760px){.business-hero{padding:18px;border-radius:22px;align-items:flex-start;flex-wrap:wrap}.business-hero h1{font-size:23px}.business-hero>.business-pill{margin-left:58px}.business-grid{grid-template-columns:1fr}.business-preview{position:static}.business-fields{grid-template-columns:1fr}.business-fields label.wide{grid-column:auto}.business-submit{align-items:stretch;flex-direction:column}.business-submit button{width:100%}.business-form-card{padding:16px}.business-account-card{padding:15px}.business-account-icon{width:45px;height:45px;flex-basis:45px}.business-account-main>strong{font-size:14px}}

/* ==================================================
   MOBILE KEYBOARD — HIDE BOTTOM NAV
   При вводе текста нижняя навигация полностью скрыта.
   ================================================== */
@media(max-width:700px){
  body.market-keyboard-open nav.mobile-bottom-nav{
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
    transform:translateY(calc(100% + 40px)) !important;
    transition:
      transform .18s ease,
      opacity .15s ease !important;
  }
}


/* ADMIN BUSINESS V1 */
.admin-business-dashboard-card{position:relative;text-align:left;border:1px solid #d8e9df;border-radius:18px;background:linear-gradient(145deg,#fff,#f1fbf6);padding:20px;cursor:pointer;box-shadow:0 8px 24px rgba(17,94,60,.08)}
.admin-business-count{position:absolute;top:14px;right:14px;min-width:27px;height:27px;padding:0 8px;display:flex;align-items:center;justify-content:center;border-radius:999px;background:#0d9f66;color:#fff;font-size:11px;font-weight:900}
.admin-business-card-icon{width:48px;height:48px;display:flex;align-items:center;justify-content:center;margin-bottom:12px;border-radius:15px;background:linear-gradient(135deg,#113d2d,#16a36d);color:#fff;font-size:22px}.admin-business-card-title{font-size:15px;font-weight:850;color:#18382c}.admin-business-card-text{margin-top:7px;color:#6a7d74;font-size:11px}.admin-business-card-link{margin-top:12px;color:#0b8c5a;font-size:11px;font-weight:850}
.admin-business-screen{max-width:1040px}.admin-business-topbar{display:flex;align-items:flex-start;gap:14px;margin-bottom:22px}.admin-business-topbar h1{margin:2px 0 5px;font-size:30px}.admin-business-topbar p{margin:0;color:#718078}.admin-business-eyebrow{font-size:10px;font-weight:900;letter-spacing:1.4px;color:#0b8c5a}.admin-business-back{flex:0 0 auto;width:44px;height:44px;border:1px solid #dce8e2;border-radius:14px;background:#fff;box-shadow:0 5px 16px rgba(22,70,50,.08);font-size:22px}
.admin-business-tabs{display:flex;gap:8px;overflow-x:auto;padding:2px 1px 12px;margin-bottom:10px}.admin-business-tabs button{flex:0 0 auto;padding:10px 14px;border:1px solid #dce8e2;border-radius:999px;background:#fff;color:#64756c;font-size:12px;font-weight:800}.admin-business-tabs button.is-active{background:#173f31;border-color:#173f31;color:#fff}.admin-business-list,.admin-business-detail{display:grid;gap:10px}.admin-business-item{width:100%;display:flex;align-items:center;gap:14px;text-align:left;padding:15px;border:1px solid #e0ebe5;border-radius:18px;background:#fff;box-shadow:0 6px 22px rgba(25,72,52,.06)}
.admin-business-logo,.admin-business-detail-logo{display:flex;align-items:center;justify-content:center;overflow:hidden;background:linear-gradient(135deg,#173f31,#1eb47b);color:#fff;font-weight:900}.admin-business-logo{flex:0 0 52px;width:52px;height:52px;border-radius:15px;font-size:21px}.admin-business-logo img,.admin-business-detail-logo img{width:100%;height:100%;object-fit:cover}.admin-business-item-main{min-width:0;flex:1}.admin-business-item-title{font-size:15px;font-weight:900}.admin-business-item-user{margin-top:4px;color:#687970;font-size:12px}.admin-business-item-date{margin-top:5px;color:#98a39e;font-size:10px}.admin-business-status{display:inline-flex;padding:6px 9px;border-radius:999px;font-size:10px;font-weight:900;white-space:nowrap}.admin-business-chevron{font-size:25px;color:#a6b3ad}.admin-business-empty{text-align:center;padding:48px 22px;border:1px dashed #d7e5de;border-radius:20px;background:#fbfdfc}
.admin-business-hero-card,.admin-business-info-card,.admin-business-decision-card{border:1px solid #deebe4;border-radius:22px;background:#fff;box-shadow:0 8px 28px rgba(22,70,50,.06)}.admin-business-hero-card{display:flex;align-items:center;gap:17px;padding:20px;background:linear-gradient(145deg,#fff,#f3fbf7)}.admin-business-detail-logo{flex:0 0 76px;width:76px;height:76px;border-radius:21px;font-size:28px}.admin-business-hero-card h2{margin:9px 0 4px}.admin-business-hero-user{color:#6d7c75;font-size:12px}.admin-business-info-card,.admin-business-decision-card{padding:20px}.admin-business-info-card h3,.admin-business-decision-card h3{margin:0 0 15px}.admin-business-description{padding:14px;margin-bottom:16px;border-radius:14px;background:#f7faf8;line-height:1.6;font-size:13px;white-space:pre-wrap}.admin-business-info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.admin-business-info-grid>div{padding:12px;border:1px solid #edf2ef;border-radius:13px}.admin-business-info-grid span{display:block;margin-bottom:5px;color:#89968f;font-size:10px}.admin-business-info-grid b{display:block;font-size:12px;overflow-wrap:anywhere}.admin-business-rejection-card{padding:16px;border:1px solid #ffd6d2;border-radius:18px;background:#fff6f5;color:#a4382f}.admin-business-rejection-card span{display:block;font-size:10px}.admin-business-decision-card p{color:#75847c;font-size:12px}.admin-business-approve,.admin-business-reject{width:100%;padding:13px 16px;border-radius:14px;font-weight:900}.admin-business-approve{background:#0b9660;color:#fff}.admin-business-reject-box{margin-top:14px;padding-top:14px;border-top:1px solid #edf1ef}.admin-business-reject-box label{display:block;margin-bottom:7px;font-size:11px;font-weight:800}.admin-business-reject-box textarea{width:100%;padding:12px;border:1px solid #dfe7e3;border-radius:13px;font:inherit}.admin-business-reject{margin-top:9px;background:#fff0ef;color:#b63b32;border:1px solid #ffd6d2}.admin-business-finished-card{padding:15px;border:1px solid #dfe9e4;border-radius:16px;background:#f8fbf9;color:#66776e;font-size:12px;font-weight:700}
@media(max-width:700px){.admin-business-screen{padding-bottom:110px}.admin-business-topbar h1{font-size:25px}.admin-business-item{gap:10px;padding:13px}.admin-business-item-date{display:none}.admin-business-info-grid{grid-template-columns:1fr}.admin-business-detail-logo{flex-basis:64px;width:64px;height:64px}}


/* ==================================================
   SCREEN SWITCH CURTAIN — FLICKER DIAGNOSTIC
   ================================================== */

#app.market-screen-switching{
  visibility:visible !important;
  pointer-events:none !important;
}

#app.market-screen-switching::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:2147483000;
  background:#f7f8fc;
  pointer-events:none;
}



/* ==================================================
   SCREEN SWITCH CURTAIN — FINAL MOBILE FIX

   Перекрываем только рабочую область приложения.
   Нижняя навигация остаётся неподвижной и видимой.
   ================================================== */

@media(max-width:700px){

  #app.market-screen-switching::after{
    content:"";
    position:fixed;

    top:0;
    left:0;
    right:0;

    /*
      Нижнюю панель НЕ перекрываем.
      Она остаётся постоянной оболочкой приложения.
    */
    bottom:calc(78px + env(safe-area-inset-bottom));

    z-index:90;

    background:#f7f8fc;

    pointer-events:none;
  }

  /*
    Нижняя навигация всегда находится выше
    переходного слоя и сама не перерисовывается.
  */
  nav.mobile-bottom-nav{
    z-index:1000 !important;
  }
}



/* ==================================================
   PROMOTED CARD — FAVORITE + TOP
   ================================================== */

html body .home-modern button.market-card-action.market-card-favorite.market-card-favorite-top,
html body button.market-card-action.market-card-favorite.market-card-favorite-top{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:5px !important;

  width:auto !important;
  height:36px !important;
  min-width:76px !important;
  min-height:36px !important;

  padding:0 10px !important;

  border:1px solid rgba(255,255,255,.52) !important;
  border-radius:999px !important;

  background:linear-gradient(
    135deg,
    #7457ff,
    #5c72f2
  ) !important;

  color:#fff !important;

  box-shadow:
    0 5px 16px rgba(79,67,190,.30) !important;

  overflow:hidden !important;
}

html body .home-modern button.market-card-favorite.market-card-favorite-top svg,
html body button.market-card-favorite.market-card-favorite-top svg{
  width:25px !important;
  height:25px !important;
  flex:0 0 25px !important;
  margin:0 !important;
}

html body .home-modern button.market-card-favorite.market-card-favorite-top [data-top-label],
html body button.market-card-favorite.market-card-favorite-top [data-top-label]{
  display:inline-block !important;
  position:static !important;
  margin:0 !important;

  color:#fff !important;
  font-size:11px !important;
  font-weight:900 !important;
  line-height:1 !important;
  letter-spacing:.3px !important;
}

html body .home-modern button.market-card-favorite.market-card-favorite-top:hover,
html body .home-modern button.market-card-favorite.market-card-favorite-top:active,
html body .home-modern button.market-card-favorite.market-card-favorite-top:focus,
html body button.market-card-favorite.market-card-favorite-top:hover,
html body button.market-card-favorite.market-card-favorite-top:active,
html body button.market-card-favorite.market-card-favorite-top:focus{
  background:linear-gradient(
    135deg,
    #7457ff,
    #5c72f2
  ) !important;

  border:1px solid rgba(255,255,255,.52) !important;

  box-shadow:
    0 5px 16px rgba(79,67,190,.30) !important;

  transform:none !important;
}

@media(max-width:700px){

  html body .home-modern button.market-card-action.market-card-favorite.market-card-favorite-top,
  html body button.market-card-action.market-card-favorite.market-card-favorite-top{
    left:8px !important;
    top:8px !important;

    width:auto !important;
    height:34px !important;
    min-width:72px !important;
    min-height:34px !important;

    padding:0 9px !important;
  }

  html body .home-modern button.market-card-favorite.market-card-favorite-top svg,
  html body button.market-card-favorite.market-card-favorite-top svg{
    width:23px !important;
    height:23px !important;
    flex-basis:23px !important;
  }
}

/* ALIVO account moderation, contacts and appeals */
.alivo-blocked-notice{border:1px solid #f4b9bb;border-radius:20px;padding:20px;margin:0 0 18px;background:linear-gradient(140deg,#fff5f5,#fffdfd);color:#702a32}
.alivo-blocked-notice h2{font-size:19px;font-weight:850;margin:0 0 10px}
.alivo-blocked-notice p{font-size:14px;line-height:1.6}
.alivo-blocked-notice button,.alivo-support-primary{display:inline-flex;justify-content:center;align-items:center;padding:12px 17px;border:0;border-radius:12px;background:#6851df;color:#fff!important;font-weight:800;cursor:pointer;text-decoration:none;margin-top:8px}
.alivo-support-overlay{position:fixed;inset:0;z-index:30000;background:rgba(16,22,40,.58);display:flex;align-items:center;justify-content:center;padding:16px}
.alivo-support-dialog{position:relative;width:min(100%,570px);max-height:90dvh;overflow:auto;padding:22px;border-radius:22px;background:#fff;color:#202333;box-shadow:0 25px 70px rgba(0,0,0,.22)}
.alivo-support-dialog h2{font-size:21px;padding-right:35px;margin:0 0 12px}
.alivo-support-close{position:absolute;right:15px;top:15px;border:0;border-radius:12px;background:#f0f1f5;padding:9px 12px;cursor:pointer}
.alivo-support-log{max-height:46dvh;overflow-y:auto;display:flex;flex-direction:column;gap:10px;margin:14px 0;padding:14px;background:#f6f7fb;border-radius:15px}
.alivo-support-message{align-self:flex-start;width:fit-content;max-width:95%;border-radius:13px;padding:11px 13px;background:#fff;white-space:pre-wrap;overflow-wrap:anywhere}
.alivo-support-message.mine{align-self:flex-end;background:#e8e5ff}
.alivo-support-message small{display:block;margin-bottom:5px;color:#676c7c;font-size:11px}
.alivo-support-dialog textarea{display:block;width:100%;box-sizing:border-box;border:1px solid #d7d8e2;border-radius:12px;padding:12px;font:inherit;resize:vertical}
.alivo-admin-appeals{background:#fff;border:1px solid #e9e5fb;border-radius:18px;padding:17px;margin-bottom:16px}
.alivo-admin-appeals h2{font-size:18px;margin:0 0 8px}
.alivo-admin-appeals button{display:flex;flex-direction:column;gap:5px;width:100%;text-align:left;border:1px solid #e8e7ef;background:#fafaff;border-radius:12px;padding:12px;margin:8px 0;cursor:pointer}
.alivo-admin-appeals small{color:#697082}

/* Account support appears alongside listing complaints in the existing Messages support tab. */
.alivo-support-inbox-card{display:flex;align-items:center;gap:12px;width:100%;padding:15px;margin:0 0 10px;border:1px solid #e4e5f1;border-radius:18px;text-align:left;background:linear-gradient(135deg,#faf9ff,#f3faff);box-shadow:0 6px 18px rgba(36,39,90,.05);font:inherit;cursor:pointer;color:#262b3d}
.alivo-support-inbox-card.is-unread{border-color:#afa2ff;background:linear-gradient(135deg,#f4f0ff,#edfbff)}
.alivo-support-inbox-card:focus-visible{outline:3px solid #7661ec;outline-offset:2px}
.alivo-support-inbox-icon{flex:none;display:flex;align-items:center;justify-content:center;width:49px;height:49px;border-radius:15px;background:linear-gradient(135deg,#765df3,#42b9fa);font-size:22px;color:#fff}
.alivo-support-inbox-body{display:flex;flex:1;flex-direction:column;gap:4px;min-width:0}
.alivo-support-inbox-body strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.alivo-support-inbox-body>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:#7c8291}
.alivo-support-inbox-body>.alivo-support-inbox-preview{font-size:12px;color:#535e74}
.alivo-support-inbox-meta{display:flex;flex:none;flex-direction:column;align-items:end;gap:6px;color:#939bb0;max-width:95px}
.alivo-support-inbox-meta small{font-size:9px;text-align:right}
.alivo-support-inbox-unread{border-radius:99px;background:#704fef;padding:4px 7px;color:white;font-size:10px;min-width:18px;text-align:center}
.alivo-support-empty-start{padding:45px 18px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:10px}
.alivo-support-empty-start>div{font-size:36px}
.alivo-support-empty-start strong{font-size:17px}
.alivo-support-empty-start p{max-width:330px;font-size:13px;color:#7d8492;line-height:1.6}
.alivo-support-empty-start button{border:0;border-radius:13px;background:#6b57e7;color:white;font-weight:800;padding:13px 18px;cursor:pointer}


/* ALIVO GUEST NAV V2: keyboard-safe bottom tabs */
@media(max-width:700px){
  /* Hiding by display prevents the bar moving above Android's IME. */
  body.market-keyboard-open nav.mobile-bottom-nav{
    display:none!important;
  }
}


/* ALIVO NAV PERFORMANCE V1: do not expose the previous Home brand
   during an asynchronous move to Messages or Favorites.
   The existing navigation curtain and scroll restoration remain intact. */
@media(max-width:760px){
  body.market-home-view:has(#app.market-screen-switching) .market-header{
    visibility:hidden !important;
    pointer-events:none !important;
  }
}

/* ALIVO AUTO GUARD V1 — private identifiers in the listing editor */
.alivo-private-vehicle-box{
  margin-top:14px;
  padding:17px;
  border:1px solid #dbe8e3;
  border-radius:16px;
  background:#f7fbf9;
  display:grid;
  gap:11px;
}
.alivo-private-vehicle-box strong{font-size:14px;color:#183c30;}
.alivo-private-vehicle-box p{margin:0;color:#63796f;font-size:12px;line-height:1.5;}
.alivo-private-vehicle-box label{display:grid;gap:6px;font-size:12px;font-weight:700;}
.alivo-private-vehicle-box input{width:100%;max-width:400px;min-width:0;}

/* ALIVO LANDSCAPE V1 — viewport adaptation only.
   Scoped to touch landscape devices with a short viewport; keeps portrait and
   all navigation, route history, scroll restoration and API behavior intact. */
@media screen and (orientation: landscape) and (max-width: 1200px) and (max-height: 650px) and (pointer: coarse) {
  /* Landscape on a phone is wide but not tall. Keep the navigation available
     without wasting a row on the tagline. */
  html body .market-header-inner {
    min-height: 48px !important;
    padding: 5px 12px !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
  }
  html body .market-header .alivo-tagline { display: none !important; }
  html body .market-header .market-nav {
    min-width: 0 !important;
    width: auto !important;
    flex: 1 1 auto !important;
    justify-content: flex-end !important;
    overflow-x: auto !important;
  }
  html body .market-header .market-nav-btn,
  html body .market-header .market-create-btn {
    min-height: 36px !important;
    padding-inline: 9px !important;
    font-size: 12px !important;
  }
  html body .market-header .market-account-btn {
    min-height: 38px !important;
    padding: 3px 5px !important;
  }

  /* Make the owner listing photos proportional to a wide device. Unlike the
     portrait design, do not expand one announcement into an enormous row. */
  html body .account-wow .account-listings-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  html body .account-wow .account-listing-card {
    width: auto !important;
    min-height: 0 !important;
    min-width: 0 !important;
  }
  html body .account-wow .account-listing-layout {
    display: grid !important;
    grid-template-columns: minmax(100px, 36%) minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px !important;
  }
  html body .account-wow .account-listing-photo {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 175px !important;
    aspect-ratio: 4/3 !important;
    overflow: hidden !important;
    border-radius: 13px !important;
  }
  html body .account-wow .account-listing-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  html body .account-wow .account-listing-info {
    padding: 0 !important;
    min-width: 0 !important;
  }
  html body .account-wow .account-listing-title {
    font-size: clamp(12px, 1.45vw, 16px) !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere !important;
  }
  html body .account-wow .account-listing-price {
    font-size: clamp(15px, 1.85vw, 21px) !important;
  }
  html body .account-wow .account-listing-meta {
    font-size: 10px !important;
  }
  html body .account-wow .account-listing-actions {
    flex-wrap: wrap !important;
  }

  /* Real listing's gallery should not exceed the height of a horizontal phone. */
  html body .listing-page .listing-photo-stage {
    height: clamp(180px, 54dvh, 390px) !important;
    min-height: 0 !important;
    max-height: 390px !important;
  }

  /* Direct conversation: use the VISIBLE viewport, not 360px/500px minima.
     Only the message history scrolls; composer never leaves the screen. */
  html body:has(#app > .chat-avito-screen) { overflow: hidden !important; }
  html body:has(#app > .chat-avito-screen) .market-header,
  html body:has(#app > .chat-avito-screen) nav.mobile-bottom-nav {
    display: none !important;
  }
  html body:has(#app > .chat-avito-screen) #app {
    height: var(--alivo-visible-chat-height, 100dvh) !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  html body #app > .chat-avito-screen {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: none !important;
    height: var(--alivo-visible-chat-height, 100dvh) !important;
    max-height: var(--alivo-visible-chat-height, 100dvh) !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  html body .chat-avito-screen .chat-avito-old-topbar { display: none !important; }
  html body .chat-avito-screen .chat-avito-panel {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    box-shadow: none !important;
  }
  html body .chat-avito-screen .chat-avito-peerbar {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    padding: 5px 12px !important;
    gap: 9px !important;
  }
  html body .chat-avito-screen .chat-avito-mobile-back {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
  }
  html body .chat-avito-screen .chat-avito-avatar {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
  }
  html body .chat-avito-screen .chat-avito-peername { font-size: 13px !important; }
  html body .chat-avito-screen .chat-avito-peerstatus { font-size: 10px !important; }
  html body .chat-avito-screen .chat-avito-listing-card {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    min-height: 0 !important;
    padding: 5px 10px !important;
    gap: 9px !important;
  }
  html body .chat-avito-screen .chat-avito-listing-photo {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }
  html body .chat-avito-screen .chat-avito-listing-title,
  html body .chat-avito-screen .chat-avito-listing-price { font-size: 12px !important; }
  html body .chat-avito-screen #messages.chat-avito-messages {
    display: block !important;
    flex: 1 1 0 !important;
    width: 100% !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 8px 12px !important;
    overscroll-behavior: contain !important;
  }
  html body .chat-avito-screen .chat-avito-empty {
    height: 100% !important;
    min-height: 0 !important;
    padding: 8px !important;
  }
  html body .chat-avito-screen .chat-avito-empty-icon {
    width: 36px !important;
    height: 36px !important;
    margin-bottom: 5px !important;
  }
  html body .chat-avito-screen .chat-avito-empty-title { font-size: 13px !important; }
  html body .chat-avito-screen .chat-avito-empty-subtitle {
    margin-top: 3px !important;
    font-size: 10px !important;
  }
  html body .chat-avito-screen .chat-avito-composer {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 0 !important;
    padding: 5px 10px max(5px, env(safe-area-inset-bottom)) !important;
    margin: 0 !important;
  }
  html body .chat-avito-screen .chat-avito-quick { display: none !important; }
  html body .chat-avito-screen .chat-avito-form {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 6px !important;
    margin-top: 0 !important;
  }
  html body .chat-avito-screen .chat-avito-form #messageText {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 36px !important;
    max-height: 52px !important;
    padding: 7px 10px !important;
    font-size: 14px !important;
  }
  html body .chat-avito-screen .chat-avito-form #chatAttachButton,
  html body .chat-avito-screen .chat-avito-form #chatChooseVoice,
  html body .chat-avito-screen .chat-avito-form button[type="submit"] {
    flex: 0 0 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    border-radius: 12px !important;
  }

  /* Support and ordinary chats must behave consistently in landscape. */
  html body:has(#app > .support-chat-screen) { overflow: hidden !important; }
  html body:has(#app > .support-chat-screen) .market-header,
  html body:has(#app > .support-chat-screen) nav.mobile-bottom-nav {
    display: none !important;
  }
  html body:has(#app > .support-chat-screen) #app {
    height: var(--alivo-visible-chat-height, 100dvh) !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  html body #app > .support-chat-screen {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: none !important;
    height: var(--alivo-visible-chat-height, 100dvh) !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  html body .support-chat-screen > .support-chat-page-top,
  html body .support-chat-screen .support-chat-reason { display: none !important; }
  html body .support-chat-screen .support-chat-layout {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
    overflow: hidden !important;
  }
  html body .support-chat-screen .support-chat-panel {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
  }
  html body .support-chat-screen .support-chat-header {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    padding: 6px 12px !important;
  }
  html body .support-chat-screen .support-chat-mobile-back { display: flex !important; }
  html body .support-chat-screen #supportMessages.support-chat-messages {
    flex: 1 1 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    padding: 8px 12px !important;
  }
  html body .support-chat-screen #supportMessageForm {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    padding: 6px 10px !important;
  }
}

/* Short desktop chat windows: scroll history inside panel instead of forcing
   360px of messages plus header and composer outside the visible viewport. */
@media screen and (min-width: 901px) and (min-height: 651px) {
  html body .chat-avito-screen .chat-avito-panel {
    display: flex !important;
    flex-direction: column !important;
    height: clamp(420px, calc(100dvh - 185px), 780px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  html body .chat-avito-screen #messages.chat-avito-messages {
    flex: 1 1 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
  }
  html body .chat-avito-screen .chat-avito-composer { flex: 0 0 auto !important; }
  html body .chat-avito-screen .chat-avito-empty { min-height: 0 !important; }
}

/* Balanced account listing images on PCs. Preserve the existing responsive
   two/three-column grid from alivo-desktop.css. */
@media screen and (min-width: 1201px) {
  html body .account-wow .account-listing-layout {
    grid-template-columns: minmax(150px, 33%) minmax(0, 1fr) !important;
    align-items: center !important;
  }
  html body .account-wow .account-listing-photo {
    min-height: 0 !important;
    width: 100% !important;
    aspect-ratio: 4/3 !important;
  }
  html body .account-wow .account-listing-photo img { object-fit: cover !important; }
}
