/* EM REWARDS WORLD — V7 single visual system, modelled on Earn ACP.
 * Loaded after legacy bundles. No !important; do not override layout display/grid,
 * modal visibility, payouts, timers, or third-party advertisement containers.
 * Legacy bundles are isolated in @layer emrw_legacy.
 */
:root {
 --emrw-ui-body:'DM Sans',system-ui,-apple-system,'Segoe UI',Arial,sans-serif;
 --emrw-ui-heading:'Space Grotesk','DM Sans',system-ui,sans-serif;
 --emrw-ui-bg:#0b1523;
 --emrw-ui-panel:#142638;
 --emrw-ui-panel-deep:#122334;
 --emrw-ui-line:rgba(110,217,192,.23);
 --emrw-ui-text:#eaf4f9;
 --emrw-ui-muted:#a9c0cc;
 --emrw-ui-accent:#69e2b3;
 --emrw-ui-radius:18px;
 --emrw-ui-shadow:0 12px 34px rgba(1,10,19,.18);
}
html {font-size:16px;-webkit-text-size-adjust:100%;text-size-adjust:100%;font-synthesis:none}
html body {margin:0;color:var(--emrw-ui-text);font:400 15px/1.55 var(--emrw-ui-body);-webkit-font-smoothing:antialiased}
html body :is(p,span,div,section,article,aside,header,footer,nav,label,form,button,input,select,textarea,a,li,td,th,summary,small,legend,time,details) {font-family:var(--emrw-ui-body);font-synthesis:none}
html body :is(h1,h2,h3,h4,h5,h6),html body :is(h1,h2,h3,h4,h5,h6) :is(span,strong,b) {font-family:var(--emrw-ui-heading);font-weight:700;letter-spacing:-.024em;line-height:1.2;font-synthesis:none}
html body h1{font-size:clamp(25px,2.6vw,36px)}
html body h2{font-size:clamp(20px,2vw,27px)}
html body h3{font-size:clamp(17px,1.55vw,21px)}
html body :is(strong,b){font-weight:700}
html body :is(button,input,select,textarea,.btn,[role="button"]){font-family:var(--emrw-ui-body);letter-spacing:normal}
html body :is(pre,code,kbd,samp),html body :is(pre,code,kbd,samp) *{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
html body :is(.app-body,.emrw-chat-body,.emrw-hub-body,.emrw-ranks-body,.emrw-leaderboard-body,.emrw-exchange-body,.emrw-video-body,.emrw-pv2-adminbody,.emrw-help-page,.emrw-ptc-view-body){background:var(--emrw-ui-bg);color:var(--emrw-ui-text)}
/* Main navigation: normalized content typography without altering mobile toggles */
html body :is(.sidebar,#sidebar,.emrw-shared-sidebar) :is(.nav-link,.main-nav a,.sidebar-label){font-family:var(--emrw-ui-body);letter-spacing:0}
html body :is(.sidebar,#sidebar,.emrw-shared-sidebar) .nav-link{font-size:12px;font-weight:600;line-height:1.35}
html body :is(.sidebar,#sidebar,.emrw-shared-sidebar) .sidebar-label{font-size:10px;font-weight:700;letter-spacing:.08em}
html body :is(.sidebar,#sidebar,.public-nav,.auth-side) a.brand{font-family:var(--emrw-ui-heading);font-weight:700}
html body :is(.sidebar,#sidebar,.public-nav,.auth-side) a.brand .brand-mark{box-sizing:border-box;display:grid;place-items:center;flex:0 0 37px;width:37px;height:37px;border-radius:12px;background:linear-gradient(145deg,#2bb987,#335a91);color:#e3fff5;font-size:24px;line-height:1;box-shadow:none;transform:none}
html body :is(.sidebar,#sidebar,.public-nav,.auth-side) a.brand :is(.brand-world,.brand-light){color:#8ceac1}
html body :is(.sidebar,#sidebar,.public-nav,.auth-side) a.brand :is(.brand-name,.brand-name-main,.brand-world){font-family:var(--emrw-ui-heading);font-weight:700}
html body :is(.sidebar,#sidebar,.public-nav,.auth-side) a.brand small{font-family:var(--emrw-ui-body);font-size:9px;font-weight:600;letter-spacing:.08em}
/* Workspace header — common appearance; existing language and mobile logic untouched */
html body :is(.topbar,.chat-topbar,.emrw-hub-top,.emrw-help-topbar,.ptc-view-topbar,.emrw-v6-utility-header){box-sizing:border-box;min-height:66px;background:#111f2e;color:var(--emrw-ui-text);border-bottom:1px solid var(--emrw-ui-line);border-radius:0;box-shadow:none;font-family:var(--emrw-ui-body)}
html body :is(.topbar,.chat-topbar,.emrw-hub-top,.emrw-help-topbar,.ptc-view-topbar,.emrw-v6-utility-header) :is(.breadcrumbs,.emrw-v5-breadcrumbs){color:#b8cfdb;font:500 12px/1.4 var(--emrw-ui-body);letter-spacing:0}
html body :is(.topbar,.chat-topbar,.emrw-hub-top,.emrw-help-topbar,.ptc-view-topbar,.emrw-v6-utility-header) :is(.breadcrumbs,.emrw-v5-breadcrumbs) strong{color:var(--emrw-ui-text);font-weight:700}
html body :is(.topbar,.chat-topbar,.emrw-hub-top,.emrw-help-topbar,.ptc-view-topbar,.emrw-v6-utility-header) :is(.language-flag-button,.emrw-v5-flags a){box-sizing:border-box;flex-shrink:0}
/* Earn ACP-inspired first information area across standalone and embedded modules. */
html body :is(.emrw-v5-hero,.page-intro,.snapshot-hero,.rp-hero,.chat-intro,.emrw-tk-hero,.emrw-pv2-hero,.emrw-lv2-hero,.emrw-mining-hero,.emrw-ranks-hero,.emrw-leaderboard-hero,.emrw-exchange-hero,.emrw-video-hero,.emrw-help-hero,.emrw-hub-hero,.emrw-auto-hero){
 box-sizing:border-box;min-width:0;background:linear-gradient(143deg,#183247,#112638);border:1px solid var(--emrw-ui-line);border-radius:20px;box-shadow:var(--emrw-ui-shadow);color:var(--emrw-ui-text);
}
html body :is(.emrw-v5-hero,.page-intro,.snapshot-hero,.rp-hero,.chat-intro,.emrw-tk-hero,.emrw-pv2-hero,.emrw-lv2-hero,.emrw-mining-hero,.emrw-ranks-hero,.emrw-leaderboard-hero,.emrw-exchange-hero,.emrw-video-hero,.emrw-help-hero,.emrw-hub-hero) :is(h1,h2){font-family:var(--emrw-ui-heading);font-weight:700;letter-spacing:-.03em}
html body :is(.emrw-v5-hero,.page-intro,.snapshot-hero,.rp-hero,.chat-intro,.emrw-tk-hero,.emrw-pv2-hero,.emrw-lv2-hero,.emrw-mining-hero,.emrw-ranks-hero,.emrw-leaderboard-hero,.emrw-exchange-hero,.emrw-video-hero,.emrw-help-hero,.emrw-hub-hero) p{color:var(--emrw-ui-muted)}
/* Cards and panels: surface only. Never impose display/grid dimensions or spacing. */
html body :is(.panel,.card,.emrw-tk-section,.emrw-tk-daily-card,.emrw-tk-once-card,.emrw-lv2-progress,.emrw-lv2-table-panel,.emrw-mining-panel,.emrw-mining-grade-panel,.emrw-pv2-panel,.emrw-pv2-wallet-card,.emrw-video-card,.emrw-ranks-panel,.emrw-ranks-stat,.emrw-leaderboard-panel,.emrw-leaderboard-stat,.emrw-exchange-card,.emrw-exchange-balance,.chat-card,.chat-side-card,.chat-admin-panel,.emrw-help-card,.emrw-hub-section,.emrw-hub-work-section,.emrw-hub-overview article,.emrw-audit-panel,.emrw-audit-kpis article,.emrw-ph-highlights article,.emrw-ph-totals,.emrw-auto-flow-tile,.emrw-fuel-panel,.rp-panel){
 box-sizing:border-box;min-width:0;background-color:var(--emrw-ui-panel);border-color:var(--emrw-ui-line);border-radius:var(--emrw-ui-radius);color:var(--emrw-ui-text);
}
html body :is(.panel,.card,.emrw-tk-section,.emrw-video-card,.emrw-ranks-panel,.emrw-leaderboard-panel,.emrw-exchange-card,.chat-card,.chat-side-card,.chat-admin-panel,.emrw-help-card,.emrw-hub-section,.emrw-hub-work-section,.rp-panel) :is(h2,h3){font-family:var(--emrw-ui-heading);font-weight:700}
html body :is(.btn,.emrw-hub-refresh,.emrw-tk-collect-button,.emrw-v5-topbar button){font-family:var(--emrw-ui-body);font-weight:700}
html body :is(.page-content,.emrw-ranks,.emrw-leaderboard,.emrw-exchange,.emrw-video,.emrw-hub,.chat-shell,.emrw-help-wrap){box-sizing:border-box;min-width:0}
/* Admin gets consistent tokens, NOT shared flex/grid rules from member dashboard. */
html body:is(.emrw-hub-body,.emrw-pv2-adminbody) :is(.emrw-hub,.emrw-pv2-admin){color:var(--emrw-ui-text)}
html body:is(.emrw-hub-body,.emrw-pv2-adminbody) :is(h1,h2,h3){font-family:var(--emrw-ui-heading)}
html body .emrw-global-footer{font-family:var(--emrw-ui-body);background:#101f2d;color:var(--emrw-ui-muted);border-top:1px solid var(--emrw-ui-line)}
html body .emrw-global-footer :is(h2,h3){font-family:var(--emrw-ui-heading)}
@media(max-width:900px){html body :is(.topbar,.chat-topbar,.emrw-hub-top,.emrw-help-topbar,.ptc-view-topbar,.emrw-v6-utility-header){min-height:60px}html body :is(.emrw-v5-hero,.page-intro,.snapshot-hero,.rp-hero,.chat-intro){max-width:100%}}
@media(max-width:540px){html body :is(.emrw-v5-hero,.page-intro,.snapshot-hero,.rp-hero,.chat-intro){border-radius:16px}html body :is(.page-content,.emrw-ranks,.emrw-leaderboard,.emrw-exchange,.emrw-video){min-width:0}}

/* Compact admin utilities that previously lacked a common page header. */
html body .emrw-v7-standalone-topbar { box-sizing:border-box;min-height:66px;padding:12px clamp(16px,3vw,36px);display:flex;align-items:center;justify-content:space-between;gap:12px;background:#111f2e;border-bottom:1px solid var(--emrw-ui-line);color:var(--emrw-ui-text) }
html body .emrw-v7-crumb { font:500 12px/1.4 var(--emrw-ui-body);color:#b8cfdb }
html body .emrw-v7-crumb span{padding-inline:8px;opacity:.7}
html body .emrw-v7-crumb strong{color:var(--emrw-ui-text)}
html body .emrw-v7-admin-return{font:700 12px/1.3 var(--emrw-ui-body);color:#7ddbb8;white-space:nowrap;text-decoration:none}
@media(max-width:900px){html body .emrw-v7-standalone-topbar{min-height:60px;padding:10px 14px}}


/* V8 — SCREENSHOT-CONFIRMED TOPBAR REPAIR (NO GLOBAL GRID OVERRIDES) */
/* Native selects stay available to JavaScript; visually use exactly one 3-flag group. */
html body select.emrw-v5-original-select,
html body select.emrw-original-lang-select { display:none!important; }
html body .emrw-v5-topbar .emrw-v5-flags {
 display:inline-flex;align-items:center;justify-content:center;flex-wrap:nowrap;
 gap:5px;white-space:nowrap;line-height:1;
 background:#152735;border:1px solid rgba(110,217,192,.24);border-radius:12px;
 padding:4px 5px;max-width:100%;flex:0 0 auto;
}
html body .emrw-v5-topbar .emrw-v5-flags > a {
 display:inline-flex;align-items:center;justify-content:center;
 box-sizing:border-box;flex:0 0 38px;width:38px;height:31px;
 padding:3px 4px;margin:0;border:1px solid transparent;border-radius:8px;
 color:#eaf7f8;text-decoration:none;background:transparent;
}
html body .emrw-v5-topbar .emrw-v5-flags > a:is(:hover,.is-current,[aria-current="true"]){
 border-color:rgba(98,226,185,.42);background:#1d4350;
}
html body .emrw-v5-topbar .emrw-v5-flags .flag-svg{
 display:block;width:28px;height:19px;min-width:0;max-height:19px;border-radius:3px;overflow:hidden;
}
html body .emrw-v5-topbar :is(.topbar-right,.emrw-ranks-toolbar,.emrw-leaderboard-lang,.emrw-hub-toplinks){
 display:flex;flex-wrap:nowrap;align-items:center;gap:9px;min-width:0;
}
html body .emrw-v5-topbar .topbar-right{margin-left:auto;flex:0 1 auto;justify-content:flex-end}
/* Same compact Fuel / online / profile badges as Earn ACP. */
html body .emrw-v5-topbar .emrw-fuel-topbar{flex:0 0 auto}
html body .emrw-v5-topbar .top-avatar{flex:0 0 auto}
html body .emrw-v5-topbar :is(.breadcrumbs,.emrw-v5-breadcrumbs){flex:0 1 auto;min-width:0}
/* Standard hero spacing and typography, not grid-template or display changes. */
html body :is(.emrw-tk-hero,.emrw-video-hero,.emrw-exchange-hero,.emrw-ranks-hero,.emrw-leaderboard-hero,.emrw-hub-hero){
 padding:clamp(22px,2.5vw,32px);min-height:190px;
}
html body :is(.emrw-tk-hero,.emrw-video-hero,.emrw-exchange-hero,.emrw-ranks-hero,.emrw-leaderboard-hero,.emrw-hub-hero) h1{
 font-family:'Space Grotesk','DM Sans',sans-serif;font-size:clamp(26px,2.5vw,34px);font-weight:700;line-height:1.18;
}
html body :is(.emrw-tk-hero,.emrw-video-hero,.emrw-exchange-hero,.emrw-ranks-hero,.emrw-leaderboard-hero,.emrw-hub-hero) :is(p,span,small){font-family:'DM Sans',system-ui,sans-serif}
/* Standalone admin hub shares the same left navigation, content width, and sticky topbar. */
html body.emrw-admin-shell .emrw-admin-main-area{min-width:0}
html body.emrw-admin-shell .emrw-hub{width:100%;max-width:1550px;flex:1;padding:28px clamp(18px,3vw,36px) 48px}
html body.emrw-admin-shell .emrw-hub-top{
 position:sticky;top:0;z-index:20;width:100%;min-height:66px;
 margin:0;padding:8px clamp(16px,3vw,36px);display:flex;align-items:center;justify-content:space-between;gap:16px;
}
html body.emrw-admin-shell .emrw-hub-top .mobile-menu{flex:0 0 auto}
html body.emrw-admin-shell .emrw-hub-logo{margin-right:auto}
html body.emrw-admin-shell .emrw-hub-toplinks{flex:0 1 auto;justify-content:flex-end}
html body.emrw-admin-shell .emrw-hub-toplinks > label{display:inline-flex;align-items:center;min-width:0}
html body.emrw-admin-shell .emrw-hub-toplinks .emrw-hub-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(max-width:1150px){
 html body .emrw-v5-topbar .online-label{display:none}
 html body.emrw-admin-shell .emrw-hub-logo{display:none}
}
@media(max-width:900px){
 html body .emrw-v5-topbar .emrw-v5-flags {gap:3px;padding:3px 4px}
 html body .emrw-v5-topbar .emrw-v5-flags > a {flex-basis:32px;width:32px;height:27px}
 html body .emrw-v5-topbar .emrw-v5-flags .flag-svg{width:23px;height:16px}
 html body.emrw-admin-shell .emrw-hub-top{min-height:60px}
 html body.emrw-admin-shell .emrw-hub-toplinks > a{display:none}
}
@media(max-width:620px){
 html body .emrw-v5-topbar .emrw-v5-flags > a{flex-basis:29px;width:29px;height:25px;padding:2px}
 html body .emrw-v5-topbar .emrw-v5-flags .flag-svg{width:22px;height:15px}
 html body .emrw-v5-topbar .top-avatar,html body .emrw-v5-topbar .online-label{display:none}
 html body .emrw-v5-topbar .emrw-fuel-topbar{font-size:10px;padding:5px}
 html body.emrw-admin-shell .emrw-hub{padding:20px 14px 34px}
}


/* V9 SCREENSHOT REVIEW: Earn ACP is the source of truth for these TWO pages.
   Standalone app bodies historically painted #0b1420 while Earn ACP's main workarea
   paints a brighter slate gradient. Only target video and exchange; no admin override. */
html body:is(.emrw-exchange-body,.emrw-video-body){
  --emrw-earn-canvas:#202b3b;
  --emrw-earn-hero-bg:radial-gradient(ellipse at 90% 12%,rgba(29,179,156,.18),transparent 41%),linear-gradient(118deg,#172b40,#172538 60%,#193b42);
  --emrw-earn-card-bg:linear-gradient(160deg,rgba(30,45,65,.91),rgba(20,33,50,.96));
  background:var(--emrw-earn-canvas);
}
html body:is(.emrw-exchange-body,.emrw-video-body) .main-area{
  background:linear-gradient(135deg,#202b3b 0%,#1e2839 56%,#192535 100%);
  color:#f0f7ff;
}
html body:is(.emrw-exchange-body,.emrw-video-body) .page-content{
  background:transparent;color:#eaf4f9;
}
/* Same Earn ACP first-block height, border, color, typography and decorative arcs. */
html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-earn-inspired-hero{
  position:relative;isolation:isolate;overflow:hidden;
  min-height:242px;
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:nowrap;gap:25px;
  padding:32px 34px;
  border:1px solid rgba(110,217,185,.24);
  border-radius:23px;
  background:var(--emrw-earn-hero-bg);
  box-shadow:0 17px 45px rgba(4,10,22,.15);
}
html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-earn-hero-rings{
  position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:hidden;
}
html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-earn-hero-rings i{
  position:absolute;display:block;border:1px solid rgba(111,236,201,.12);border-radius:50%;
}
html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-earn-hero-rings i:nth-child(1){width:340px;height:340px;right:-120px;top:-160px}
html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-earn-hero-rings i:nth-child(2){width:450px;height:450px;right:-173px;top:-225px}
html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-earn-hero-rings i:nth-child(3){width:570px;height:570px;right:-233px;top:-290px}
html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-earn-hero-copy{position:relative;z-index:1;max-width:660px;min-width:0;flex:1 1 auto}
html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-earn-inspired-hero :is(.emrw-exchange-kicker,.emrw-video-kicker){
  display:inline-flex;align-items:center;gap:9px;
  font:800 10px/1.35 'DM Sans',system-ui,sans-serif;
  letter-spacing:.13em;color:#76e5cd;text-transform:uppercase;
}
html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-earn-inspired-hero :is(.emrw-exchange-kicker,.emrw-video-kicker)::before{
  content:'';display:inline-block;flex:0 0 7px;width:7px;height:7px;border-radius:50%;background:#5be9bc;box-shadow:0 0 14px rgba(91,233,188,.65);
}
html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-earn-inspired-hero h1{
  font-family:'Space Grotesk','DM Sans',system-ui,sans-serif;
  font-size:clamp(26px,2.5vw,34px);font-weight:700;
  line-height:1.1;letter-spacing:-.055em;
  margin:13px 0 11px;color:#f7fbff;
}
html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-earn-inspired-hero .emrw-earn-period{color:#53deb5}
html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-earn-inspired-hero p{
  font:400 13px/1.75 'DM Sans',system-ui,sans-serif;
  max-width:590px;color:#b3c8d4;margin:0;
}
html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-earn-hero-badges{
  position:relative;display:flex;flex-wrap:wrap;gap:8px;margin-top:21px;
}
html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-earn-hero-badges>span{
  display:inline-flex;align-items:center;gap:7px;
  border:1px solid rgba(124,204,203,.17);border-radius:8px;
  background:rgba(9,30,43,.36);padding:5px 9px;
  font:750 10px/1.5 'DM Sans',system-ui,sans-serif;color:#d6e9ec;
}
html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-earn-hero-badges img{width:17px;height:17px;object-fit:contain}
html body.emrw-exchange-body .emrw-exchange-rate{
  position:relative;z-index:1;flex:0 0 auto;max-width:330px;
  border-color:rgba(110,217,185,.26);border-radius:15px;
  background:rgba(12,33,43,.62);box-shadow:none;
}
html body.emrw-video-body .emrw-video-hero-side{
  position:relative;z-index:1;flex:0 0 142px;
  width:142px;min-height:142px;
  display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;
  border:8px solid rgba(97,222,192,.70);border-radius:50%;
  background:#1a3040;box-shadow:0 0 0 9px rgba(119,168,186,.09),0 0 35px rgba(68,215,166,.12);
  padding:15px 10px;text-align:center;
}
html body.emrw-video-body .emrw-video-hero-side strong{font:800 32px/1 'Space Grotesk',sans-serif;color:#f1fff9}
html body.emrw-video-body .emrw-video-hero-side span{font:750 10px/1.3 'DM Sans',sans-serif;color:#acd0d0}
/* Same surface and headings as Earn ACP's Daily Faucet Challenges section. */
html body.emrw-exchange-body :is(.emrw-exchange-balances>div,.emrw-exchange-card,.emrw-exchange-comparison>div),
html body.emrw-video-body :is(.emrw-video-card,.emrw-video-policy,.emrw-video-item,.emrw-video-own,.emrw-video-balances){
  background:var(--emrw-earn-card-bg);
  border:1px solid rgba(132,169,199,.17);
  border-radius:20px;
  box-shadow:none;
}
html body:is(.emrw-exchange-body,.emrw-video-body) :is(.emrw-exchange-card,.emrw-video-card) h2{
  font-family:'Space Grotesk','DM Sans',sans-serif;
  font-size:22px;font-weight:780;line-height:1.3;
  letter-spacing:-.035em;color:#edf9ff;
}
html body:is(.emrw-exchange-body,.emrw-video-body) :is(.emrw-exchange-card,.emrw-video-card) :is(p,small,label){font-family:'DM Sans',system-ui,sans-serif}
/* Bring the standalone first-block and cards into the same horizontal rhythm as Earn ACP. */
html body.emrw-exchange-body .emrw-exchange,
html body.emrw-video-body .emrw-video{
  width:100%;max-width:1550px;margin-inline:auto;padding:28px 34px 44px;
}
@media(max-width:900px){
 html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-earn-inspired-hero{padding:24px;min-height:225px;gap:18px}
 html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-exchange,
 html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-video{padding:22px 20px 36px}
 html body.emrw-exchange-body .emrw-exchange-rate{max-width:275px}
 html body.emrw-video-body .emrw-video-hero-side{width:105px;min-height:105px;flex-basis:105px;border-width:6px}
}
@media(max-width:620px){
 html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-earn-inspired-hero{flex-direction:column;align-items:stretch;min-height:0;padding:23px 20px;gap:20px}
 html body.emrw-exchange-body .emrw-exchange-rate{max-width:none;width:100%;flex:0 0 auto}
 html body.emrw-video-body .emrw-video-hero-side{align-self:center;width:112px;min-height:112px;flex:0 0 112px}
 html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-exchange,
 html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-video{padding:18px 14px 30px}
 html body:is(.emrw-exchange-body,.emrw-video-body) .emrw-earn-inspired-hero h1{font-size:26px}
 html body:is(.emrw-exchange-body,.emrw-video-body) :is(.emrw-exchange-card,.emrw-video-card) h2{font-size:20px}
}


/* V10 — screenshot-matched Chat / Ranks / Leaderboard. Existing Earn ACP, Video Ads
 * and ACP Exchange remain unchanged. No new global grid or visibility overrides. */
html body:is(.emrw-chat-body,.emrw-ranks-body,.emrw-leaderboard-body) {
  --emrw-v10-canvas:#202b3b;
  --emrw-v10-hero:radial-gradient(ellipse at 90% 12%,rgba(29,179,156,.18),transparent 41%),linear-gradient(118deg,#172b40,#172538 60%,#193b42);
  --emrw-v10-card:linear-gradient(160deg,rgba(30,45,65,.91),rgba(20,33,50,.96));
  background:var(--emrw-v10-canvas);
  color:#eaf4f9;
}
html body:is(.emrw-chat-body,.emrw-ranks-body,.emrw-leaderboard-body) .main-area{
  min-width:0;background:linear-gradient(135deg,#202b3b 0%,#1e2839 56%,#192535 100%);color:#eaf4f9;
}
html body.emrw-chat-body .chat-shell,
html body:is(.emrw-ranks-body,.emrw-leaderboard-body) .page-content{
  box-sizing:border-box;min-width:0;color:#eaf4f9;
}
html body.emrw-chat-body .chat-shell{padding:32px 28px 44px;width:100%;max-width:1550px;margin-inline:auto;}
html body:is(.emrw-chat-body,.emrw-ranks-body,.emrw-leaderboard-body) .emrw-v10-reference-hero{
  position:relative;isolation:isolate;overflow:hidden;
  min-height:242px;padding:32px 34px;margin:0 0 22px;
  display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:25px;
  border:1px solid rgba(110,217,185,.24);border-radius:23px;
  background:var(--emrw-v10-hero);box-shadow:0 17px 45px rgba(4,10,22,.15);
  color:#f7fbff;
}
html body:is(.emrw-chat-body,.emrw-ranks-body,.emrw-leaderboard-body) .emrw-v10-decor{
  position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:hidden;
}
html body:is(.emrw-chat-body,.emrw-ranks-body,.emrw-leaderboard-body) .emrw-v10-decor i{
  position:absolute;display:block;border:1px solid rgba(111,236,201,.12);border-radius:50%;
}
html body .emrw-v10-reference-hero .emrw-v10-decor i:nth-child(1){width:340px;height:340px;right:-120px;top:-160px}
html body .emrw-v10-reference-hero .emrw-v10-decor i:nth-child(2){width:450px;height:450px;right:-173px;top:-225px}
html body .emrw-v10-reference-hero .emrw-v10-decor i:nth-child(3){width:570px;height:570px;right:-233px;top:-290px}
html body .emrw-v10-reference-hero .emrw-v10-hero-copy{flex:1 1 auto;min-width:0;max-width:670px;position:relative;z-index:1}
html body .emrw-v10-reference-hero .emrw-v10-kicker{
  display:inline-flex;align-items:center;gap:9px;margin:0;
  font-family:'DM Sans',system-ui,sans-serif;font-size:10px;font-weight:800;line-height:1.35;
  letter-spacing:.13em;color:#76e5cd;text-transform:uppercase;
}
html body .emrw-v10-reference-hero .emrw-v10-kicker:before{
  content:'';display:inline-block;width:7px;height:7px;flex:0 0 7px;border-radius:50%;
  background:#5be9bc;box-shadow:0 0 14px rgba(91,233,188,.65);
}
html body .emrw-v10-reference-hero h1{
  font-family:'Space Grotesk','DM Sans',sans-serif;font-size:clamp(26px,2.5vw,34px);
  font-weight:700;line-height:1.1;letter-spacing:-.055em;margin:13px 0 11px;color:#f7fbff;
}
html body .emrw-v10-reference-hero h1 .emrw-v10-hero-icon{font-family:'Apple Color Emoji','Segoe UI Emoji',sans-serif;font-size:.68em;vertical-align:3px;letter-spacing:normal}
html body .emrw-v10-reference-hero .emrw-v10-green-dot{color:#53deb5}
html body .emrw-v10-reference-hero p{
  font-family:'DM Sans',system-ui,sans-serif;font-size:13px;font-weight:400;line-height:1.75;
  color:#b3c8d4;max-width:590px;margin:0;
}
html body .emrw-v10-reference-hero .emrw-v10-badges{
  position:relative;display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:21px;
}
html body .emrw-v10-reference-hero .emrw-v10-badges > span{
  display:inline-flex;align-items:center;gap:7px;padding:5px 9px;
  border:1px solid rgba(124,204,203,.17);border-radius:8px;background:rgba(9,30,43,.36);
  font-family:'DM Sans',system-ui,sans-serif;font-size:10px;font-weight:750;line-height:1.5;color:#d6e9ec;
}
html body .emrw-v10-reference-hero .emrw-v10-hero-aside{position:relative;z-index:1;flex:0 0 auto}
html body .emrw-v10-reference-hero .emrw-v10-ring,
html body .emrw-v10-reference-hero .chat-intro-actions{
  box-sizing:border-box;width:142px;min-width:142px;height:142px;
  display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;
  padding:14px 9px;text-align:center;
  border:8px solid rgba(97,222,192,.70);border-radius:50%;
  background:#1a3040;box-shadow:0 0 0 9px rgba(119,168,186,.09),0 0 35px rgba(68,215,166,.12);
}
html body .emrw-v10-reference-hero :is(.emrw-v10-ring-num,.chat-presence b){
  color:#f1fff9;font-family:'Space Grotesk',sans-serif;font-size:34px;font-weight:800;line-height:1.1;
}
html body .emrw-v10-reference-hero :is(.emrw-ranks-pill,.emrw-leaderboard-hero-chip){
  position:static;display:block;margin:0;padding:0;
  border:0;background:transparent;box-shadow:none;
  color:#a9d2c9;font-family:'DM Sans',sans-serif;font-size:10px;font-weight:750;letter-spacing:0;
}
html body.emrw-chat-body .emrw-v10-reference-hero .chat-presence{
  display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;
  margin:0;padding:0;background:transparent;border:0;box-shadow:none;
  font-family:'DM Sans',sans-serif;font-size:10px;font-weight:750;color:#a9d2c9;
}
html body.emrw-chat-body .emrw-v10-reference-hero .chat-presence i{width:7px;height:7px;position:absolute;right:7px;top:5px}
html body.emrw-chat-body .emrw-v10-reference-hero .chat-mod-link{
  position:absolute;right:-9px;bottom:-30px;padding:4px 9px;font-size:10px;white-space:nowrap;
  background:#183a3f;border-radius:8px;border:1px solid rgba(110,217,185,.3);
}
/* Chat header: same DOM grid and account chips as Earn ACP, but keep #chatLanguage
   and existing PHP-rendered SVG flags for working EN / RU / ES selection. */
html body.emrw-chat-body .emrw-v10-chat-topbar{
  display:flex;align-items:center;gap:12px;width:100%;min-height:66px;height:66px;
  padding:0 clamp(16px,3vw,36px);background:#111f2e;border-bottom:1px solid rgba(110,217,192,.23);
}
html body.emrw-chat-body .emrw-v10-chat-topbar .breadcrumbs{margin-right:auto;min-width:0}
html body.emrw-chat-body .emrw-v10-chat-topbar .chat-top-right{margin-left:auto;display:flex;align-items:center;gap:9px;min-width:0;flex-wrap:nowrap}
html body.emrw-chat-body .emrw-v10-chat-topbar .chat-lang-field{margin:0;display:flex;align-items:center;min-width:0}
html body.emrw-chat-body .emrw-v10-chat-topbar .emrw-fuel-topbar{display:flex;align-items:center;flex:0 0 auto}
html body.emrw-chat-body .emrw-v10-chat-topbar .status-dot{flex:0 0 auto}
html body.emrw-chat-body .emrw-v10-chat-topbar .top-avatar{flex:0 0 auto}
/* Modules retain their own table/chat controls, but unify the visual surface. */
html body.emrw-chat-body :is(.chat-card,.chat-side-card),
html body.emrw-ranks-body :is(.emrw-ranks-stat,.emrw-ranks-panel,.emrw-ranks-progress),
html body.emrw-leaderboard-body :is(.emrw-leaderboard-stat,.emrw-leaderboard-panel){
  box-sizing:border-box;min-width:0;
  background:var(--emrw-v10-card);border:1px solid rgba(132,169,199,.17);
  border-radius:20px;box-shadow:none;color:#eaf4f9;
}
html body:is(.emrw-chat-body,.emrw-ranks-body,.emrw-leaderboard-body)
 :is(.chat-side-heading h2,.emrw-ranks-section-head h2,.emrw-leaderboard-panelhead h2){
  font-family:'Space Grotesk','DM Sans',sans-serif;font-weight:700;letter-spacing:-.035em;color:#edf9ff;
}
html body:is(.emrw-chat-body,.emrw-ranks-body,.emrw-leaderboard-body)
 :is(.chat-card,.chat-side-card,.emrw-ranks,.emrw-leaderboard,.chat-shell) :is(p,small,span,a,button,td,th){font-family:'DM Sans',system-ui,sans-serif}
@media(max-width:900px){
 html body.emrw-chat-body .chat-shell{padding:28px 20px 36px}
 html body .emrw-v10-reference-hero{padding:24px;min-height:225px;gap:18px}
 html body .emrw-v10-reference-hero :is(.emrw-v10-ring,.chat-intro-actions){width:112px;min-width:112px;height:112px;border-width:6px}
 html body.emrw-chat-body .emrw-v10-chat-topbar{min-height:60px;height:60px}
 html body.emrw-chat-body .emrw-v10-chat-topbar .online-label{display:none}
}
@media(max-width:620px){
 html body.emrw-chat-body .chat-shell{padding:32px 12px 30px}
 html body:is(.emrw-chat-body,.emrw-ranks-body,.emrw-leaderboard-body) .emrw-v10-reference-hero{flex-direction:column;align-items:stretch;min-height:0;padding:23px 20px;gap:18px}
 html body .emrw-v10-reference-hero h1{font-size:26px}
 html body .emrw-v10-reference-hero :is(.emrw-v10-ring,.chat-intro-actions){align-self:center;width:112px;min-width:112px;height:112px;flex:0 0 112px}
 html body.emrw-chat-body .emrw-v10-chat-topbar{gap:7px;padding:0 12px}
 html body.emrw-chat-body .emrw-v10-chat-topbar .top-avatar,html body.emrw-chat-body .emrw-v10-chat-topbar .online-label{display:none}
 html body.emrw-chat-body .emrw-v10-chat-topbar .emrw-fuel-topbar{font-size:10px;padding:5px}
 html body.emrw-chat-body .emrw-v10-chat-topbar .breadcrumbs{font-size:11px}
}

html body.emrw-chat-body .emrw-v10-chat-title:after{content:".";color:#53deb5}


/* EMRW V12 SAFE — mobile-only compatibility repair.
   Based on the confirmed working V10 scripts and templates.
   No permanent overlay, inert / aria-hidden manipulation, or JS changes. */
@media (max-width: 900px) {
  /* The title repeats in the content hero; free room for language and Fuel. */
  html.emrw-nav-enhanced body.app-body :is(.topbar,.chat-topbar,.emrw-v5-topbar) :is(.breadcrumbs,.emrw-v5-breadcrumbs),
  html.emrw-nav-enhanced body.emrw-chat-body :is(.topbar,.chat-topbar) :is(.breadcrumbs,.emrw-v5-breadcrumbs),
  html.emrw-nav-enhanced body.emrw-admin-shell :is(.topbar,.emrw-hub-top) :is(.breadcrumbs,.emrw-v5-breadcrumbs) {
    display: none !important;
  }
  html.emrw-nav-enhanced body.app-body :is(.topbar,.chat-topbar) :is(.topbar-right,.chat-top-right,.emrw-ranks-toolbar,.emrw-leaderboard-lang),
  html.emrw-nav-enhanced body.emrw-chat-body .chat-top-right {
    margin-left: auto;
    min-width: 0;
    max-width: calc(100% - 48px);
  }
}
/* V13 MOBILE DRAWER: compositor-only transition, no visibility jump. */
@layer emrw_legacy {
  @media (max-width:900px) {
    html.emrw-nav-enhanced body #sidebar.emrw-shared-sidebar {
      visibility:visible!important;
      transition:transform 285ms cubic-bezier(.22,.8,.25,1)!important;
      will-change:transform;
      backface-visibility:hidden;
    }
    html.emrw-nav-enhanced body #sidebar.emrw-shared-sidebar.sidebar-open {
      visibility:visible!important;
      pointer-events:auto;
    }
    html.emrw-nav-enhanced .emrw-drawer-overlay {
      backdrop-filter:none!important;
    }
  }
  @media (max-width:900px) and (prefers-reduced-motion:reduce) {
    html.emrw-nav-enhanced body #sidebar.emrw-shared-sidebar { transition:none!important; }
    html.emrw-nav-enhanced .emrw-drawer-overlay {transition:none!important;}
  }
}

/* V14: menu disappears immediately on link navigation.
   The normal 285ms animation is reserved for open/X/backdrop actions. */
@layer emrw_legacy {
 @media (max-width:900px) {
  html.emrw-nav-enhanced.emrw-route-pending body #sidebar.emrw-shared-sidebar,
  html.emrw-nav-enhanced.emrw-route-pending body #sidebar {
   transform:translate3d(-105%,0,0)!important;
   transition:none!important;
   pointer-events:none!important;
  }
  html.emrw-nav-enhanced.emrw-route-pending .emrw-drawer-overlay {
   display:none!important;visibility:hidden!important;pointer-events:none!important;
  }
 }
}
