/* Inovest site2 — styles for the pages added on top of the prototype (same tokens & shapes). */

/* ---------- modal / bottom sheet ---------- */
.x-modal{position:fixed;inset:0;z-index:90;display:flex;align-items:center;justify-content:center;padding:16px}
.x-scrim{position:absolute;inset:0;background:rgba(2,21,33,.55);backdrop-filter:blur(3px)}
.x-sheet{position:relative;background:var(--surface);color:var(--text);border-radius:18px;width:min(640px,100%);max-height:90vh;overflow-y:auto;padding:22px;box-shadow:0 30px 80px rgba(2,21,33,.35)}
.x-sheet.wide{width:min(920px,100%)}
.x-close{position:absolute;top:14px;inset-inline-end:14px}
@media (max-width:720px){
  .x-modal{align-items:flex-end;padding:0}
  .x-sheet{border-radius:18px 18px 0 0;max-height:92vh;padding:18px 16px calc(18px + env(safe-area-inset-bottom))}
}

/* ---------- crypto ---------- */
.cx-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:22px}
.cx-stat{background:rgba(2,21,33,.45);border:1px solid var(--hero-border);border-radius:12px;padding:12px 14px}
.cx-stat span{display:block;font-size:12.5px;color:var(--hero-muted)}
.cx-stat b{font-family:var(--font-mono);font-weight:500;font-size:17px;color:#fff;direction:ltr;unicode-bidi:isolate}
.cx-bar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:space-between;margin-bottom:14px}
.cx-search{position:relative;flex:1 1 260px;max-width:420px}
.cx-search svg{position:absolute;inset-inline-start:14px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:var(--muted)}
.cx-search .input{padding-inline-start:42px}
.cx-row{display:grid;grid-template-columns:40px 26px minmax(0,1.6fr) minmax(0,1fr) 92px 1fr 1fr 110px;gap:10px;align-items:center;padding:10px 14px;border-bottom:1px solid var(--border);min-height:62px;cursor:pointer;background:none;border-inline:0;border-top:0;width:100%;text-align:start;color:var(--text);font:inherit}
.cx-row:last-child{border-bottom:0}
.cx-row:hover{background:var(--surface-2)}
.cx-row.head{min-height:40px;font-size:12.5px;color:var(--muted);font-weight:500;background:var(--surface-2);cursor:default}
.cx-rank{font-family:var(--font-mono);font-size:12px;color:var(--muted);text-align:center}
.cx-coin{display:flex;align-items:center;gap:10px;min-width:0}
.cx-coin img{width:28px;height:28px;border-radius:50%;flex:none;background:var(--surface-3)}
.cx-coin span{display:flex;flex-direction:column;min-width:0;line-height:1.3}
.cx-coin b{font-weight:600;color:var(--heading);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;direction:ltr;text-align:start}
.cx-coin small{font-family:var(--font-mono);font-size:12px;color:var(--muted);text-transform:uppercase}
.cx-px{font-family:var(--font-mono);text-align:end;font-weight:500;color:var(--heading);direction:ltr;white-space:nowrap}
.cx-n{font-family:var(--font-mono);font-size:13.5px;text-align:end;direction:ltr;white-space:nowrap;color:var(--text)}
.cx-spark{width:110px;height:32px;justify-self:end}
.cx-row .star{justify-self:center}
.cx-m{display:none}
.cx-skel{height:62px;border-bottom:1px solid var(--border);background:linear-gradient(90deg,var(--surface),var(--surface-2),var(--surface));background-size:200% 100%;animation:xsk 1.2s linear infinite}
@keyframes xsk{from{background-position:200% 0}to{background-position:-200% 0}}
.cx-chart{width:100%;height:240px;display:block}
.cx-conv{display:grid;grid-template-columns:1fr auto 1fr;gap:8px;align-items:end}
.cx-conv .sw{height:46px;display:flex;align-items:center;color:var(--muted)}
@media (max-width:900px){
  .cx-row{grid-template-columns:22px minmax(0,1fr) 64px minmax(92px,auto);padding:10px 12px}
  .cx-row .star,.cx-d{display:none!important}
  .cx-m{display:flex}
  .cx-spark{width:64px;height:28px}
  .cx-pm{flex-direction:column;align-items:flex-end;gap:3px}
  .cx-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cx-search{max-width:none;flex-basis:100%}
  .cx-chart{height:190px}
}

