/* Support chat (assets/support.js). One dark panel over the paper landing and the night account page
   alike. Deliberately quiet: the answers are plain text instead of cards, and the buttons carry icons
   instead of labels, so the only words in the widget are the conversation itself. */
.help__btn{
  position:fixed; z-index:60; right:22px; bottom:22px;
  width:52px; height:52px; display:grid; place-items:center;
  border:0; border-radius:999px;
  background:var(--night,#0B0B0B); color:var(--bone,#EFEBE4);
  cursor:pointer; box-shadow:0 8px 24px rgba(11,11,11,.26), 0 0 0 1px rgba(239,235,228,.14);
  /* bottom changes when the landing's own bar comes and goes: up quickly, out of the bar's way,
     and back down a touch slower, so the move reads as settling rather than snapping */
  transition:transform .18s ease, box-shadow .18s ease, bottom .26s cubic-bezier(.33,1,.68,1);
}
.help__btn svg{width:23px; height:23px}
.help__btn:hover{transform:translateY(-2px); box-shadow:0 12px 30px rgba(11,11,11,.32)}
.help__btn:active{transform:none}
.help-open .help__btn{box-shadow:0 4px 14px rgba(11,11,11,.22)}
.help__btn:focus-visible,.help__ico:focus-visible,.help__chip:focus-visible,.help__send:focus-visible{
  outline:2px solid var(--orange,#FF4317); outline-offset:2px;
}

.help__panel{
  position:fixed; z-index:61; right:22px; bottom:86px;
  display:flex; flex-direction:column;
  width:min(372px, calc(100vw - 28px)); max-height:min(560px, 70dvh);
  border-radius:16px;
  background:#121110; color:var(--bone,#EFEBE4);
  box-shadow:0 18px 50px rgba(11,11,11,.4), 0 0 0 1px rgba(239,235,228,.08);
  overflow:hidden;
  animation:help-in .18s ease both;
  transition:bottom .26s cubic-bezier(.33,1,.68,1);
}
/* display:flex above would otherwise beat the browser's own rule for [hidden] */
.help__panel[hidden]{display:none}

@keyframes help-in{from{opacity:0; transform:translateY(6px)}to{opacity:1; transform:none}}
@media (prefers-reduced-motion:reduce){
  .help__panel{animation:none; transition:none}
  .help__btn{transition:none}
  .help__dots i{animation:none}
}

/* the title is a quiet label, not a headline: the answer is what should read first */
.help__head{display:flex; align-items:center; gap:2px; padding:11px 10px 5px}
.help__t{flex:1; min-width:0; margin:0 0 0 7px; font-size:12.5px; font-weight:600; letter-spacing:.01em; color:rgba(239,235,228,.5)}
.help__ico{
  flex:none; width:34px; height:34px; display:grid; place-items:center;
  border:0; border-radius:10px; background:transparent;
  color:rgba(239,235,228,.48); cursor:pointer;
}
.help__ico svg{width:17px; height:17px}
.help__ico:hover{color:var(--bone,#EFEBE4); background:rgba(239,235,228,.07)}
/* display:grid above would otherwise beat the browser's own rule for [hidden] */
.help__ico[hidden]{display:none}

.help__log{flex:1; overflow-y:auto; overscroll-behavior:contain; padding:6px 16px 6px; display:flex; flex-direction:column; gap:15px; -webkit-overflow-scrolling:touch}
.help__msg{font-size:14.5px; line-height:1.55}
.help__msg p{margin:0}
.help__msg p+p,.help__msg p+ul,.help__msg p+ol,.help__msg ul+p,.help__msg ol+p{margin-top:7px}
.help__msg b{font-weight:700}
.help__msg a{color:var(--orange,#FF4317); text-underline-offset:2px}
.help__msg ul,.help__msg ol{margin:0; padding-left:17px; list-style:revert; display:flex; flex-direction:column; gap:3px}
/* the bot speaks in the panel's own voice — no bubble, no border */
.help__msg--bot{color:rgba(239,235,228,.92)}
.help__msg--me{
  align-self:flex-end; max-width:86%; padding:8px 12px; font-size:14px;
  border-radius:14px 14px 4px 14px; background:rgba(239,235,228,.09);
}
.help__msg--intro{color:rgba(239,235,228,.52); font-size:15px}
.help__msg--warn{color:#FF8669}
.help__msg--warn a{color:#FF8669}

.help__dots{display:inline-flex; gap:4px; padding:5px 0}
.help__dots i{width:5px; height:5px; border-radius:50%; background:rgba(239,235,228,.45); animation:help-dot 1s infinite ease-in-out}
.help__dots i:nth-child(2){animation-delay:.14s}
.help__dots i:nth-child(3){animation-delay:.28s}
@keyframes help-dot{0%,60%,100%{opacity:.25; transform:translateY(0)}30%{opacity:1; transform:translateY(-2px)}}

.help__chips{display:flex; flex-wrap:wrap; gap:6px; margin-top:-4px}
.help__chip{
  min-height:40px; padding:0 13px; border-radius:999px;
  border:1px solid rgba(239,235,228,.15); background:transparent; color:rgba(239,235,228,.8);
  font:500 13px/1 var(--font,"Archivo",sans-serif); text-align:left; cursor:pointer;
  transition:color .15s ease, border-color .15s ease;
}
.help__chip:hover{color:var(--bone,#EFEBE4); border-color:rgba(239,235,228,.36)}

.help__form{display:flex; align-items:flex-end; gap:8px; padding:9px 11px 9px 16px; border-top:1px solid rgba(239,235,228,.08); transition:border-color .15s ease}
.help__form:focus-within{border-top-color:rgba(255,67,23,.3)}
.help__in{
  flex:1; min-height:38px; max-height:116px; padding:9px 0; resize:none;
  border:0; background:transparent; color:var(--bone,#EFEBE4);
  font:400 15px/1.4 var(--font,"Archivo",sans-serif);
}
.help__in::placeholder{color:rgba(239,235,228,.38)}
.help__in:focus{outline:none}
.help__send{
  flex:none; width:38px; height:38px; display:grid; place-items:center;
  border:0; border-radius:999px; background:var(--orange,#FF4317); color:#0B0B0B; cursor:pointer;
}
.help__send svg{width:18px; height:18px}
.help__send:disabled{opacity:.4; cursor:default}
.help__note{margin:0; padding:0 16px 12px; font-size:11px; line-height:1.4; color:rgba(239,235,228,.36)}
.help__note a{color:rgba(239,235,228,.6)}

/* The landing keeps its own button at the bottom (.phonebar: a full-width bar on a phone, a floating
   «Empieza a ganar» pill at the bottom right from 761px up) — exactly where the launcher sits. From 761px
   the launcher shares the bar's right edge, so the two line up in one column instead of colliding, and it
   steps above the pill while the pill is on screen. op.js hides the bar at the hero and at the sign-up
   form; the launcher then drops back into the corner. */
@media (min-width:761px){
  .help__btn,.help__panel{right:max(32px, env(safe-area-inset-right,0px))}
  body:has(.phonebar:not([hidden])) .help__btn,body:has(.phonebar:not([hidden])) .help__panel{transition-duration:.18s}
  body:has(.phonebar:not([hidden])) .help__btn{bottom:90px}
  body:has(.phonebar:not([hidden])) .help__panel{bottom:154px; max-height:min(560px, calc(100dvh - 180px))}
}
/* between the phone sheet and the desktop pill the bar is still full width, so only the height differs */
@media (min-width:640px) and (max-width:760px){
  body:has(.phonebar:not([hidden])) .help__btn{bottom:calc(86px + env(safe-area-inset-bottom,0px))}
  body:has(.phonebar:not([hidden])) .help__panel{bottom:calc(150px + env(safe-area-inset-bottom,0px))}
}

/* phones: a sheet at the bottom edge, and the launcher steps out of the way while it is open */
@media (max-width:639px){
  .help__btn{right:14px; bottom:calc(14px + env(safe-area-inset-bottom,0px)); width:48px; height:48px}
  .help__panel{
    right:8px; left:8px; bottom:calc(8px + env(safe-area-inset-bottom,0px));
    width:auto; max-height:82dvh; border-radius:18px;
  }
  .help-open .help__btn{display:none}
  .help__ico{width:40px; height:40px}
  .help__chip{min-height:44px}
  .help__msg{font-size:15px}
}
/* the landing keeps .phonebar at the bottom of a phone, the account page keeps its .tabs there:
   the launcher and the sheet both step above whichever is present */
@media (max-width:639px){
  body:has(.phonebar:not([hidden])) .help__btn,body:has(.tabs) .help__btn{bottom:calc(80px + env(safe-area-inset-bottom,0px))}
  body:has(.phonebar:not([hidden])) .help__panel,body:has(.tabs) .help__panel{bottom:calc(80px + env(safe-area-inset-bottom,0px)); max-height:72dvh}
}
