html,body{max-width:100%;overflow-x:clip}body{min-width:0;overscroll-behavior-x:none}#app,.app-page,.dashboard-page,.conversation-entry,.returning-entry{max-width:100%;min-width:0;overflow-x:clip}.app-page>*,.dashboard-page>*,.conversation-entry>*,.returning-entry>*{min-width:0}img,video,canvas,svg{max-width:100%}input,select,textarea,button{max-width:100%;box-sizing:border-box}.task-card,.ai-next-action,.ai-wallet-guide,.dashboard-share-card,.balance-card,.flow-card,.settings-list,.wallet-stats{min-width:0;max-width:100%}.task-card *,.ai-next-action *,.dashboard-share-card *{min-width:0}.task-card small,.task-card p,.task-card h2,.task-card h3,.ai-next-action p,.dashboard-share-card p{overflow-wrap:anywhere}.task-card a,.task-card button,.dashboard-share-card button{max-width:100%}

/* Returning users get a login-first entry instead of replaying new-user chat. */
.returning-entry{min-height:100dvh;display:grid;place-items:center;padding:max(24px,env(safe-area-inset-top)) 18px max(24px,env(safe-area-inset-bottom));background:radial-gradient(circle at 50% -10%,rgba(87,96,255,.12),transparent 34%),#070910;color:#f7f8fc}.returning-entry-card{width:min(100%,520px);display:grid;gap:22px;padding:28px;border:1px solid #242b38;border-radius:28px;background:#0d1220;box-shadow:0 24px 80px rgba(0,0,0,.28)}.returning-entry-brand{display:flex;align-items:center;gap:12px}.returning-entry-brand img{width:48px;height:48px;border-radius:14px;object-fit:cover}.returning-entry-brand div{display:grid}.returning-entry-brand b{font-size:21px}.returning-entry-brand span{color:#8f99aa;font-size:13px}.returning-entry-copy{display:grid;gap:8px}.returning-entry-copy>span{font-size:12px;font-weight:850;letter-spacing:.18em;color:#a89cff}.returning-entry-copy h1{margin:0;font-size:clamp(32px,8vw,48px);line-height:.98}.returning-entry-copy p{margin:0;color:#9aa4b6;font-size:16px}.returning-entry form{display:grid;gap:16px}.returning-entry label{display:grid;gap:8px;font-weight:750;color:#dfe5ef}.returning-entry label>div{display:grid;grid-template-columns:minmax(0,1fr) auto}.returning-entry input{width:100%;min-width:0;min-height:54px;border:1px solid #2b3444;background:#080d17;color:#fff;border-radius:15px;padding:0 15px;font-size:16px}.returning-entry label>div input{border-radius:15px 0 0 15px}.returning-entry [data-show]{min-width:76px;border:1px solid #2b3444;border-left:0;border-radius:0 15px 15px 0;background:#111827;color:#dfe5ef;font-weight:800}.returning-entry-primary,.returning-entry-new{min-height:54px;border-radius:15px;font-size:16px;font-weight:850}.returning-entry-primary{border:0;background:linear-gradient(135deg,#6872ff,#25c9e8);color:#071017}.returning-entry-new{border:1px solid #2b3444;background:transparent;color:#dfe5ef}.returning-entry-error{min-height:20px;color:#ff9aaa;font-size:14px}.returning-entry nav{display:flex;gap:18px;flex-wrap:wrap}.returning-entry nav a{color:#8f99aa;text-decoration:none;font-size:13px}

/* External share/task returns should feel instant and never replay the large logo boot screen. */
html[data-fast-return="1"] .app-boot{min-height:100dvh;background:#070910;display:grid;place-items:center;padding:20px}html[data-fast-return="1"] .app-boot-mark{display:none!important}html[data-fast-return="1"] .app-boot>div b{display:none}html[data-fast-return="1"] .app-boot>div span{font-size:0}html[data-fast-return="1"] .app-boot>div span::after{content:'Returning…';font-size:13px;color:#778195}html[data-fast-return="1"] .app-boot>i{width:34px;height:3px;border:0;border-radius:99px;background:linear-gradient(90deg,#6872ff,#25c9e8);animation:none}

@media(max-width:820px){
  html,body,#app{width:100%;max-width:100vw;overflow-x:clip}
  .app-page,.dashboard-page{width:100%;max-width:100%;padding-left:clamp(16px,4.5vw,24px)!important;padding-right:clamp(16px,4.5vw,24px)!important;box-sizing:border-box;contain:inline-size}
  .page-head,.page-intro,.earning-intro{max-width:100%}
  .earning-intro h1,.page-intro h1{font-size:clamp(34px,10vw,48px)!important;line-height:1.02!important;overflow-wrap:anywhere}
  .earning-intro p,.page-intro p{font-size:clamp(15px,4.2vw,18px)!important;line-height:1.5!important}
  .task-list,.earning-list{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%;max-width:100%;gap:18px!important}
  .task-card{width:100%!important;max-width:100%!important;padding:22px!important;border-radius:24px!important}
  .task-card-top,.task-card .earning-action,.ai-task-actions{max-width:100%}
  .task-card button,.task-card .btn,.task-card [data-task]{width:100%;min-height:54px;white-space:normal}
  .dashboard-page>section,.dashboard-page>article{width:100%;max-width:100%}
  .dashboard-share-card{padding:22px!important;border-radius:24px!important}
  .dashboard-share-card button{width:100%}
  .ai-next-action,.ai-wallet-guide{padding:22px!important}
  .settings-list button{min-width:0;width:100%}
  .bottom-nav{width:100%;max-width:100vw;left:0;right:0;padding-bottom:max(8px,env(safe-area-inset-bottom))}
  input,select,textarea{font-size:16px!important;min-width:0}
}
@media(max-width:430px){.returning-entry{padding-left:14px;padding-right:14px}.returning-entry-card{padding:22px;border-radius:22px}.task-card{padding:19px!important}.app-page,.dashboard-page{padding-left:16px!important;padding-right:16px!important}}


/* Final product-density and action hierarchy */
:root{--ce-accent:#756cff;--ce-cyan:#24c7e8;--ce-green:#32d889;--ce-panel:#111725;--ce-panel-2:#0d1420}
.page-intro h1,.earn-hero h1{font-size:clamp(30px,8.7vw,42px)!important;line-height:1.02!important;letter-spacing:-.035em!important}
.page-intro,.earn-hero{margin-bottom:20px!important}
.task-list,.earning-list{gap:12px!important}
.task-card{padding:16px!important;border-radius:20px!important;background:linear-gradient(145deg,rgba(18,24,39,.98),rgba(12,18,30,.98))!important;box-shadow:0 10px 28px rgba(0,0,0,.18)!important}
.task-card:nth-of-type(3n+1){border-color:rgba(117,108,255,.28)!important}
.task-card:nth-of-type(3n+2){border-color:rgba(36,199,232,.24)!important}
.task-card:nth-of-type(3n){border-color:rgba(50,216,137,.22)!important}
.task-card h2,.task-card h3{font-size:clamp(20px,5.8vw,24px)!important;line-height:1.14!important;margin-block:12px!important}
.task-card p,.task-body,.earning-instruction{font-size:15px!important;line-height:1.42!important}
.task-card .task-action,.task-card .earning-action{padding:12px 14px!important;border-radius:15px!important}
.task-card button,.task-card .primary,.task-card [data-task-start]{min-height:48px!important;font-size:16px!important;border-radius:15px!important;box-shadow:0 8px 24px rgba(69,102,255,.2)!important}
.task-card .task-reward,.task-card [class*="reward"]{font-size:clamp(22px,6vw,28px)!important;color:#51e6a5!important}
.flow-card,.balance-card,.dashboard-share-card,.ai-next-action,.ai-wallet-guide{border-radius:20px!important}
.dashboard-page h1,.welcome-block h1{font-size:clamp(34px,9vw,46px)!important;line-height:1.03!important}
.balance-card .balance,.balance-card h2{font-size:clamp(38px,10vw,54px)!important}
.ai-next-action h2,.dashboard-share-card h2{font-size:clamp(22px,6.4vw,28px)!important;line-height:1.12!important}
.ai-next-action{background:linear-gradient(145deg,rgba(24,28,59,.98),rgba(9,30,38,.98))!important;border-color:rgba(117,108,255,.42)!important}
.ai-next-action button,.dashboard-share-card .share-whatsapp,.returning-entry-primary{background:linear-gradient(120deg,#776cff,#22c7e7)!important;color:#071019!important;border:0!important;box-shadow:0 10px 30px rgba(64,132,255,.25)!important}
.dashboard-share-card{background:linear-gradient(145deg,rgba(30,27,63,.96),rgba(15,28,40,.96))!important;border-color:rgba(117,108,255,.35)!important}
.returning-entry{background:radial-gradient(circle at 50% 10%,rgba(117,108,255,.18),transparent 38%),#070b13!important}
.returning-entry-card{padding:clamp(20px,6vw,34px)!important;border:1px solid rgba(134,145,255,.24)!important;background:linear-gradient(155deg,rgba(17,24,40,.98),rgba(9,16,27,.98))!important;box-shadow:0 24px 70px rgba(0,0,0,.35)!important}
.returning-entry-copy h1{font-size:clamp(30px,8.5vw,42px)!important;line-height:1.05!important}
.returning-entry-copy p{color:#b7c1d2!important}
.returning-entry-new{color:#c9c4ff!important;border-color:rgba(137,129,255,.34)!important}
.bottom-nav button{font-size:13px!important}
.transaction b{font-size:16px!important}


/* Atomic public shell: never expose a half-enhanced route */
html[data-shell-pending="1"] #app>main:not(.app-boot){opacity:0!important;pointer-events:none!important}
html[data-shell-pending="1"] body::after{content:'Loading…';position:fixed;left:50%;top:50%;z-index:9999;transform:translate(-50%,-50%);padding:10px 14px;border:1px solid rgba(137,145,255,.18);border-radius:999px;background:rgba(9,15,25,.92);color:#aeb8ca;font:700 13px/1 system-ui,sans-serif;box-shadow:0 12px 32px rgba(0,0,0,.22)}


/* Final mobile type density: readable without oversized cards or route shifts. */
@media (max-width:600px){
  .profile-card{padding-block:40px!important}
  .profile-card h1{font-size:clamp(28px,8vw,36px)!important}
  .profile-avatar{width:96px!important;height:96px!important;font-size:34px!important}
  .settings-list button{min-height:58px!important;padding:0 18px!important;font-size:15px!important}
  .page-intro h1,.earn-hero h1{font-size:clamp(28px,8vw,38px)!important}
  .dashboard-page h1,.welcome-block h1{font-size:clamp(30px,8vw,40px)!important}
  .balance-card .balance,.balance-card h2{font-size:clamp(34px,9vw,46px)!important}
  .ai-next-action h2,.dashboard-share-card h2{font-size:clamp(20px,5.7vw,25px)!important}
  .task-card h2,.task-card h3{font-size:clamp(18px,5.2vw,22px)!important}
  .task-card button,.task-card .btn,.ai-next-action button,.dashboard-share-card button{font-size:15px!important}
}


/* Full-screen chat owns its navigation as a fifth grid row.
   This keeps the returning-user composer and Send button above mobile browser chrome. */
body.chat-mode .chat-app{
  grid-template-rows:auto auto minmax(0,1fr) auto auto!important;
}
body.chat-mode .chat-app>#chat-footer{
  position:relative!important;
  z-index:91!important;
  min-width:0;
}
body.chat-mode .chat-app>.bottom-nav{
  position:relative!important;
  inset:auto!important;
  left:auto!important;
  right:auto!important;
  bottom:auto!important;
  transform:none!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  z-index:90!important;
}
body.chat-mode .chat-app .chat-messages{
  min-height:0;
  scroll-padding-bottom:12px;
}


/* Stable route reveal: final runtime owns the first visible frame. */
html[data-route-pending="1"] #app>main{
  visibility:hidden!important;
  pointer-events:none!important;
}
html[data-route-pending="1"] #app::after{
  content:'Loading…';
  position:fixed;
  left:50%;
  top:50%;
  z-index:9998;
  transform:translate(-50%,-50%);
  padding:9px 13px;
  border:1px solid rgba(137,145,255,.18);
  border-radius:999px;
  background:rgba(9,15,25,.94);
  color:#aeb8ca;
  font:700 12px/1 system-ui,sans-serif;
  box-shadow:0 12px 32px rgba(0,0,0,.2);
}

/* Consolidated defects: stable public actions, recovery controls, and desktop chat density. */
.support-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:22px 0!important}
.support-actions .btn{width:auto;max-width:100%;white-space:normal;text-align:center}
.auth-forgot,.returning-entry-forgot{justify-self:start;border:0;background:transparent;color:#aaa5ff;padding:2px 0;font:800 13px/1.4 inherit;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.auth-forgot:disabled,.returning-entry-forgot:disabled{opacity:.65;cursor:wait}
.inline-error.success,.returning-entry-error.success{color:#60e6a4}
.landing-final-cta{min-width:0;overflow:hidden}
.landing-final-cta>div{min-width:0}
.landing-final-cta .btn{flex:0 1 auto;max-width:100%;white-space:normal;text-align:center}
.landing-paths article{min-width:0}
.landing-paths article>div{min-width:0}
body.chat-mode{background:#060910}
body.chat-mode .chat-app{width:min(100%,880px)!important;max-width:880px!important;margin-inline:auto!important;border-inline:1px solid rgba(255,255,255,.055)}
.conversation-exit-card button:focus-visible,.chat-stage-card button:focus-visible,.auth-forgot:focus-visible,.returning-entry-forgot:focus-visible{outline:3px solid rgba(126,137,255,.72);outline-offset:3px}

@media(max-width:720px){
  .support-actions{align-items:stretch;flex-direction:column}
  .support-actions .btn{width:100%}
  body.chat-mode .chat-app{border-inline:0}
}
