/* Convince Me - styles
   Mobile-first: the app is a single column that fills the phone and is
   capped at 430px (centred) on larger screens. */

*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}

html{-webkit-text-size-adjust:100%}

body{
  background:#e9e5dc;
  font-family:"DM Sans",system-ui,sans-serif;
  color:#171717;
  display:flex;
  justify-content:center;
  min-height:100vh;
  min-height:100dvh;
}

button{font-family:inherit;color:inherit}

.phone{
  width:100%;
  max-width:430px;
  min-height:100vh;
  min-height:100dvh;
  background:#f8f6f0;
  position:relative;
  overflow-x:hidden;
}

@media (min-width:520px){
  .phone{box-shadow:0 20px 60px rgba(0,0,0,.18)}
}

.screen{
  min-height:100vh;
  min-height:100dvh;
  padding:calc(24px + env(safe-area-inset-top)) 20px calc(104px + env(safe-area-inset-bottom));
  display:none;
  animation:fade .25s ease;
}

.screen.active{display:block}

@keyframes fade{from{opacity:0}to{opacity:1}}

h1{
  font-size:clamp(26px,8.4vw,32px);
  line-height:1.05;
  font-weight:800;
  letter-spacing:-1.5px
}

h2{
  font-size:clamp(20px,6.2vw,24px);
  line-height:1.1;
  font-weight:800;
  letter-spacing:-.8px
}

h3{font-size:17px;font-weight:700}

p{line-height:1.45}

.muted{color:#77746d}
.small{font-size:12px}

.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:25px
}

.back,.iconBtn{
  width:40px;
  height:40px;
  flex:0 0 40px;
  border-radius:50%;
  border:1px solid #ddd9d0;
  background:white;
  cursor:pointer;
  font-size:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative
}

.iconBtn.plain{border:0;background:none}

.badgeDot{
  position:absolute;
  top:-3px;
  right:-3px;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:9px;
  background:#b33d32;
  color:white;
  font-size:10px;
  font-weight:800;
  display:flex;
  align-items:center;
  justify-content:center
}

.chip{
  border:1px solid #1a1a1a;
  background:transparent;
  border-radius:20px;
  padding:9px 15px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap
}

