/* Reconquista Absoluta — Mobile Premium v2 */
:root{
  --nav-h:78px;
  --tap:48px;
  --ease-premium:cubic-bezier(.2,.8,.2,1);
}

html{min-height:100%;background:#171211;overscroll-behavior-x:none}
body{min-height:100%;overflow-x:hidden}
.app-container{isolation:isolate}
.page.active{animation:pageIn .28s var(--ease-premium)}
@keyframes pageIn{from{opacity:.55;transform:translateY(4px)}to{opacity:1;transform:none}}

/* Better mobile hierarchy */
.mobile-section-head{
  display:flex;align-items:center;justify-content:space-between;
  margin:22px 2px 11px;font-size:10px;line-height:1;
  color:#8A6B45;font-weight:900;letter-spacing:1.35px;text-transform:uppercase;
}
.mobile-section-head::after{content:"";height:1px;flex:1;margin-left:12px;background:linear-gradient(90deg,#E5D5C3,transparent)}

/* Intelligent next step */
.progress-panel::after{pointer-events:none}
.next-step-btn{
  width:100%;min-height:48px;margin-top:14px;padding:11px 14px;
  border:1px solid rgba(238,207,166,.22);border-radius:14px;
  background:linear-gradient(135deg,rgba(255,255,255,.11),rgba(255,255,255,.055));
  color:#fff;display:flex;align-items:center;justify-content:space-between;gap:12px;
  font:inherit;text-align:left;cursor:pointer;box-shadow:inset 0 1px rgba(255,255,255,.04);
}
.next-step-btn-main{display:block;font-size:12.5px;font-weight:850;letter-spacing:.05px}
.next-step-btn-sub{display:block;margin-top:3px;font-size:9.5px;color:#BAAAA3;font-weight:600}
.next-step-btn-arrow{width:30px;height:30px;display:flex;align-items:center;justify-content:center;flex:0 0 30px;border-radius:10px;background:#E5C79E;color:#241B19;font-size:14px;font-weight:900}

/* Progress state on plan modules */
.module-card{position:relative;overflow:hidden}
.module-card .module-info{min-width:0;flex:1}
.module-card .module-title{overflow-wrap:anywhere}
.module-progress-meta{display:flex;align-items:center;gap:7px;margin-top:7px}
.module-progress-track{height:4px;flex:1;max-width:100px;border-radius:999px;background:#EEE6E1;overflow:hidden}
.module-progress-fill{height:100%;border-radius:inherit;background:linear-gradient(90deg,#B58A52,#9F1239)}
.module-progress-label{font-size:9px;line-height:1;color:#8A7B74;font-weight:800;white-space:nowrap}
.module-card.module-done{border-color:#CFDDCF;background:linear-gradient(135deg,#FFFFFF,#F8FBF8)}
.module-card.module-done .module-icon.play{background:#EDF6EF;border-color:#D4E6D7}
.module-card.module-done .module-icon.play svg{fill:#406B49!important}
.module-card.module-current{border-color:#D9BE9B;box-shadow:0 9px 24px rgba(119,83,46,.075)}

/* Day completion becomes obvious without becoming loud */
.day-card{scroll-margin-top:78px;position:relative;transition:border-color .22s ease,box-shadow .22s ease,background .22s ease;content-visibility:auto;contain-intrinsic-size:360px}
.day-card.is-done{border-color:#CEDDCE;background:linear-gradient(180deg,#fff,#FBFDFB)}
.day-card.is-done::after{content:"CONCLUÍDO";position:absolute;top:17px;right:16px;padding:5px 7px;border-radius:999px;background:#EEF7F0;color:#42684A;font-size:8px;font-weight:900;letter-spacing:.7px}
.day-card.is-done .day-header{padding-right:67px}
.day-card.is-done .day-number{background:#294232;color:#DDF0E1}

/* Offers - still neutral until final upsell links/copy arrive */
.premium-offer{position:relative!important}
.premium-offer::after{content:"→";position:absolute;right:18px;top:18px;width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:10px;background:#F4EEE9;color:#806E65;font-size:12px;font-weight:900}
.premium-offer>div:first-of-type{padding-right:30px}

/* Toast */
.app-toast{
  position:fixed;z-index:1000;left:50%;bottom:calc(94px + env(safe-area-inset-bottom));
  width:max-content;max-width:calc(100vw - 34px);transform:translate(-50%,18px);
  opacity:0;pointer-events:none;padding:11px 14px;border-radius:13px;
  background:rgba(28,21,19,.96);color:#F7EFEB;border:1px solid rgba(255,255,255,.08);
  box-shadow:0 16px 44px rgba(0,0,0,.24);backdrop-filter:blur(14px);
  font-size:11.5px;font-weight:750;line-height:1.35;text-align:center;
  transition:opacity .22s ease,transform .22s var(--ease-premium)
}
.app-toast.show{opacity:1;transform:translate(-50%,0)}

/* Install action */
.install-app-option{display:none}
.install-app-option.available{display:flex}

/* Accessibility and touch */
.card,.module-card,.crisis-card,.grid-item,.profile-option,.nav-item,.hero-cta,.day-complete,.back-btn,.quiz-option,.quiz-btn,.btn{touch-action:manipulation;-webkit-user-select:none;user-select:none}
.card:active,.module-card:active,.crisis-card:active,.grid-item:active,.profile-option:active,.hero-cta:active,.day-complete:active,.back-btn:active,.quiz-option:active,.next-step-btn:active{transform:scale(.985)}
input{font-size:16px!important}
a,button{outline-offset:3px}
a:focus-visible,button:focus-visible,input:focus-visible{outline:2px solid #C49A65;outline-offset:3px}

@media (max-width:699px){
  html,body{background:#F7F4F2}
  body{display:block}
  .app-container{width:100%;max-width:none;min-height:100svh;box-shadow:none;border-radius:0}
  .page,.welcome-screen,.quiz-screen{min-height:100svh}
  .page-content{padding:18px 17px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom))}
  #page-dashboard .page-content{padding-top:max(18px,env(safe-area-inset-top))!important}

  .welcome-screen{justify-content:center;padding:calc(42px + env(safe-area-inset-top)) 22px calc(30px + env(safe-area-inset-bottom))}
  .welcome-screen::before{top:calc(18px + env(safe-area-inset-top))}
  .welcome-icon{width:68px;height:68px;margin-bottom:19px}
  .welcome-product{font-size:30px}
  .welcome-subtitle{font-size:14px;line-height:1.58;margin-bottom:20px}
  .welcome-quote{font-size:12.5px;line-height:1.58;margin-bottom:18px;padding:15px 17px}
  .name-input,.btn-primary{max-width:360px}

  .quiz-screen{padding:calc(24px + env(safe-area-inset-top)) 17px calc(25px + env(safe-area-inset-bottom))}
  .quiz-question-text{font-size:24px}
  .quiz-option{min-height:54px;padding:15px 16px;font-size:14.5px}
  .quiz-btn{min-height:54px;margin-top:13px;font-size:14px}

  .brand-row{margin-bottom:21px}.brand-chip{padding:6px 8px}
  .dashboard-title{font-size:30px}.dashboard-sub{font-size:13.5px;line-height:1.55}
  .progress-panel{padding:18px 17px;border-radius:22px}
  .progress-title{font-size:16px}.progress-value{font-size:24px}
  .hero-card{padding:21px 18px;border-radius:22px}.hero-title{font-size:21px}.hero-desc{font-size:13px;line-height:1.58}.hero-cta{min-height:44px;padding:11px 14px}
  .card{min-height:73px;padding:15px 14px}.card-title{font-size:14.5px}.card-sub{font-size:12px;line-height:1.4}.card-icon{width:44px;height:44px}

  .page-header{height:auto;min-height:61px;padding:calc(9px + env(safe-area-inset-top)) 16px 9px;background:rgba(251,248,246,.94)}
  .back-btn{min-width:44px;width:44px;height:44px;border-radius:14px}.header-title{font-size:15.5px;line-height:1.15;padding-right:44px;text-align:center}

  .bottom-nav{
    width:calc(100% - 20px);max-width:none;height:auto;min-height:70px;
    bottom:max(8px,env(safe-area-inset-bottom));padding:7px 7px;
    border-radius:21px;
  }
  .nav-item{min-width:0;min-height:54px;padding:5px 3px;font-size:9px;line-height:1.05;gap:3px}
  .nav-icon{height:22px}.nav-icon svg{width:20px;height:20px}

  .section-label{margin-top:3px;margin-bottom:11px}
  .module-card{min-height:72px;padding:14px 13px;border-radius:17px;gap:11px}.module-icon{width:43px;height:43px;flex:0 0 43px}.module-title{font-size:13px;line-height:1.32}.module-sub{font-size:11px;line-height:1.35}.module-arrow{flex:0 0 28px}
  .phase-title{font-size:26px}.phase-objective{font-size:14px;line-height:1.62;padding:14px}
  .day-card{padding:18px 16px;border-radius:20px}.day-number{min-width:44px;width:44px;height:44px}.day-title{font-size:15px}.day-meta{font-size:11.5px;line-height:1.4}
  .day-section{margin-top:17px}.day-section-title{font-size:11.5px;line-height:1.35;margin-bottom:8px}.day-text,.example-text,.rules-text,.highlight-text,.final-text{font-size:14.5px!important;line-height:1.68!important}.day-text li,.rules-text li{margin-bottom:7px}
  .example-box,.rules-box,.highlight-box,.final-day,.tip-box{padding:14px;margin-top:13px}
  .day-complete{min-height:48px;font-size:12px;margin-top:17px}

  .diagnostico-title{font-size:25px}.diagnostico-card-desc,.recommendation-list{font-size:14px!important;line-height:1.62!important}
  .grid-3{gap:8px}.grid-item{padding:13px 7px;min-height:100px}.grid-label{font-size:11.5px}.grid-sub{font-size:9.5px}
  .profile-option{min-height:58px;padding:12px 13px}.profile-option-text{font-size:13.5px}
  .crisis-card{min-height:76px}.crisis-title{font-size:14px}.crisis-sub{font-size:11.5px;line-height:1.35}.crisis-content-text,.crisis-list,.crisis-step{font-size:14.5px!important;line-height:1.65!important}

  .modal-overlay{align-items:flex-end;padding:0}.modal{width:100%;max-width:none;border-radius:26px 26px 0 0;padding:24px 20px calc(20px + env(safe-area-inset-bottom));animation:sheetUp .28s var(--ease-premium)}
  @keyframes sheetUp{from{transform:translateY(22px);opacity:.5}to{transform:none;opacity:1}}
}

@media (max-width:365px){
  .page-content{padding-left:14px;padding-right:14px}.dashboard-title{font-size:27px}.brand-name{font-size:15px}.brand-chip{font-size:9px}.nav-item{font-size:8.5px}.day-text,.example-text,.rules-text,.highlight-text,.final-text{font-size:14px!important}
}

@media (hover:hover) and (pointer:fine){
  .card:hover,.module-card:hover,.crisis-card:hover,.profile-option:hover{transform:translateY(-1px);box-shadow:var(--shadow-hover)}
}

@media (prefers-reduced-motion:reduce){.page.active{animation:none}.app-toast{transition:none}}
