/*
 * W3M Portal responsive system — v2.1.0
 * Centralized mobile/tablet layout layer for every W3M module.
 * Desktop visual rules remain inside each module stylesheet.
 */

html,body{max-width:100%;overflow-x:hidden}

@media (max-width:1024px){
  :is(.w3mi-dashboard,.w3m-ai-coin-page,.w3m-wallet-ai,.w3m-airdrops-shell,.w3m-coin-calculator,.w3m-legal-tax,.w3m-app,.w3m-auth-wrap){
    max-width:calc(100vw - 24px)!important;
    width:calc(100vw - 24px)!important;
    margin-left:auto!important;
    margin-right:auto!important;
    transform:none!important;
  }

  /* Intelligence */
  .w3mi-dashboard :is(.dashboard-grid,.w3mi-header,.ai-signal-hero,.rotation-strip){grid-template-columns:1fr!important}
  .w3mi-dashboard .metric-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .w3mi-dashboard .derivatives-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .w3mi-dashboard .coins-table{overflow-x:auto!important;-webkit-overflow-scrolling:touch}
  .w3mi-dashboard .coins-row-modern{min-width:900px}

  /* Coin analyzer */
  .w3m-ai-coin-page .w3m-cards-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .w3m-ai-coin-page :is(.w3m-lower-grid,.w3m-score-panel){grid-template-columns:1fr!important}

  /* Wallet analyzer */
  .w3m-wallet-ai .w3m-wallet-form{grid-template-columns:1fr 1fr!important}
  .w3m-wallet-ai .w3m-wallet-connect-primary{grid-column:1/-1!important}
  .w3m-wallet-ai .w3m-wallet-btn{grid-column:1/-1!important}
  .w3m-wallet-ai :is(.w3m-wallet-overview,.w3m-wallet-ai-grid){grid-template-columns:1fr!important}
  .w3m-wallet-ai .w3m-wallet-token-list{overflow-x:auto!important;-webkit-overflow-scrolling:touch}
  .w3m-wallet-ai .w3m-wallet-token-row{min-width:820px}

  /* Airdrop calendar */
  .w3m-airdrops-shell .w3m-airdrops-grid{grid-template-columns:1fr!important}
  .w3m-airdrops-shell .w3m-airdrops-filters{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .w3m-airdrops-shell .detail-body{grid-template-columns:1fr!important}

  /* Calculator */
  .w3m-coin-calculator .cc-grid{grid-template-columns:1fr!important}
  .w3m-coin-calculator .cc-swap{margin:0 auto!important;transform:rotate(90deg)!important}
  .w3m-coin-calculator :is(.calc-form,.il-form){grid-template-columns:repeat(2,minmax(0,1fr))!important}

  /* Legal hub */
  .w3m-legal-tax .lt-control{grid-template-columns:1fr 1fr!important}
  .w3m-legal-tax :is(.lt-compliance-grid,.lt-business-grid,.lt-tax-flow,.lt-deep-status){grid-template-columns:repeat(2,minmax(0,1fr))!important}

  /* Member */
  .w3m-app .w3m-profile-row{grid-template-columns:1fr!important}
  .w3m-app .w3m-stats{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .w3m-app :is(.mid,.bottom){grid-template-columns:1fr!important}
  .w3m-app .three{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media (max-width:768px){
  :is(.w3mi-dashboard,.w3m-ai-coin-page,.w3m-wallet-ai,.w3m-airdrops-shell,.w3m-coin-calculator,.w3m-legal-tax,.w3m-app,.w3m-auth-wrap){
    max-width:calc(100vw - 16px)!important;
    width:calc(100vw - 16px)!important;
    margin:8px auto!important;
    padding-left:0!important;
    padding-right:0!important;
  }

  :is(.w3mi-dashboard,.w3m-ai-coin-page,.w3m-wallet-ai,.w3m-airdrops-shell,.w3m-coin-calculator,.w3m-legal-tax,.w3m-app) :is(h1,h2){overflow-wrap:anywhere}

  /* Shared touch targets */
  :is(.w3mi-dashboard,.w3m-ai-coin-page,.w3m-wallet-ai,.w3m-airdrops-shell,.w3m-coin-calculator,.w3m-legal-tax,.w3m-app,.w3m-auth-wrap) :is(button,a[role="button"],input,select,textarea){
    max-width:100%;
  }
  :is(.w3mi-dashboard,.w3m-ai-coin-page,.w3m-wallet-ai,.w3m-airdrops-shell,.w3m-coin-calculator,.w3m-legal-tax,.w3m-app,.w3m-auth-wrap) button{min-height:44px}

  /* Intelligence */
  .w3mi-dashboard{padding:8px!important}
  .w3mi-dashboard .w3mi-header{padding:20px!important}
  .w3mi-dashboard .w3mi-header h1{font-size:clamp(30px,9vw,44px)!important;line-height:1.04!important}
  .w3mi-dashboard .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .w3mi-dashboard :is(.derivatives-grid,.scenario-grid,.signal-right,.sentiment-points){grid-template-columns:1fr!important}
  .w3mi-dashboard .dashboard-grid{gap:12px!important}
  .w3mi-dashboard :is(.panel,.metric-card,.derivative-card){padding:16px!important}
  .w3mi-dashboard .w3mi-cal-modal{padding:8px!important}
  .w3mi-dashboard .w3mi-cal-modal-card{width:calc(100vw - 16px)!important;max-height:94vh!important;padding:14px!important;border-radius:18px!important}
  .w3mi-dashboard .w3mi-cal-days{min-width:420px}

  /* Coin analyzer */
  .w3m-ai-coin-page .w3m-ai-hero{padding:26px 18px!important;border-radius:20px!important;text-align:left!important}
  .w3m-ai-coin-page .w3m-ai-hero h1{font-size:clamp(36px,11vw,52px)!important;line-height:1!important}
  .w3m-ai-coin-page .w3m-ai-hero p{font-size:15px!important;margin-left:0!important}
  .w3m-ai-coin-page .w3m-feature-pills{justify-content:flex-start!important;overflow-x:auto!important;flex-wrap:nowrap!important;padding-bottom:5px}
  .w3m-ai-coin-page .w3m-feature-pill{flex:0 0 auto}
  .w3m-ai-coin-page .w3m-coin-search{grid-template-columns:1fr!important;max-width:none!important}
  .w3m-ai-coin-page .w3m-analyze-btn{width:100%!important}
  .w3m-ai-coin-page .w3m-cards-grid{grid-template-columns:1fr!important}
  .w3m-ai-coin-page :is(.w3m-results,.w3m-market-snapshot,.w3m-info-card,.w3m-case-card,.w3m-score-panel,.w3m-unavailable-card,.w3m-empty-state){border-radius:18px!important;padding:18px!important}
  .w3m-ai-coin-page .score-number{font-size:58px!important}

  /* Wallet analyzer */
  .w3m-wallet-ai .w3m-wallet-hero{padding:24px 18px!important;border-radius:20px!important}
  .w3m-wallet-ai .w3m-wallet-hero h1{font-size:clamp(34px,10vw,48px)!important;line-height:1.03!important}
  .w3m-wallet-ai .w3m-wallet-form{grid-template-columns:1fr!important;padding:14px!important;border-radius:18px!important}
  .w3m-wallet-ai .w3m-wallet-connect-primary{grid-template-columns:1fr!important;padding:16px!important}
  .w3m-wallet-ai .w3m-wallet-connect-actions{justify-content:stretch!important}
  .w3m-wallet-ai :is(.w3m-wallet-connect-btn,.w3m-wallet-disconnect-btn,.w3m-wallet-btn){width:100%!important}
  .w3m-wallet-ai .w3m-wallet-filter-options{grid-template-columns:1fr!important}
  .w3m-wallet-ai .w3m-wallet-overview-grid{grid-template-columns:1fr!important}
  .w3m-wallet-ai .w3m-wallet-ai-columns{grid-template-columns:1fr!important}
  .w3m-wallet-ai .w3m-wallet-provider-dialog{width:calc(100vw - 20px)!important;max-height:92vh!important;padding:18px!important;border-radius:20px!important}

  /* Airdrop calendar */
  .w3m-airdrops-shell{padding:8px!important}
  .w3m-airdrops-shell .w3m-airdrops-hero{padding:24px 18px!important;border-radius:20px!important}
  .w3m-airdrops-shell .w3m-airdrops-hero h1{font-size:clamp(34px,10vw,48px)!important;line-height:1.02!important}
  .w3m-airdrops-shell .w3m-airdrops-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .w3m-airdrops-shell .w3m-airdrops-filters{grid-template-columns:1fr!important}
  .w3m-airdrops-shell .feature-card{grid-template-columns:58px minmax(0,1fr)!important;padding:14px!important}
  .w3m-airdrops-shell .feature-card>*:nth-child(n+3){grid-column:2!important}
  .w3m-airdrops-shell .airdrop-row{grid-template-columns:46px minmax(0,1fr)!important;padding:13px!important}
  .w3m-airdrops-shell .airdrop-row>*:nth-child(n+3){grid-column:2!important;text-align:left!important}
  .w3m-airdrops-shell .detail-info-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .w3m-airdrops-shell .detail-actions{grid-template-columns:1fr!important}
  .w3m-airdrops-shell .detail-panel{padding:16px!important;border-radius:18px!important}

  /* Calculator */
  .w3m-coin-calculator{padding:8px!important}
  .w3m-coin-calculator .cc-shell{padding:18px!important;border-radius:20px!important}
  .w3m-coin-calculator .cc-tabs{grid-template-columns:repeat(3,minmax(0,1fr))!important;overflow:visible!important}
  .w3m-coin-calculator .cc-tab{white-space:normal!important;line-height:1.2!important;min-height:54px!important;padding:8px 5px!important}
  .w3m-coin-calculator .cc-head{display:block!important}
  .w3m-coin-calculator .cc-head h2{font-size:clamp(32px,10vw,44px)!important}
  .w3m-coin-calculator .cc-rate{margin-top:12px!important;text-align:left!important}
  .w3m-coin-calculator :is(.cc-side-fields,.calc-form,.il-form,.result-grid,.il-result,.comparison-row){grid-template-columns:1fr!important}
  .w3m-coin-calculator .cc-input-row{grid-template-columns:1fr!important}
  .w3m-coin-calculator .cc-swap{transform:rotate(90deg)!important}
  .w3m-coin-calculator .comparison-value{text-align:left!important}

  /* Legal hub */
  .w3m-legal-tax{margin:8px auto!important}
  .w3m-legal-tax .lt-hero{padding:26px 18px!important;border-radius:20px!important}
  .w3m-legal-tax .lt-hero h2{font-size:clamp(36px,11vw,50px)!important;line-height:1!important}
  .w3m-legal-tax .lt-control{grid-template-columns:1fr!important;padding:12px!important}
  .w3m-legal-tax .lt-country-head{display:block!important;padding:16px!important}
  .w3m-legal-tax .lt-country-meta{grid-template-columns:1fr!important;margin-top:14px!important}
  .w3m-legal-tax :is(.lt-quick-grid,.lt-business-grid,.lt-tax-flow,.lt-compliance-grid,.lt-checklist,.lt-sources,.lt-deep-status,.lt-scenarios,.lt-docs){grid-template-columns:1fr!important}
  .w3m-legal-tax .lt-panel{padding:16px!important;border-radius:18px!important}
  .w3m-legal-tax .lt-doc-toolbar{display:block!important}
  .w3m-legal-tax .lt-doc-toolbar input{width:100%!important;margin-top:10px!important}

  /* Member */
  .w3m-app{padding:8px!important}
  .w3m-app .w3m-title{display:block!important}
  .w3m-app .w3m-title h1{font-size:clamp(28px,9vw,40px)!important}
  .w3m-app .w3m-topcards{grid-template-columns:1fr!important;margin:14px 0 0!important}
  .w3m-app .profile{grid-template-columns:1fr!important;text-align:center!important;padding:20px 16px!important}
  .w3m-app .w3m-avatar-wrap{margin:auto!important}
  .w3m-app .tags{justify-content:center!important}
  .w3m-app .level{display:block!important;padding:20px 16px!important}
  .w3m-app .w3m-stats{grid-template-columns:1fr!important}
  .w3m-app .three{grid-template-columns:1fr!important}
  .w3m-app .prog-flex{grid-template-columns:1fr!important;gap:18px!important}
  .w3m-app .act{grid-template-columns:36px minmax(0,1fr)!important}
  .w3m-app .act :is(em,button){grid-column:2!important;justify-self:start!important}
  .w3m-app .ach-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .w3m-app .course{grid-template-columns:48px minmax(0,1fr)!important}
  .w3m-app .course em{grid-column:2!important;text-align:left!important}
  .w3m-app .recent-item{grid-template-columns:30px minmax(0,1fr)!important}
  .w3m-app .recent-item>*:nth-child(n+3){grid-column:2!important;text-align:left!important}
  .w3m-app .cal-days{min-width:310px}
  .w3m-app .calendar{overflow-x:auto!important}
  .w3m-modal{padding:8px!important}
  .w3m-modal .w3m-modal-panel{width:calc(100vw - 16px)!important;max-height:94vh!important;padding:18px!important;border-radius:18px!important}
  .w3m-modal .w3m-badge-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .w3m-modal .w3m-badge-toolbar,.w3m-modal .w3m-leaderboard-toolbar{grid-template-columns:1fr!important}

  /* Auth */
  .w3m-auth-wrap{padding:20px!important;border-radius:20px!important;margin:16px auto!important}
  .w3m-auth-brand{font-size:28px!important}
  .w3m-auth-socials{grid-template-columns:1fr!important}
  .w3m-auth-row{display:block!important}
  .w3m-auth-tabs{gap:4px!important}
  .w3m-auth-tab{padding:12px 8px!important}
  .w3m-wallet-auth-dialog{width:calc(100vw - 20px)!important;max-height:92vh!important;padding:18px!important;border-radius:20px!important}
}

@media (max-width:480px){
  :is(.w3mi-dashboard,.w3m-ai-coin-page,.w3m-wallet-ai,.w3m-airdrops-shell,.w3m-coin-calculator,.w3m-legal-tax,.w3m-app,.w3m-auth-wrap){
    max-width:calc(100vw - 8px)!important;
    width:calc(100vw - 8px)!important;
    margin:4px auto!important;
  }
  .w3mi-dashboard .metric-grid{grid-template-columns:1fr!important}
  .w3m-airdrops-shell .w3m-airdrops-stats{grid-template-columns:1fr!important}
  .w3m-airdrops-shell .detail-info-grid{grid-template-columns:1fr!important}
  .w3m-app .ach-grid{grid-template-columns:1fr!important}
  .w3m-modal .w3m-badge-grid{grid-template-columns:1fr!important}
  .w3m-coin-calculator .cc-tab{font-size:10px!important}
  .w3m-wallet-ai .w3m-wallet-connect-primary-copy{align-items:flex-start!important}
}

/* =========================================================
   W3M 3.5.22 — Auth page complete responsive redesign
   ========================================================= */
body .w3m-auth-wrap{
  --auth-accent:var(--accent,#49cff9);
  --auth-surface:color-mix(in srgb,var(--surface,#101311) 92%,transparent);
  --auth-surface-2:color-mix(in srgb,var(--surface2,#151916) 90%,transparent);
  --auth-border:color-mix(in srgb,var(--accent,#49cff9) 18%,var(--line,rgba(255,255,255,.09)));
  position:relative!important;
  left:auto!important;
  right:auto!important;
  transform:none!important;
  display:block!important;
  width:min(100%,580px)!important;
  max-width:580px!important;
  min-width:0!important;
  margin:8px auto clamp(42px,6vw,82px)!important;
  padding:clamp(24px,4vw,42px)!important;
  overflow:visible!important;
  border:1px solid var(--auth-border)!important;
  border-radius:30px!important;
  background:
    radial-gradient(circle at 85% -10%,rgba(73,207,249,.13),transparent 34%),
    linear-gradient(145deg,rgba(17,28,31,.92),rgba(10,16,17,.9))!important;
  box-shadow:0 30px 90px rgba(0,0,0,.32),inset 0 1px 0 rgba(255,255,255,.045)!important;
  backdrop-filter:blur(20px) saturate(130%)!important;
  -webkit-backdrop-filter:blur(20px) saturate(130%)!important;
  color:var(--text,#f4f7f2)!important;
}
body .w3m-auth-wrap::before{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius:inherit;
  pointer-events:none;
  background:linear-gradient(135deg,rgba(103,223,255,.17),transparent 28%,transparent 72%,rgba(103,223,255,.06));
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask-composite:exclude;
  padding:1px;
}
body .w3m-auth-wrap *{min-width:0;max-width:100%}
body .w3m-auth-brand{margin-bottom:10px!important;font-size:clamp(30px,4vw,38px)!important}
body .w3m-auth-brand strong{color:var(--text)!important;font-weight:900!important;letter-spacing:-.06em!important}
body .w3m-auth-brand span{display:block;margin-top:8px;color:var(--auth-accent)!important;font-size:11px!important;letter-spacing:.22em!important}
body .w3m-auth-subtitle{max-width:390px;margin:0 auto 28px!important;color:var(--muted)!important;font-size:14px!important;line-height:1.55!important}

body .w3m-auth-wrap .w3m-wallet-login-main{
  min-height:68px!important;
  margin-bottom:17px!important;
  padding:12px 15px!important;
  border:1px solid var(--auth-border)!important;
  border-radius:17px!important;
  background:rgba(255,255,255,.025)!important;
  box-shadow:none!important;
}
body .w3m-auth-wrap .w3m-wallet-login-main:hover{background:rgba(73,207,249,.07)!important;border-color:rgba(73,207,249,.38)!important}
body .w3m-auth-wrap .w3m-wallet-login-icon{background:rgba(73,207,249,.12)!important;color:var(--auth-accent)!important;border:1px solid rgba(73,207,249,.18)}
body .w3m-auth-wrap .w3m-wallet-login-main strong{color:var(--text)!important}
body .w3m-auth-wrap .w3m-wallet-login-main small{color:var(--muted)!important}
body .w3m-auth-wrap .w3m-wallet-login-arrow{color:var(--auth-accent)!important}

body .w3m-auth-wrap .w3m-auth-separator{margin:8px 0 20px!important;color:var(--dim)!important}
body .w3m-auth-wrap .w3m-auth-separator::before,
body .w3m-auth-wrap .w3m-auth-separator::after{background:var(--line)!important}
body .w3m-auth-wrap .w3m-auth-socials{gap:10px!important;margin-bottom:20px!important}
body .w3m-auth-wrap .w3m-auth-socials-google-only{grid-template-columns:1fr!important;}
body .w3m-auth-wrap .w3m-auth-socials-google-only .w3m-social{width:100%!important;justify-content:center!important;gap:10px!important;font-size:14px!important;font-weight:850!important;}
body .w3m-auth-wrap .w3m-auth-socials-google-only .w3m-social span:last-child{white-space:nowrap!important;}

body .w3m-auth-wrap .w3m-social{
  height:50px!important;
  border:1px solid var(--line)!important;
  border-radius:14px!important;
  background:rgba(255,255,255,.02)!important;
  color:var(--muted)!important;
  box-shadow:none!important;
}
body .w3m-auth-wrap .w3m-social:hover{background:rgba(73,207,249,.07)!important;border-color:rgba(73,207,249,.32)!important;color:var(--text)!important}

body .w3m-auth-wrap .w3m-auth-tabs{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:6px!important;
  margin-bottom:24px!important;
  padding:5px!important;
  border:1px solid var(--line)!important;
  border-radius:16px!important;
  background:rgba(255,255,255,.018)!important;
}
body .w3m-auth-wrap .w3m-auth-tab{
  min-height:50px!important;
  padding:12px!important;
  border:0!important;
  border-radius:12px!important;
  background:transparent!important;
  color:var(--muted)!important;
  box-shadow:none!important;
}
body .w3m-auth-wrap .w3m-auth-tab.active{
  background:var(--auth-accent)!important;
  color:#061218!important;
  box-shadow:0 8px 22px rgba(73,207,249,.16)!important;
}
body .w3m-auth-wrap label{margin-bottom:8px!important;color:var(--muted)!important;font-size:12px!important}
body .w3m-auth-wrap input[type=text],
body .w3m-auth-wrap input[type=email],
body .w3m-auth-wrap input[type=password]{
  width:100%!important;
  min-height:52px!important;
  margin-bottom:17px!important;
  padding:13px 15px!important;
  border:1px solid var(--line)!important;
  border-radius:14px!important;
  background:rgba(0,0,0,.28)!important;
  color:var(--text)!important;
  box-shadow:none!important;
}
body .w3m-auth-wrap input:focus{border-color:rgba(73,207,249,.52)!important;box-shadow:0 0 0 4px rgba(73,207,249,.09)!important}
body .w3m-auth-wrap button[type=submit]{
  min-height:54px!important;
  border-radius:14px!important;
  background:var(--auth-accent)!important;
  color:#061218!important;
  box-shadow:0 10px 28px rgba(73,207,249,.16)!important;
}
body .w3m-auth-wrap .w3m-auth-row{margin-bottom:20px!important}
body .w3m-auth-wrap .w3m-check{color:var(--muted)!important}
body .w3m-auth-wrap .w3m-link-btn,
body .w3m-auth-wrap .w3m-back-login,
body .w3m-auth-wrap .w3m-check a{color:var(--auth-accent)!important}

html[data-theme=light] body .w3m-auth-wrap{
  background:radial-gradient(circle at 85% -10%,rgba(22,143,184,.1),transparent 34%),rgba(255,255,255,.84)!important;
  box-shadow:0 28px 80px rgba(24,40,22,.12),inset 0 1px 0 rgba(255,255,255,.8)!important;
}
html[data-theme=light] body .w3m-auth-wrap input[type=text],
html[data-theme=light] body .w3m-auth-wrap input[type=email],
html[data-theme=light] body .w3m-auth-wrap input[type=password]{background:rgba(255,255,255,.72)!important}

/* Remove generic entry-content constraints from the auth card page. */
.entry-content:has(.w3m-auth-wrap),
.w3m-module-entry:has(.w3m-auth-wrap){
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding-left:clamp(12px,3vw,28px)!important;
  padding-right:clamp(12px,3vw,28px)!important;
  overflow:visible!important;
}
.entry-content:has(.w3m-auth-wrap) > .w3m-auth-wrap,
.w3m-module-entry:has(.w3m-auth-wrap) > .w3m-auth-wrap{margin-left:auto!important;margin-right:auto!important}

@media(max-width:700px){
  body .w3m-auth-wrap{
    width:calc(100% - 24px)!important;
    max-width:calc(100% - 24px)!important;
    margin:22px auto 40px!important;
    padding:22px 18px 24px!important;
    border-radius:22px!important;
  }
  body .w3m-auth-wrap::before{border-radius:22px}
  body .w3m-auth-brand{font-size:30px!important}
  body .w3m-auth-subtitle{font-size:13px!important;margin-bottom:22px!important}
  body .w3m-auth-wrap .w3m-auth-socials:not(.w3m-auth-socials-google-only){grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body .w3m-auth-wrap .w3m-auth-socials-google-only{grid-template-columns:1fr!important}
  body .w3m-auth-wrap .w3m-auth-socials-google-only .w3m-google-login{width:100%!important;min-width:0!important;justify-content:center!important}
  body .w3m-auth-wrap .w3m-social{height:48px!important}
  body .w3m-auth-wrap .w3m-auth-row{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important}
  body .w3m-auth-wrap .w3m-link-btn{margin-top:0!important;text-align:right!important}
  body .w3m-auth-wrap .w3m-wallet-login-main{padding:11px 12px!important}
  body .w3m-auth-wrap .w3m-wallet-login-main strong{font-size:14px!important}
  body .w3m-auth-wrap .w3m-wallet-login-main small{font-size:11px!important}
}
@media(max-width:390px){
  body .w3m-auth-wrap{width:calc(100% - 16px)!important;max-width:calc(100% - 16px)!important;padding:20px 14px 22px!important}
  body .w3m-auth-wrap .w3m-auth-row{display:grid!important;grid-template-columns:1fr!important;align-items:start!important}
  body .w3m-auth-wrap .w3m-link-btn{text-align:left!important}
}


/* W3M 3.5.26 — ensure auth module sits naturally below the header */
.w3m-module-page:has(.w3m-auth-wrap){padding-top:0!important}
.w3m-module-entry:has(.w3m-auth-wrap){padding-top:0!important}
.entry-content:has(.w3m-auth-wrap){padding-top:0!important}
@media(max-width:700px){
  .w3m-module-page:has(.w3m-auth-wrap){padding-top:0!important}
  body .w3m-auth-wrap{margin-top:10px!important}
}


/* =========================================================
   W3M 3.5.42 — canonical header logo shared by header and auth
   ========================================================= */
body .w3m-auth-brand{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:58px!important;
  margin:0 auto 14px!important;
  font-size:0!important;
  line-height:0!important;
}
body .w3m-auth-brand strong,
body .w3m-auth-brand span,
body .w3m-auth-brand::before{display:none!important;content:none!important}
body .w3m-auth-brand img{
  display:block!important;
  width:min(100%,300px)!important;
  height:auto!important;
  max-height:none!important;
  object-fit:contain!important;
}
@media(max-width:700px){
  body .w3m-auth-brand{min-height:48px!important;margin-bottom:12px!important}
  body .w3m-auth-brand img{width:min(100%,255px)!important}
}
@media(max-width:390px){body .w3m-auth-brand img{width:min(100%,225px)!important}}

body .w3m-auth-brand .w3m-theme-logo-swap{display:block;width:min(100%,280px)!important;margin:0 auto!important}
body .w3m-auth-brand .w3m-theme-logo-swap img{display:block;width:100%!important;height:auto!important}

/* 3.6.00 — App Wallet AI mobile containment and responsive token cards */
@media (max-width: 780px) {
  body:has(.w3m-app-page),
  body:has(.w3m-app-page) #page,
  body:has(.w3m-app-page) .w3m-app-page,
  body:has(.w3m-app-page) .w3m-app-workspace,
  body:has(.w3m-app-page) .w3m-app-workspace > .w3m-shell,
  body:has(.w3m-app-page) .w3m-app-panel,
  body:has(.w3m-app-page) .w3m-app-module {
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: clip !important;
  }

  body:has(.w3m-app-page) .w3m-app-workspace > .w3m-shell {
    width: calc(100% - 16px) !important;
    margin-inline: auto !important;
  }

  body:has(.w3m-app-page) .w3m-wallet-ai {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    transform: none !important;
    overflow: visible !important;
  }

  body:has(.w3m-app-page) .w3m-wallet-ai > *,
  body:has(.w3m-app-page) .w3m-wallet-results-shell,
  body:has(.w3m-app-page) .w3m-wallet-overview,
  body:has(.w3m-app-page) .w3m-wallet-token-section,
  body:has(.w3m-app-page) .w3m-wallet-token-list,
  body:has(.w3m-app-page) .w3m-wallet-ai-grid,
  body:has(.w3m-app-page) .w3m-wallet-ai-notes {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body:has(.w3m-app-page) .w3m-wallet-token-section,
  body:has(.w3m-app-page) .w3m-wallet-overview,
  body:has(.w3m-app-page) .w3m-wallet-ai-score,
  body:has(.w3m-app-page) .w3m-wallet-ai-notes,
  body:has(.w3m-app-page) .w3m-wallet-status-card {
    padding: 18px !important;
    border-radius: 22px !important;
  }

  body:has(.w3m-app-page) .w3m-wallet-token-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 13px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 16px !important;
    overflow: hidden !important;
  }

  body:has(.w3m-app-page) .w3m-wallet-token-row > div,
  body:has(.w3m-app-page) .w3m-wallet-token-main,
  body:has(.w3m-app-page) .w3m-wallet-token-main > div,
  body:has(.w3m-app-page) .w3m-wallet-risk-cell {
    grid-column: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body:has(.w3m-app-page) .w3m-wallet-token-main {
    padding-bottom: 13px !important;
    border-bottom: 1px solid rgba(148,163,184,.35) !important;
  }

  body:has(.w3m-app-page) .w3m-wallet-token-main strong,
  body:has(.w3m-app-page) .w3m-wallet-token-main small,
  body:has(.w3m-app-page) .w3m-wallet-token-row strong,
  body:has(.w3m-app-page) .w3m-wallet-token-row span,
  body:has(.w3m-app-page) .w3m-wallet-filter-summary {
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  body:has(.w3m-app-page) .w3m-wallet-token-row em {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-inline: 12px !important;
    white-space: normal !important;
  }

  body:has(.w3m-app-page) .w3m-wallet-filter-summary,
  body:has(.w3m-app-page) .w3m-wallet-section-head {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

/* 3.6.07 — auth logo inside module + compact forgot-password action */
body .w3m-auth-wrap .w3m-auth-brand{
  display:block!important;
  width:min(100%,280px)!important;
  height:70px!important;
  margin:0 auto 24px!important;
  background-image:url('../images/brand/w3m-brand-logo-3.5.46.png')!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:contain!important;
  line-height:0!important;
}
html[data-theme="light"] body .w3m-auth-wrap .w3m-auth-brand{
  background-image:url('../images/brand/w3m-brand-logo-3.5.46-light.png')!important;
}
body .w3m-auth-wrap .w3m-auth-brand > *{
  visibility:hidden!important;
}
body .w3m-auth-wrap .w3m-link-btn{
  width:auto!important;
  max-width:100%!important;
  min-height:44px!important;
  padding:9px 13px!important;
  border-radius:14px!important;
  font-size:clamp(13px,3.55vw,15px)!important;
  line-height:1.2!important;
  white-space:nowrap!important;
}
@media (max-width:430px){
  body .w3m-auth-wrap .w3m-auth-brand{
    width:min(76%,240px)!important;
    height:58px!important;
    margin-bottom:20px!important;
  }
  body .w3m-auth-wrap .w3m-auth-row{
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:10px!important;
  }
  body .w3m-auth-wrap .w3m-link-btn{
    justify-self:end!important;
    margin:0!important;
    padding:8px 10px!important;
    font-size:13px!important;
  }
}
@media (max-width:360px){
  body .w3m-auth-wrap .w3m-auth-row{
    grid-template-columns:1fr!important;
  }
  body .w3m-auth-wrap .w3m-link-btn{
    justify-self:start!important;
  }
}


/* W3M 3.6.22 mobile intelligence header pill width fix */
@media (max-width:768px){
  .w3mi-dashboard .w3mi-meta{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:10px !important;
  }
  .w3mi-dashboard .meta-pill{
    width:100% !important;
    justify-content:flex-start !important;
  }
}


/* W3M 3.6.23 mobile intelligence top-card width fix */
@media (max-width:768px){
  .w3mi-dashboard .w3mi-header{
    padding:0 !important;
    margin-bottom:12px !important;
    gap:12px !important;
    width:100% !important;
  }
  .w3mi-dashboard .w3mi-title,
  .w3mi-dashboard .w3mi-status{
    width:100% !important;
    min-width:0 !important;
    margin:0 !important;
    box-sizing:border-box !important;
  }
}


/* W3M 3.6.24 mobile intelligence hero corner polish */
@media (max-width:768px){
  .w3mi-dashboard .w3mi-title{
    position:relative !important;
    overflow:hidden !important;
    isolation:isolate !important;
    border-radius:26px !important;
    border-color:rgba(125,211,252,.16) !important;
    background:linear-gradient(135deg, rgba(9,18,30,.98), rgba(10,23,36,.98)) !important;
    box-shadow:0 14px 34px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.025) !important;
  }
  .w3mi-dashboard .w3mi-title::before{
    inset:0 !important;
    border-radius:inherit !important;
    background:linear-gradient(135deg, rgba(56,189,248,.07), rgba(56,189,248,0) 46%) !important;
  }
  .w3mi-dashboard .w3mi-title::after{
    right:-92px !important;
    top:-105px !important;
    width:210px !important;
    height:210px !important;
    background:rgba(56,189,248,.07) !important;
  }
  .w3mi-dashboard .eyebrow{
    box-shadow:none !important;
  }
}