/* ---------- compare ---------- */
.cmp-tbl th:first-child,.cmp-tbl td:first-child{position:sticky;inset-inline-start:0;background:var(--surface);z-index:1;font-weight:600;color:var(--heading);min-width:150px}
.cmp-tbl th{vertical-align:top}
.cmp-tbl tr.diff td{background:rgba(224,161,0,.08)}
.cmp-pick{display:flex;flex-wrap:wrap;gap:8px}

/* ---------- article ---------- */
.prose{font-size:17px;line-height:1.95;color:var(--text)}
.prose h2{font-size:22px;margin:26px 0 8px}
.prose p{margin:0 0 14px}
.prose blockquote{margin:18px 0;padding:14px 18px;border-inline-start:4px solid var(--heading);background:var(--surface-2);border-radius:0 12px 12px 0;color:var(--heading);font-weight:500}
[dir="rtl"] .prose blockquote{border-radius:12px 0 0 12px}
.toc a{display:block;padding:6px 0;color:var(--muted);font-size:14.5px}
.toc a:hover{color:var(--heading)}
.meta{display:flex;flex-wrap:wrap;gap:8px 16px;color:var(--hero-muted);font-size:14px;margin-top:14px}

/* ---------- media ---------- */
.thumb{position:relative;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:var(--hero-bg);display:flex;align-items:center;justify-content:center;color:#fff;border:0;cursor:pointer;width:100%;padding:0}
.thumb::before{content:"";position:absolute;inset:0;background-image:radial-gradient(rgba(185,206,218,.18) 1px,transparent 1px);background-size:20px 20px}
.thumb .play{position:relative;width:56px;height:56px;border-radius:50%;background:rgba(255,255,255,.95);color:#022740;display:flex;align-items:center;justify-content:center}
.thumb .dur{position:absolute;bottom:10px;inset-inline-end:10px;background:rgba(2,21,33,.8);font-family:var(--font-mono);font-size:12px;padding:2px 8px;border-radius:6px}
.thumb .lbl{position:absolute;top:10px;inset-inline-start:10px}
.gal{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px}
.gal button{aspect-ratio:4/3;border-radius:12px;border:0;cursor:pointer;color:#fff;font-weight:600;padding:14px;display:flex;align-items:flex-end;text-align:start}
.player{aspect-ratio:16/9;border-radius:12px;background:#021521;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;position:relative;overflow:hidden}
.player .bar{position:absolute;inset-inline:0;bottom:0;height:4px;background:rgba(255,255,255,.15)}
.player .bar i{display:block;height:100%;background:#5EA8F2;width:0;transition:width .3s linear}

/* ---------- about / branches ---------- */
.branch{display:flex;justify-content:space-between;align-items:center;gap:10px;width:100%;min-height:60px;padding:12px 14px;border-radius:12px;border:1px solid var(--border);background:var(--surface);cursor:pointer;text-align:start;color:var(--text)}
.branch[aria-pressed="true"]{border:2px solid var(--heading);background:var(--surface-2)}
.map-box{border-radius:14px;overflow:hidden;border:1px solid var(--border);background:var(--surface-3);aspect-ratio:4/3;min-height:280px}
.map-box iframe{width:100%;height:100%;border:0;display:block}
.err{color:#C2410C;font-size:13px}
[data-theme="dark"] .err{color:#FB923C}
.input[aria-invalid="true"]{border-color:#C2410C}

/* ---------- community ---------- */
.post{display:grid;grid-template-columns:56px 1fr;gap:14px;padding:16px;border-bottom:1px solid var(--border)}
.post:last-child{border-bottom:0}
.vote{display:flex;flex-direction:column;align-items:center;gap:2px}
.vote button{width:40px;height:34px;border-radius:8px;border:1px solid var(--border);background:var(--surface);cursor:pointer;color:var(--muted)}
.vote button[aria-pressed="true"]{background:var(--btn-bg);color:var(--btn-text);border-color:var(--btn-bg)}
.vote b{font-family:var(--font-mono);font-weight:500}

/* ---------- AI assistant ---------- */
.chat{display:flex;flex-direction:column;height:min(560px,70vh)}
.chat-log{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:10px;padding:16px}
.msg{max-width:82%;padding:10px 14px;border-radius:14px;line-height:1.75;font-size:15px;white-space:pre-line}
.msg.me{align-self:flex-end;background:var(--btn-bg);color:var(--btn-text);border-end-end-radius:4px}
.msg.bot{align-self:flex-start;background:var(--surface-2);border-end-start-radius:4px}
.chat-in{display:flex;gap:8px;padding:12px;border-top:1px solid var(--border)}
.dots{display:inline-flex;gap:4px}.dots i{width:6px;height:6px;border-radius:50%;background:var(--muted);animation:dot 1s infinite}
.dots i:nth-child(2){animation-delay:.15s}.dots i:nth-child(3){animation-delay:.3s}
@keyframes dot{0%,80%,100%{opacity:.3}40%{opacity:1}}

/* ---------- auth ---------- */
.auth-wrap{display:grid;grid-template-columns:1fr 1fr;min-height:calc(100vh - 160px)}
.auth-side{background:var(--hero-bg);color:#fff;padding:48px;display:flex;flex-direction:column;justify-content:center;gap:16px;position:relative;overflow:hidden}
.auth-side::before{content:"";position:absolute;inset:0;background-image:radial-gradient(rgba(185,206,218,.18) 1px,transparent 1px);background-size:24px 24px;-webkit-mask-image:linear-gradient(to bottom,#000 30%,transparent);mask-image:linear-gradient(to bottom,#000 30%,transparent)}
.auth-side>*{position:relative}
.auth-side h2{color:#fff;font-size:30px}
.auth-form{padding:40px 24px;display:flex;align-items:center;justify-content:center}
.auth-form>div{width:min(420px,100%)}
.pw{position:relative}.pw button{position:absolute;inset-inline-end:6px;top:50%;transform:translateY(-50%);border:0;background:none;color:var(--muted);cursor:pointer;font-size:13px;padding:6px 8px}
@media (max-width:900px){.auth-wrap{grid-template-columns:1fr}.auth-side{display:none}}

/* ---------- mobile tab bar ---------- */
.tabbar{display:none}
@media (max-width:720px){
  body{padding-bottom:calc(64px + env(safe-area-inset-bottom))}
  .tabbar{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;inset-inline:0;bottom:0;z-index:70;height:calc(64px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:saturate(1.4) blur(12px);-webkit-backdrop-filter:saturate(1.4) blur(12px);border-top:1px solid var(--border)}
  .tabbar a{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--muted);font-size:11.5px;font-weight:500}
  .tabbar a svg{width:22px;height:22px}
  .tabbar a[aria-current="page"]{color:var(--heading);font-weight:600}
  .tabbar a[aria-current="page"]::before{content:"";position:absolute;top:0;width:28px;height:3px;border-radius:0 0 3px 3px;background:var(--heading)}
  .toast{bottom:calc(78px + env(safe-area-inset-bottom))}
  .cmpbar{bottom:calc(64px + env(safe-area-inset-bottom))!important}
  .site-footer{margin-top:24px}
  .container{padding-inline:16px}
  .section{padding-block:40px}
  .input,select.input,textarea.input{font-size:16px}
}
textarea.input{min-height:120px;padding-block:12px;resize:vertical;line-height:1.7}
select.input{appearance:auto}

/* ---------- same navy + dot-grid background as the home hero, on every dark band ---------- */
.page-hero,.ai-hero,.cta-band{position:relative;overflow:hidden;background-color:var(--hero-bg)}
.page-hero::before,.ai-hero::before,.cta-band::before{content:"";position:absolute;inset:0;pointer-events:none;background-image:radial-gradient(rgba(185,206,218,.18) 1px,transparent 1px);background-size:24px 24px;-webkit-mask-image:linear-gradient(to bottom,#000 30%,transparent);mask-image:linear-gradient(to bottom,#000 30%,transparent)}
.page-hero>*,.ai-hero>*,.cta-band>*{position:relative}

/* ---------- main bar (site-1 style: nav + More, alerts, user menu) ---------- */
.hdr{gap:14px}
.main-nav{align-items:center;gap:2px}
.main-nav a,.nav-more{padding:8px 10px;border-radius:8px;font-weight:500;font-size:15px;color:var(--text);white-space:nowrap}
.nav-more{display:inline-flex;align-items:center;gap:4px;border:0;background:none;cursor:pointer;font-family:inherit}
.nav-more:hover,.nav-more.on,.nav-more[aria-expanded="true"]{background:var(--surface-2);color:var(--heading)}
.dd-wrap{position:relative}
.dd{position:absolute;top:calc(100% + 8px);z-index:60;width:290px;background:var(--surface);border:1px solid var(--border);border-radius:14px;box-shadow:0 24px 60px rgba(2,21,33,.18);padding:6px}
.dd-start{inset-inline-start:0}.dd-end{inset-inline-end:0}
.dd-item{display:flex;flex-direction:column;gap:1px;padding:10px 12px;border-radius:10px;color:var(--text);width:100%;border:0;background:none;text-align:start;cursor:pointer;font:inherit}
.dd-item b{font-weight:600;color:var(--heading);font-size:14.5px;display:flex;align-items:center;gap:8px}
.dd-item span{font-size:12.5px;color:var(--muted)}
.dd-item:hover{background:var(--surface-2)}
.dd-item.row-i{flex-direction:row;align-items:center;gap:10px;font-weight:500;font-size:14.5px}
.dd-item.danger{color:#B42318}[data-theme="dark"] .dd-item.danger{color:#F97066}
.dot{width:8px;height:8px;border-radius:50%;background:var(--heading);flex:none;display:inline-block}
.icon-btn{position:relative}
.badge{position:absolute;top:4px;inset-inline-end:4px;min-width:18px;height:18px;padding-inline:4px;border-radius:9px;background:#C2410C;color:#fff;font-size:11px;font-style:normal;line-height:18px;text-align:center}
.user-btn{display:flex;align-items:center;gap:8px;height:44px;padding:4px;padding-inline-end:10px;border-radius:999px;border:1px solid var(--border);background:var(--surface);color:var(--heading);cursor:pointer;font:inherit;font-weight:600;font-size:14px}
.user-btn:hover{background:var(--surface-2)}
@media (max-width:1440px){.u-name{display:none}}
@media (max-width:1280px){.main-nav a,.nav-more{padding-inline:8px;font-size:14.5px}}
@media (max-width:1200px){.main-nav{display:none}.show-md{display:inline-flex}.hide-md{display:none}}
@media (min-width:1201px){.show-md{display:none!important}}
@media (max-width:600px){.dd{position:fixed;inset-inline:10px!important;top:120px;width:auto!important;max-height:calc(100vh - 220px);overflow-y:auto}.user-btn{padding-inline-end:4px}.user-btn svg{display:none}}

/* ---------- shared confirm + status chips ---------- */
.chip-warn{background:rgba(224,161,0,.14);color:#8A5300}[data-theme="dark"] .chip-warn{color:#F5C542}
.chip-bad{background:rgba(194,65,12,.12);color:#B42318}[data-theme="dark"] .chip-bad{color:#FB923C}
.btn-danger{background:#B42318;color:#fff}.btn-danger:hover{background:#8F1B12}
.cf-ic{width:52px;height:52px;border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:700;margin-bottom:12px;background:var(--surface-2);color:var(--heading)}
.cf-ic.bad{background:rgba(194,65,12,.12);color:#B42318}
.x-cf{z-index:95}
button.link{border:0;background:none;cursor:pointer;font:inherit;padding:0}
.q-row{width:100%;border-inline:0;border-top:0;background:none;cursor:pointer;font:inherit;color:var(--text);text-align:start}
.q-row:hover{color:var(--heading)}

/* ---------- dashboard / admin sidebar (collapsible, like site 1) ---------- */
.d2-side{flex:0 0 250px;position:sticky;top:0;align-self:flex-start;min-height:calc(100vh - 120px);transition:flex-basis .2s}
.d2-side.col{flex-basis:72px}
.d2-side button,.d2-side a.d2-site{display:flex;align-items:center;gap:12px;position:relative}
.d2-side svg{flex:none}
.d2-side.col button span,.d2-side.col .d2-h,.d2-side.col a.d2-site span{display:none}
.d2-side.col button,.d2-side.col a.d2-site{justify-content:center;padding:0}
.d2-side .badge{position:static;margin-inline-start:auto}
.d2-side.col .badge{position:absolute;top:4px;inset-inline-end:6px}
.d2-h{font-size:12px;color:#7F95A3;padding:14px 14px 6px;letter-spacing:.02em}
.d2-col{justify-content:flex-end!important;min-height:36px!important;color:#7F95A3!important}
.d2-side.col .d2-col{justify-content:center!important}
a.d2-site{min-height:44px;padding:0 14px;border-radius:10px;color:#B9CEDA;margin-top:auto;font-size:14.5px}
a.d2-site:hover{background:#022740;color:#fff}
@media (max-width:700px){
  .d2-side,.d2-side.col{flex:1 1 100%;position:static;min-height:0;align-self:stretch}
  .d2-side .d2-h,.hide-mob,a.d2-site{display:none!important}
  .d2-side.col button span{display:inline}
  .d2-side.col button{padding:0 14px}
}

/* ---------- crypto widgets (Fear & Greed, trending, exchange prices) ---------- */
.cx-widgets{grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));margin-bottom:16px}
.cx-trend{display:flex;flex-wrap:wrap;gap:8px}
.tchip{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:4px 10px;border-radius:999px;border:1px solid var(--border-strong);background:var(--surface);color:var(--heading);font:inherit;font-size:13.5px;cursor:pointer}
.tchip:hover{background:var(--surface-2)}
.tchip img{border-radius:50%}
.tchip span{font-family:var(--font-mono);font-size:12px}
.tchip span.up{color:var(--up)}.tchip span.down{color:var(--down)}
.pairs{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:12px}
.fng-chip{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--hero-muted)}
.fng-chip i{width:8px;height:8px;border-radius:50%}
.fng-chip b{color:#fff;font-weight:500}
.fng-slot{margin:-4px 0 10px}

/* ---------- mobile: tables as cards, dropdown sheet, drawer buttons ---------- */
.drw-btn{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:0 12px;border:0;border-radius:10px;background:none;color:var(--text);font:inherit;font-weight:500;cursor:pointer;text-align:start}
.drw-btn:hover{background:var(--surface-2)}
.drw-btn svg{width:20px;height:20px}
.dd-scrim{display:none}
@media (max-width:600px){
  .dd{top:var(--dd-top,120px)!important}
  .dd-scrim{display:block;position:fixed;inset:0;top:var(--dd-top,120px);background:rgba(2,21,33,.35);z-index:55}
  .tbl.stack-sm thead{display:none}
  .tbl.stack-sm,.tbl.stack-sm tbody,.tbl.stack-sm tr,.tbl.stack-sm td{display:block;width:100%}
  .tbl.stack-sm tr{padding:10px 4px;border-bottom:1px solid var(--border)}
  .tbl.stack-sm tr:last-child{border-bottom:0}
  .tbl.stack-sm td{display:flex;justify-content:space-between;align-items:center;gap:12px;border:0!important;padding:5px 12px!important;text-align:end;white-space:normal!important}
  .tbl.stack-sm td::before{content:attr(data-label);color:var(--muted);font-size:12.5px;text-align:start;flex:none;max-width:45%}
  .tbl.stack-sm td[data-label=""]::before{display:none}
  .tbl.stack-sm td[data-label=""]{justify-content:flex-end}
  .tbl-wrap:has(.stack-sm){overflow:visible}
  .steps{display:flex;overflow-x:auto;gap:10px;scrollbar-width:none}
  .steps li{flex:0 0 auto;min-width:76px}
  .statusline li{font-size:11.5px}
  .app-main .row.between>div:first-child{flex:1 1 100%}
}
@media (max-width:400px){.stats{grid-template-columns:1fr 1fr}.stat b{font-size:14px}}
.site-header,.tabbar{padding-inline:env(safe-area-inset-left) env(safe-area-inset-right)}

/* auth: tabs may not widen the form on small phones */
.auth-form>div{min-width:0}
@media (max-width:600px){.auth-form{padding:24px 16px}}

/* ---------- home page on phones ---------- */
/* ticker strip always runs left-to-right so it starts on screen in Arabic too */
.ticker{direction:ltr}
[dir="rtl"] .ticker .ticker-ctrl{background:linear-gradient(to left,var(--surface) 60%,transparent)}
.qmore{display:none;width:100%;border-top:1px solid var(--border);border-radius:0;min-height:48px}
@media (max-width:640px){
  .hero-grid{padding-block:32px 36px;gap:24px}
  .hero-search{flex-wrap:nowrap}
  .hero-search input{flex:1 1 auto;min-width:0;min-height:50px}
  .hero-search .btn{flex:none;padding-inline:14px}
  .hero .row>.btn{flex:1 1 auto}
  .trust{gap:6px 14px;font-size:13.5px}
  .snap-grid{gap:10px}
  .snap-item{padding:12px}
  .snap-item .num.big{font-size:20px}
  .qmore{display:block}
  #qlist:not(.all) .qrow:not(.head):nth-child(n+11){display:none}
  .chart-top{flex-direction:column;align-items:stretch;gap:10px}
  .chart-top .stack[style*="align-items:flex-end"]{align-items:stretch!important}
  .chart-top .seg{display:flex;width:100%}.chart-top .seg button{flex:1}
  /* brokers + experts become swipeable rows on the home page */
  body[data-route="home"] .g-auto-300,body[data-route="markets"] .g-auto-300,
  body[data-route="home"] .g-auto-260:has(> a.card),body[data-route="markets"] .g-auto-260:has(> a.card){display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:12px;margin-inline:-16px;padding:2px 16px 8px;scrollbar-width:none}
  body[data-route="home"] .g-auto-300>*,body[data-route="markets"] .g-auto-300>*{flex:0 0 86%;scroll-snap-align:center}
  body[data-route="home"] .g-auto-260:has(> a.card)>*,body[data-route="markets"] .g-auto-260:has(> a.card)>*{flex:0 0 78%;scroll-snap-align:center}
  .cta-band{padding:28px 20px;border-radius:16px}
  .cta-band .btn{width:100%}
  .sec-head{margin-bottom:16px}
  .proto-bar{font-size:11.5px;padding:4px 10px;line-height:1.5}
}

/* hero columns may shrink below their content (fixes 360px phones) */
.hero-grid>*{min-width:0}
@media (max-width:960px){.hero-grid{grid-template-columns:minmax(0,1fr)}}
.snap-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.snap-item{min-width:0;overflow:hidden}
.snap-item svg{width:100%}

/* tiny phones (320-360px) */
@media (max-width:720px){.tabbar{grid-template-columns:repeat(5,minmax(0,1fr))}.tabbar a span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:2px}}
@media (max-width:640px){body[data-route="home"] .g-auto-300,body[data-route="markets"] .g-auto-300,body[data-route="home"] .g-auto-260:has(> a.card),body[data-route="markets"] .g-auto-260:has(> a.card){margin-inline:0;padding-inline:0}}
@media (max-width:360px){.tabbar a{font-size:10.5px}.hdr{gap:8px}.logo span{font-size:18px}.logo svg{width:28px;height:28px}.container{padding-inline:12px}}
@media (max-width:360px){.hdr-actions{gap:6px}.hdr [data-action="lang"] svg{display:none}.hdr [data-action="lang"]{min-width:40px;padding:0 8px}.hdr .icon-btn{min-width:40px;height:40px}.user-btn{height:40px;padding:2px}.user-btn .avatar{width:32px!important;height:32px!important}}
.tabbar a{min-width:0}.tabbar a span{display:block;width:100%;text-align:center}
/* smallest phones (≤360px): prototype inline grids/flex-bases with fixed minimums */
@media (max-width:400px){
  [style*="minmax(320px"],[style*="minmax(340px"],[style*="minmax(360px"],[style*="minmax(380px"]{grid-template-columns:minmax(0,1fr)!important}
  [style*="flex:1 1 380px"],[style*="flex:1 1 340px"],[style*="flex:1 1 320px"]{flex-basis:100%!important;min-width:0}
  .grid>*{min-width:0}
  .ulTabs{max-width:100%;gap:16px}
  .auth-form .stack>*{min-width:0;max-width:100%}
  .bars{gap:4px}.bars-l{gap:4px}.bars-l span{min-width:0;font-size:10px;overflow:hidden}
}
@media (max-width:900px){.auth-wrap{grid-template-columns:minmax(0,1fr)}.auth-form{min-width:0}}