.chip.fill{background:#1a1a1a;color:white}
.chip.green{background:#c7f45b;border-color:#c7f45b;color:#151515}

.linkBtn{
  border:0;
  background:none;
  font:inherit;
  font-size:12px;
  color:#77746d;
  cursor:pointer;
  padding:4px 0
}

.btn{
  border:0;
  width:100%;
  min-height:52px;
  border-radius:18px;
  background:#1a1a1a;
  color:white;
  font-family:inherit;
  font-size:15px;
  font-weight:700;
  cursor:pointer;
  transition:.15s
}

.btn:hover{transform:translateY(-2px)}
.btn:active{transform:scale(.98)}
.btn.green{background:#c7f45b;color:#151515}
.btn.outline{background:transparent;border:1px solid #1a1a1a;color:#1a1a1a}
.btn.danger{background:transparent;border:1px solid #b33d32;color:#b33d32}
.btn:disabled{opacity:.45;cursor:not-allowed;transform:none}

.card{
  background:white;
  border:1px solid #e4e0d7;
  border-radius:20px;
  padding:18px;
  box-shadow:0 5px 18px rgba(0,0,0,.035)
}

.field{margin-top:12px}
.field label{display:block;margin-bottom:5px}

.input{
  width:100%;
  padding:15px 17px;
  border-radius:15px;
  border:1px solid #d8d4ca;
  background:#fff;
  font-family:inherit;
  font-size:16px;
  outline:none
}

.input:focus{border-color:#222}

select.input{appearance:none;-webkit-appearance:none}

.spacer{height:20px}

.empty{
  text-align:center;
  padding:28px 10px;
  color:#77746d;
  font-size:14px
}

.empty .big{font-size:34px;display:block;margin-bottom:8px}

/* WELCOME */

#welcome{
  text-align:center;
  padding-top:calc(65px + env(safe-area-inset-top))
}

.welcomeLogo{
  font-family:Pacifico,cursive;
  font-size:54px;
  line-height:.85;
  transform:rotate(-5deg);
  margin-bottom:35px
}

.character{
  width:180px;
  height:180px;
  border-radius:48% 52% 45% 55%;
  background:#c7f45b;
  margin:35px auto;
  position:relative;
  box-shadow:inset -12px -8px 0 rgba(0,0,0,.05)
}

.character:before,.character:after{
  content:"";
  position:absolute;
  width:15px;
  height:15px;
  background:#161616;
  border-radius:50%;
  top:65px
}

.character:before{left:55px}
.character:after{right:55px}

.eyeLine{
  position:absolute;
  width:55px;
  height:4px;
  background:#161616;
  top:83px;
  left:63px;
  transform:rotate(7deg)
}

.character .arm{
  position:absolute;
  width:65px;
  height:18px;
  background:#c7f45b;
  right:-38px;
  top:95px;
  transform:rotate(-25deg);
  border-radius:20px
}

.character .bag{
  position:absolute;
  width:35px;
  height:45px;
  background:#191919;
  right:-48px;
  top:117px;
  border-radius:5px
}

.tagline{
  font-size:23px;
  font-weight:700;
  margin-bottom:35px
}

/* PROGRESS */

.progress{
  width:100%;
  height:5px;
  background:#dedbd3;
  border-radius:10px;
  margin:15px 0 35px
}

.progress span{
  display:block;
  height:100%;
  background:#171717;
  border-radius:10px;
  transition:width .3s
}

/* ONBOARDING */

.money{
  font-size:clamp(32px,10.5vw,42px);
  font-weight:800;
  letter-spacing:-2px;
  margin:25px 0
}

.option-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin:20px 0
}

.option{
  padding:20px 12px;
  background:white;
  border:1px solid #dedbd2;
  border:2px solid transparent;
  outline:1px solid #dedbd2;
  border-radius:17px;
  cursor:pointer;
  text-align:center;
  transition:.2s;
  font-size:14px
}

.option.selected{
  border-color:#171717;
  outline-color:transparent;
  background:#d9f79a
}

.option .icon{
  font-size:25px;
  display:block;
  margin-bottom:8px
}

.appRow{
  display:flex;
  align-items:center;
  gap:15px;
  margin-bottom:10px
}

.appRow .logoLetter{
  width:38px;
  height:38px;
  border-radius:12px;
  background:#efece4;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:19px
}

/* HOME */

.greeting{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px
}

.greeting .right{display:flex;align-items:center;gap:10px}

.avatar{
  width:42px;
  height:42px;
  flex:0 0 42px;
  background:#c7f45b;
  border:0;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:16px;
  cursor:pointer
}

.avatar.big{width:76px;height:76px;flex-basis:76px;font-size:30px}

.banner{
  display:flex;
  align-items:center;
  gap:12px;
  background:#1a1a1a;
  color:white;
  border-radius:18px;
  padding:14px 16px;
  margin-top:18px
}

.banner .txt{flex:1;font-size:13px;line-height:1.35}
.banner .txt b{display:block;font-size:14px}

.available{margin-top:25px}

.available .amount{
  font-size:clamp(34px,11vw,43px);
  font-weight:800;
  letter-spacing:-2px;
  margin-top:5px
}

.stat-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin:18px 0
}

.stat{
  background:white;
  border-radius:17px;
  padding:15px;
  border:1px solid #e4e0d7;
  min-width:0
}

.stat strong{
  display:block;
  font-size:17px;
  margin-top:5px;
  overflow:hidden;
  text-overflow:ellipsis
}

.section{
  margin-top:27px;
  margin-bottom:12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px
}

.goal{margin-bottom:10px}

.goalTop{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:8px
}

.bar{
  height:7px;
  background:#e3e0d8;
  border-radius:10px;
  overflow:hidden
}

.bar span{
  display:block;
  height:100%;
  background:#1b1b1b;
  border-radius:10px;
  transition:width .3s
}

.history{
  display:flex;
  align-items:center;
  gap:12px;
  padding:13px 0;
  border-bottom:1px solid #e5e2db;
  cursor:pointer
}

.productThumb{
  width:48px;
  height:48px;
  flex:0 0 48px;
  background:#e8e4db;
  border-radius:13px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:27px
}

.historyInfo{flex:1;min-width:0}
.historyInfo b,.historyInfo p{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}

.status{
  padding:6px 10px;
  border:0;
  border-radius:10px;
  font-size:10px;
  font-weight:800;
  background:#e9e5dc;
  white-space:nowrap;
  cursor:default
}

button.status{cursor:pointer;font-size:11px;padding:8px 13px}

.status.paused{background:#ffc5bd}
.status.approved{background:#d0f4aa}
.status.skipped{background:#cfe3ff}
.status.bought{background:#f3e2a9}

/* GOALS EDITOR */

.goalEditorRow{
  background:white;
  border:1px solid #e3e0d8;
  border-radius:18px;
  padding:15px;
  margin-bottom:10px
}

.goalEditorTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px
}

.pctWrap{display:flex;align-items:center;gap:6px;font-weight:700}

.goalPercent{
  width:78px;
  padding:10px 12px;
  border:1px solid #ddd9d0;
  border-radius:12px;
  font:inherit;
  font-size:16px;
  outline:none
}

.goalFoot{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:10px;
  gap:10px
}

/* WISHLIST */

.wishlistItem{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 0;
  border-bottom:1px solid #e7e3da;
  cursor:pointer
}

.wishlistItem:last-child,.history:last-child{border-bottom:0}

.priority{
  font-size:10px;
  font-weight:800;
  padding:5px 8px;
  border-radius:9px;
  background:#e9e5dc;
  border:0;
  white-space:nowrap;
  display:inline-block
}

.priority.high{background:#d9f79a}
.priority.non{background:#ffc5bd}

/* SHOP */

.search{
  margin:18px 0 14px
}

.filters{
  display:flex;
  gap:8px;
  overflow-x:auto;
  margin:0 -20px 17px;
  padding:0 20px;
  scrollbar-width:none
}

.filters::-webkit-scrollbar{display:none}

.filter{
  padding:9px 15px;
  border-radius:20px;
  background:white;
  border:1px solid #ddd9d0;
  white-space:nowrap;
  font-size:12px;
  cursor:pointer
}

.filter.active{
  background:#171717;
  color:white;
  border-color:#171717
}

.shopProduct{
  background:white;
  border-radius:19px;
  padding:12px;
  display:flex;
  gap:13px;
  margin-bottom:10px;
  border:1px solid #e4e0d7;
  cursor:pointer
}

.shopImage{
  width:84px;
  height:84px;
  flex:0 0 84px;
  border-radius:14px;
  background:#e8e4db;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:42px
}

.shopInfo{padding-top:4px;min-width:0}
.shopInfo b{display:block;overflow:hidden;text-overflow:ellipsis}

.shopInfo .price{
  font-weight:800;
  margin-top:8px
}

.sale{
  color:#b33d32;
  font-size:10px;
  font-weight:800;
  margin-top:3px
}

/* PRODUCT */

.productImage{
  height:clamp(200px,34vh,280px);
  border-radius:24px;
  background:#e7e3da;
  display:flex;
  justify-content:center;
  align-items:center;
  font-size:clamp(90px,32vw,130px);
  margin-bottom:25px
}

.priceLarge{
  font-size:31px;
  font-weight:800;
  margin:10px 0 5px
}

.oldPrice{
  text-decoration:line-through;
  color:#999;
  font-size:15px;
  margin-right:8px
}

.salePrice{
  color:#171717;
  font-size:31px;
  font-weight:800
}

.sizes{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:15px 0 25px
}

.size{
  border:1px solid #d7d3ca;
  padding:10px 17px;
  border-radius:12px;
  background:white;
  cursor:pointer;
  font-family:inherit;
  font-weight:600
}

.size.selected{
  background:#d9f79a;
  border:2px solid #171717;
  padding:9px 16px
}

/* CHECKOUT */

.orderProduct{
  display:flex;
  gap:14px;
  align-items:center;
  margin:20px 0
}

.orderProduct .productThumb{
  width:75px;
  height:75px;
  flex-basis:75px
}

.line{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:12px 0;
  border-bottom:1px solid #e7e3da
}

.total{
  display:flex;
  justify-content:space-between;
  font-weight:800;
  font-size:20px;
  padding:17px 0 0
}

.warn{
  margin-top:14px;
  padding:12px 14px;
  border-radius:14px;
  background:#ffe3df;
  color:#8a2b22;
  font-size:13px
}

/* OVERLAYS + SHEETS */

.overlay{
  position:fixed;
  inset:0;
  background:rgba(20,20,20,.55);
  z-index:60;
  display:none;
  align-items:flex-end;
  justify-content:center
}

.overlay.active{display:flex}

.intervention,.sheet{
  background:#f8f6f0;
  width:100%;
  max-width:430px;
  max-height:92vh;
  max-height:92dvh;
  overflow-y:auto;
  border-radius:30px 30px 0 0;
  padding:27px 22px calc(30px + env(safe-area-inset-bottom));
  animation:sheet .3s ease
}

@keyframes sheet{
  from{transform:translateY(100%)}
  to{transform:translateY(0)}
}

.sheetHead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:6px
}

.wait{
  font-size:clamp(36px,11.5vw,45px);
  font-weight:800;
  letter-spacing:-2px
}

.interventionProduct{
  display:flex;
  gap:14px;
  margin:25px 0;
  align-items:center
}

.interventionProduct .productThumb{
  width:100px;
  height:100px;
  flex-basis:100px;
  font-size:50px
}

.notifItem{
  display:flex;
  gap:12px;
  padding:13px 0;
  border-bottom:1px solid #e5e2db
}

.notifItem:last-child{border-bottom:0}
.notifItem .dot{
  width:9px;
  height:9px;
  flex:0 0 9px;
  margin-top:6px;
  border-radius:50%;
  background:#dedbd3
}
.notifItem.unread .dot{background:#b33d32}

/* SETTINGS ROWS */

.row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 0;
  border-bottom:1px solid #e7e3da
}

.row:last-child{border-bottom:0}
.row .grow{flex:1;min-width:0}

.switch{
  position:relative;
  width:50px;
  height:30px;
  flex:0 0 50px;
  border-radius:15px;
  background:#d3cfc5;
  border:0;
  cursor:pointer;
  transition:.2s
}

.switch:after{
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:24px;
  height:24px;
  border-radius:50%;
  background:white;
  transition:.2s
}

.switch.on{background:#171717}
.switch.on:after{transform:translateX(20px);background:#c7f45b}

/* CHAT */

#debate.active{
  display:flex;
  flex-direction:column;
  height:100vh;
  height:100dvh;
  min-height:0;
  padding-bottom:0
}

.chatHeader{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0
}

.aiDot{
  width:34px;
  height:34px;
  flex:0 0 34px;
  border-radius:50%;
  background:#c7f45b;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:17px;
  transition:.3s
}

.aiDot.skeptical{transform:rotate(-8deg)}
.aiDot.serious{background:#ffc5bd}
.aiDot.happy{background:#baf16a}

.chatProduct{
  margin:0 0 8px;
  display:flex;
  gap:12px;
  align-items:center
}

.messages{
  flex:1;
  min-height:0;
  overflow-y:auto;
  padding-bottom:calc(96px + env(safe-area-inset-bottom))
}

.transcript{padding-bottom:20px}

.message{
  max-width:88%;
  padding:14px 16px;
  border-radius:18px;
  margin:10px 0;
  font-size:14px;
  line-height:1.45;
  animation:messageIn .25s ease;
  overflow-wrap:anywhere
}

@keyframes messageIn{
  from{opacity:0;transform:translateY(7px)}
  to{opacity:1;transform:translateY(0)}
}

.message.ai{
  background:white;
  border:1px solid #e4e0d7;
  border-bottom-left-radius:5px
}

.message.user{
  margin-left:auto;
  background:#607fa5;
  color:white;
  border-bottom-right-radius:5px
}

.message.system{
  background:#d9f79a;
  margin:10px auto;
  font-size:12px;
  text-align:center
}

.typing{
  display:flex;
  gap:4px;
  padding:13px 17px;
  width:60px
}

.typing span{
  width:6px;
  height:6px;
  background:#777;
  border-radius:50%;
  animation:typing 1s infinite
}

.typing span:nth-child(2){animation-delay:.15s}
.typing span:nth-child(3){animation-delay:.3s}

@keyframes typing{
  0%,100%{opacity:.25}
  50%{opacity:1}
}

.chatInput{
  position:fixed;
  bottom:0;
  left:50%;
  transform:translateX(-50%);
  width:100%;
  max-width:430px;
  padding:14px 17px calc(16px + env(safe-area-inset-bottom));
  background:rgba(248,246,240,.96);
  display:none;
  gap:8px;
  z-index:5
}

#debate.active .chatInput{display:flex}

.chatInput input{
  flex:1;
  min-width:0;
  border:1px solid #ddd9d0;
  background:white;
  padding:15px;
  border-radius:25px;
  outline:none;
  font-family:inherit;
  font-size:16px
}

.voice,.send{
  width:48px;
  height:48px;
  flex:0 0 48px;
  border-radius:50%;
  cursor:pointer;
  font-size:18px
}

.voice{
  border:1px solid #ddd9d0;
  background:white;
  color:#171717
}

.voice.listening{
  background:#d9f79a;
  border:2px solid #171717;
  animation:pulseVoice 1s infinite
}

@keyframes pulseVoice{
  0%,100%{transform:scale(1)}
  50%{transform:scale(1.06)}
}

.send{
  border:0;
  background:#171717;
  color:white
}

.voice:disabled,.send:disabled{
  opacity:.45;
  cursor:not-allowed
}

/* RESULT */

.resultPage{
  text-align:center;
  padding-top:35px
}

.resultIcon{
  width:95px;
  height:95px;
  border-radius:50%;
  margin:30px auto;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:45px
}

.resultIcon.good{background:#c7f45b}
.resultIcon.bad{background:#ffc5bd}

.resultProduct{
  background:white;
  border-radius:22px;
  padding:20px;
  margin:25px 0;
  text-align:left
}

/* NAV */

.nav{
  position:fixed;
  bottom:0;
  left:50%;
  transform:translateX(-50%);
  width:100%;
  max-width:430px;
  padding-bottom:env(safe-area-inset-bottom);
  background:rgba(255,255,255,.96);
  border-top:1px solid #e3e0d8;
  display:none;
  justify-content:space-around;
  z-index:10
}

.nav.show{display:flex}

.navItem{
  flex:1;
  height:68px;
  border:0;
  background:none;
  text-align:center;
  color:#88847d;
  font-size:10px;
  cursor:pointer;
  position:relative
}

.navItem.active{
  color:#171717;
  font-weight:800
}

.navIcon{
  display:block;
  font-size:19px;
  margin-bottom:3px
}

/* TOAST */

.toast{
  position:fixed;
  top:calc(14px + env(safe-area-inset-top));
  left:50%;
  width:calc(100% - 28px);
  max-width:402px;
  background:#171717;
  color:white;
  padding:14px 16px;
  border-radius:16px;
  z-index:90;
  transform:translate(-50%,-160%);
  transition:transform .3s;
  font-size:13px;
  line-height:1.4;
  box-shadow:0 10px 30px rgba(0,0,0,.25)
}

.toast.show{transform:translate(-50%,0)}
.toast.tappable{cursor:pointer}
.toast b{display:block;font-size:14px;margin-bottom:2px}
