/* Coral: Nora's AI beauty assistant. A glossy coral pill that opens a chat sheet over the card. Uses the card's tokens. */
:root{
  --c-sheet:#FFFFFF;
  --c-bubble:#F6E3E1;
  --c-me:#16121A;
  --c-meText:#FFFFFF;
  --c-shadow:0 18px 50px rgba(22,18,26,.28);
}

.coral-fab{position:fixed;left:0;bottom:calc(20px + env(safe-area-inset-bottom,0px));z-index:40;
  display:flex;align-items:center;gap:8px;height:42px;padding:0 15px 0 6px;border:0;border-radius:0 21px 21px 0;cursor:pointer;white-space:nowrap;
  color:#FFFFFF;font-family:var(--body);font-weight:700;font-size:13px;letter-spacing:.2px;
  background:linear-gradient(180deg,#FFA4A6 0%,#EE6E73 42%,#D44E58 78%,#B83A45 100%);
  box-shadow:0 10px 22px rgba(238,110,115,.42),inset 0 2px 1px rgba(255,255,255,.65),inset 0 -4px 8px rgba(110,15,30,.35);
  transform:translateX(-110%);transition:transform .4s cubic-bezier(.2,.9,.25,1);
  overflow:hidden;isolation:isolate;text-shadow:0 1px 1px rgba(110,15,30,.35)}
/* Same high-gloss finish as the card's Save Contact pill: top highlight plus a moving sheen */
.coral-fab::before,.cs-cta::before{content:"";position:absolute;left:7%;right:7%;top:3px;height:46%;border-radius:999px;background:linear-gradient(180deg,rgba(255,255,255,.7) 0%,rgba(255,255,255,.12) 100%);z-index:1;pointer-events:none}
.coral-fab::after,.cs-cta::after{content:"";position:absolute;top:0;bottom:0;left:-70%;width:45%;background:linear-gradient(100deg,rgba(255,255,255,0) 0%,rgba(255,255,255,.55) 50%,rgba(255,255,255,0) 100%);transform:skewX(-22deg);z-index:1;pointer-events:none;animation:sheen 5s ease-in-out infinite}
.coral-fab::after{animation-delay:1.3s}
.coral-fab > *{position:relative;z-index:2}
.coral-fab.show{transform:translateX(0)}
.coral-fab:active{filter:brightness(.95)}
.coral-fab[hidden]{display:none!important}
.coral-fab .cf-dot{width:30px;height:30px;border-radius:50%;background:#FFFFFF;display:grid;place-items:center;flex:none;box-shadow:inset 0 0 0 2px rgba(238,110,115,.25)}
.coral-fab .cf-dot svg{width:17px;height:17px;fill:none;stroke:var(--coral);stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

.coral-scrim{position:fixed;inset:0;z-index:50;background:rgba(22,18,26,.42);opacity:0;transition:opacity .25s ease}
.coral-scrim.on{opacity:1}
.coral-sheet{position:fixed;left:50%;bottom:0;z-index:51;width:100%;max-width:480px;height:min(88dvh,760px);
  transform:translate(-50%,104%);transition:transform .32s cubic-bezier(.2,.9,.25,1);
  background:var(--c-sheet);border-radius:22px 22px 0 0;box-shadow:var(--c-shadow);display:flex;flex-direction:column;overflow:hidden;
  padding-bottom:env(safe-area-inset-bottom,0px)}
.coral-sheet.on{transform:translate(-50%,0)}

.cs-head{display:flex;align-items:center;gap:12px;padding:14px 14px 12px 16px;border-bottom:1px solid var(--line);flex:none}
.cs-av{width:40px;height:40px;border-radius:50%;flex:none;display:grid;place-items:center;
  background:linear-gradient(180deg,#FFA4A6,#EE6E73 55%,#C2414B);color:#FFFFFF;font-family:var(--display);font-size:20px}
.cs-who{flex:1;min-width:0}
.cs-who b{display:block;font-family:var(--display);font-weight:400;font-size:22px;line-height:1}
.cs-who span{display:block;margin-top:3px;font-size:12px;color:var(--mute)}
.cs-clear{min-height:36px;padding:0 12px;border-radius:999px;border:1.5px solid var(--line);background:#FFFFFF;color:var(--mute);font:700 12px/1 var(--body);letter-spacing:.3px;cursor:pointer;flex:none}
.cs-clear:active{transform:scale(.97)}
.cs-x{width:44px;height:44px;border:0;border-radius:50%;background:var(--c-bubble);cursor:pointer;display:grid;place-items:center;flex:none}
.cs-x svg{width:18px;height:18px;stroke:var(--ink);stroke-width:2.2;stroke-linecap:round;fill:none}

.cs-log{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:16px 14px 8px;display:flex;flex-direction:column;gap:10px;-webkit-overflow-scrolling:touch}
.cs-msg{max-width:86%;padding:11px 14px;border-radius:18px;font-size:15px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.cs-msg.bot{align-self:flex-start;background:var(--c-bubble);color:var(--ink);border-bottom-left-radius:6px}
.cs-msg.me{align-self:flex-end;background:var(--c-me);color:var(--c-meText);border-bottom-right-radius:6px}
.cs-msg.err{background:#FFF4E5;color:#7A4A00}
.cs-typing{align-self:flex-start;display:flex;gap:5px;padding:14px 16px;border-radius:18px;background:var(--c-bubble)}
.cs-typing i{width:7px;height:7px;border-radius:50%;background:var(--rose);opacity:.35;animation:csdot 1.2s infinite}
.cs-typing i:nth-child(2){animation-delay:.15s}.cs-typing i:nth-child(3){animation-delay:.3s}
@keyframes csdot{0%,60%,100%{opacity:.25;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}

.cs-chips{display:flex;flex-wrap:wrap;gap:8px;padding:0 0 4px}
.cs-chip{min-height:40px;padding:0 14px;border-radius:999px;border:1.5px solid var(--coral);background:#FFFFFF;color:var(--rose);font-weight:700;font-size:13px;cursor:pointer}
.cs-chip:active{transform:scale(.97)}

.cs-prods{display:flex;flex-direction:column;gap:8px;align-self:stretch}
.cs-prod{display:flex;gap:12px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:16px;background:#FFFFFF}
.cs-prod img{width:64px;height:64px;object-fit:contain;border-radius:10px;background:#FAF5F3;flex:none}
.cs-ptext{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.cs-pname{font-weight:700;font-size:14px;line-height:1.25}
.cs-pwhy{font-size:13px;color:var(--mute);line-height:1.35}
.cs-pprice{font-size:13px;font-weight:700;color:var(--rose);font-variant-numeric:tabular-nums}
.cs-pbuy{align-self:flex-start;margin-top:4px;min-height:36px;display:inline-flex;align-items:center;padding:0 14px;border-radius:999px;background:var(--ink);color:#FFFFFF;font-size:12px;font-weight:700;letter-spacing:.4px}

.cs-cat{align-self:stretch;display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:16px;border:1px solid var(--line);background:#FFFFFF}
.cs-cat-h{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.cs-cat-h b{font-family:var(--display);font-weight:400;font-size:21px;line-height:1.1}
.cs-cat-h span{font-size:12px;color:var(--mute);font-variant-numeric:tabular-nums;flex:none}
.cs-cat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:460px;overflow-y:auto;overscroll-behavior:contain;padding-right:2px}
.cs-cat-item{display:flex;flex-direction:column;gap:4px;padding:8px;border-radius:12px;background:#FAF5F3;min-width:0}
.cs-cat-item img{width:100%;height:96px;max-width:100%;object-fit:contain;border-radius:8px;background:#FFFFFF}
.cs-cat-name{font-size:12.5px;font-weight:700;line-height:1.25;overflow-wrap:anywhere}
.cs-cat-price{font-size:12.5px;font-weight:700;color:var(--rose);font-variant-numeric:tabular-nums}
.cs-cat-more{align-self:center;min-height:38px;padding:0 16px;border-radius:999px;border:1.5px solid var(--coral);background:#FFFFFF;color:var(--rose);font:700 13px/1 var(--body);cursor:pointer}
.cs-cat-item[hidden]{display:none}
.cs-join,.cs-quiz{align-self:stretch;display:flex;flex-direction:column;gap:10px;padding:14px;border-radius:16px;background:linear-gradient(160deg,#FFF1EF,#F6E3E1)}
.cs-join b,.cs-quiz b{font-family:var(--display);font-weight:400;font-size:21px;line-height:1.1}
.cs-kits{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;scroll-snap-type:x mandatory}
.cs-kit{flex:0 0 112px;scroll-snap-align:start;background:#FFFFFF;border-radius:12px;padding:8px;font-size:12px;line-height:1.25}
.cs-kit img{width:100%;height:76px;object-fit:contain;display:block;margin-bottom:6px}
.cs-kit span{display:block;font-weight:700;color:var(--rose);margin-top:2px}
.cs-cta{position:relative;overflow:hidden;isolation:isolate;text-shadow:0 1px 1px rgba(110,15,30,.35);min-height:46px;display:flex;align-items:center;justify-content:center;border-radius:999px;color:#FFFFFF;font-weight:700;font-size:14px;letter-spacing:.4px;
  background:linear-gradient(180deg,#FFA4A6 0%,#EE6E73 45%,#D44E58 80%,#B83A45 100%)}
.cs-income{align-self:stretch;padding:10px 12px;border-radius:12px;border:1px solid var(--line);font-size:11.5px;line-height:1.45;color:var(--mute)}
.cs-income a{color:var(--rose);text-decoration:underline;overflow-wrap:anywhere}
.cs-lead{align-self:stretch;padding:10px 12px;border-radius:12px;background:#EEF7F0;color:#1F5130;font-size:13px;font-weight:700}

.cs-form{flex:none;display:flex;gap:8px;align-items:flex-end;padding:10px 12px 12px;border-top:1px solid var(--line);background:#FFFFFF}
.cs-form label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.cs-in{flex:1;min-width:0;min-height:46px;max-height:120px;resize:none;padding:12px 14px;border-radius:22px;border:1.5px solid var(--line);font:16px/1.35 var(--body);color:var(--ink);background:#FFFFFF}
.cs-in:focus{outline:none;border-color:var(--coral)}
.cs-send{width:46px;height:46px;border-radius:50%;border:0;flex:none;cursor:pointer;display:grid;place-items:center;background:var(--ink)}
.cs-send svg{width:20px;height:20px;fill:none;stroke:#FFFFFF;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cs-send:disabled{opacity:.4}
.cs-foot{flex:none;text-align:center;font-size:11px;color:var(--mute);padding:0 16px 8px;background:#FFFFFF}

/* Leave room at the bottom of the card so the button never covers the last link */
body.has-coral .inside{padding-bottom:80px}
html.coral-open,html.coral-open body{overflow:hidden}

@media (prefers-reduced-motion:reduce){
  .coral-sheet,.coral-scrim,.coral-fab{transition:none}
  .coral-fab::after,.cs-cta::after{animation:none}
  .cs-typing i{animation:none;opacity:.6}
}
