/* Courier partner app — support chat on a dark iPhone. Built at 390×844 and scaled with --ps. */
.cp-frame{position:relative;width:calc(390px * var(--ps,1));height:calc(844px * var(--ps,1))}
.cp{--ink:#f2f2f4;--dim:#8e8e93;--line:#2a2a2d;--wolt:#1aa3e8;--bub:#26272a;
  position:absolute;left:0;top:0;width:390px;height:844px;transform:scale(var(--ps,1));transform-origin:0 0;
  box-sizing:border-box;border-radius:58px;overflow:hidden;background:#0b0b0c;color:var(--ink);
  display:flex;flex-direction:column;
  box-shadow:0 0 0 10px #050505,0 0 0 11.5px #3a3a3e,0 40px 90px rgba(0,0,0,.75),0 10px 30px rgba(0,0,0,.6);
  font:400 17px/1.3 -apple-system,BlinkMacSystemFont,"SF Pro Text",Inter,sans-serif;letter-spacing:-.02em;text-align:left}
.cp svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* status bar */
.cp-status{position:relative;flex:none;height:54px;display:flex;align-items:center;justify-content:space-between;padding:6px 34px 0 50px;font-size:17px}
.cp-status b{font-weight:600}
.cp-island{position:absolute;left:50%;top:11px;width:124px;height:36px;margin-left:-62px;border-radius:20px;background:#000}
.cp-sig{display:flex;align-items:center;gap:6px}
.cp-sig svg{width:18px;height:18px;fill:currentColor;stroke:none}
.cp-bat{position:relative;width:25px;height:12px;border-radius:4px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.4);padding:2px;box-sizing:border-box;margin-left:2px}
.cp-bat i{display:block;width:72%;height:100%;border-radius:2px;background:#fff}
.cp-bat::after{content:"";position:absolute;right:-3.5px;top:4px;width:1.5px;height:4px;border-radius:0 1px 1px 0;background:rgba(255,255,255,.4)}

/* header: back, agent name, close */
.cp-head{flex:none;display:flex;align-items:center;gap:12px;padding:6px 16px 10px}
.cp-ic{width:38px;height:38px;border-radius:50%;background:#1e1f22;display:grid;place-items:center;color:var(--ink)}
.cp-who{flex:1;display:flex;align-items:center;justify-content:center;gap:9px;min-width:0}
.cp-who b{display:block;font-size:17px;font-weight:600}
.cp-av{flex:none;width:28px;height:28px;border-radius:50%;background:#2a2b2f center/cover no-repeat}
.cp-av.ghost{visibility:hidden}

/* thread */
.cp-thread{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:flex-end;gap:5px;padding:10px 14px;overflow:hidden;-webkit-mask-image:linear-gradient(transparent,#000 28px);mask-image:linear-gradient(transparent,#000 28px)}
.cp-day{align-self:center;font-size:12px;font-weight:600;color:var(--dim);margin-bottom:2px}
.cp-sys{align-self:center;font-size:12px;color:var(--dim);text-align:center;max-width:260px;margin-bottom:8px}
.cp-msg,.cp-typing{flex:none;display:flex;align-items:flex-end;gap:7px;max-width:80%}
.cp-msg.me{align-self:flex-end}
.cp-msg > div{display:flex;flex-direction:column;align-items:flex-start;min-width:0}
.cp-msg.me > div{align-items:flex-end}
.cp-b{padding:8px 13px;border-radius:19px;background:var(--bub);line-height:1.28}
.cp-msg.me .cp-b{background:var(--wolt);color:#fff}
.cp-emoji{font-size:40px;line-height:1.05}
.cp-meta{font-size:11px;color:var(--dim);margin:3px 4px 0;font-weight:500}
.cp-typing[hidden]{display:none}
.cp-typing .cp-b{display:flex;gap:4px;padding:13px 14px}
.cp-typing .cp-b i{width:7px;height:7px;border-radius:50%;background:#8e8e93;animation:cp-dot 1.1s ease-in-out infinite}
.cp-typing .cp-b i:nth-child(2){animation-delay:.15s}.cp-typing .cp-b i:nth-child(3){animation-delay:.3s}
@keyframes cp-dot{0%,60%,100%{transform:none;opacity:.5}30%{transform:translateY(-4px);opacity:1}}

/* composer */
.cp-compose{flex:none;display:flex;align-items:center;gap:8px;padding:8px 12px 10px}
.cp-plus{width:34px;height:34px;border-radius:50%;background:#1e1f22;display:grid;place-items:center;color:var(--dim)}
.cp-input{flex:1;min-width:0;height:36px;box-sizing:border-box;padding:0 14px;border-radius:18px;box-shadow:inset 0 0 0 1px #34353a;display:flex;align-items:center;white-space:nowrap;overflow:hidden}
.cp-input .ph{color:#5f6066}
.cp-input.typing .ph{display:none}
.cp-input.typing .txt::after{content:"";display:inline-block;width:2px;height:20px;margin-left:1px;vertical-align:-4px;border-radius:1px;background:var(--wolt);animation:cp-caret 1s steps(1) infinite}
@keyframes cp-caret{50%{opacity:0}}
.cp-send{width:34px;height:34px;border-radius:50%;background:#2a2b2f;color:#6b6c72;display:grid;place-items:center;transition:background .2s,color .2s}
.cp-send.on{background:var(--wolt);color:#fff}
.cp-send svg{stroke-width:2.6}

/* keyboard (iOS dark) */
.cp-kb{flex:none;background:#2b2b2e;padding:8px 3px 0;display:flex;flex-direction:column;gap:11px}
.cp-kr{display:flex;justify-content:center;gap:6px;padding:0 3px}
.cp-kr:nth-child(2){padding:0 21px}
.cp-k{flex:1;max-width:34px;height:42px;border-radius:5px;background:#6b6b6f;color:#fff;display:grid;place-items:center;font-size:22px;font-weight:400;box-shadow:0 1px 0 rgba(0,0,0,.45);transition:background .12s}
.cp-k.down{background:#9a9aa0;transition:none}
.cp-k.sp{background:#46464a;flex:none}
.cp-k.sh,.cp-k.bk{width:44px;max-width:none;margin:0 6px}
.cp-k.sh{margin-left:0}.cp-k.bk{margin-right:0}
.cp-k.sh svg{fill:#fff;stroke:none;width:20px}
.cp-k.bk svg{width:24px;stroke-width:1.7}
.cp-k.n{width:44px;max-width:none;font-size:16px}
.cp-k.n svg{width:24px;stroke-width:1.7}
.cp-k.space{max-width:none;flex:1;font-size:16px}
.cp-k.space.down{background:#9a9aa0}
.cp-k.ret{width:92px;max-width:none;font-size:16px}
.cp-home{height:34px;position:relative}
.cp-home::after{content:"";position:absolute;left:50%;bottom:8px;width:140px;height:5px;margin-left:-70px;border-radius:3px;background:#fff}
@media (prefers-reduced-motion:reduce){.cp-typing .cp-b i,.cp-input.typing .txt::after{animation:none}}

/* light theme (reference: courier app support chat) — set data-theme="light" on .cp-frame */
.cp-frame[data-theme="light"] .cp{--ink:#111;--dim:#8a8a8e;--line:#e5e5ea;--bub:#f0f0f2;background:#fff;
  box-shadow:0 0 0 1.5px #d4d4d8,0 0 0 9px #f4f4f5,0 0 0 10.5px #c9c9ce,0 40px 90px rgba(0,0,0,.55),0 10px 30px rgba(0,0,0,.35)}
.cp-frame[data-theme="light"] .cp-island{background:#000}
.cp-frame[data-theme="light"] .cp-bat{box-shadow:inset 0 0 0 1px rgba(0,0,0,.35)}
.cp-frame[data-theme="light"] .cp-bat i{background:#111}
.cp-frame[data-theme="light"] .cp-bat::after{background:rgba(0,0,0,.35)}
.cp-frame[data-theme="light"] :is(.cp-ic,.cp-plus){background:#f0f0f2}
.cp-frame[data-theme="light"] .cp-input{background:#f0f0f2;box-shadow:none}
.cp-frame[data-theme="light"] .cp-input .ph{color:#9a9aa0}
.cp-frame[data-theme="light"] .cp-send{background:#e5e5ea;color:#a1a1a6}
.cp-frame[data-theme="light"] .cp-send.on{background:var(--wolt);color:#fff}
.cp-frame[data-theme="light"] .cp-typing .cp-b i{background:#a1a1a6}
.cp-frame[data-theme="light"] .cp-kb{background:#d1d3d9}
.cp-frame[data-theme="light"] .cp-k{background:#fff;color:#000;box-shadow:0 1px 0 rgba(0,0,0,.3)}
.cp-frame[data-theme="light"] .cp-k.down{background:#b5b8c0}
.cp-frame[data-theme="light"] .cp-k.sp{background:#abb0ba}
.cp-frame[data-theme="light"] .cp-k.space{background:#fff}
.cp-frame[data-theme="light"] .cp-k.space.down{background:#b5b8c0}
.cp-frame[data-theme="light"] .cp-k.sh svg{fill:#000}
.cp-frame[data-theme="light"] .cp-home::after{background:#000}

/* feature close-ups (data-feature): photos to send, support typing, rating the conversation */
.cp[data-feature="images"] .cp-kb > :not(.cp-home),.cp[data-feature="csat"] .cp-kb > :not(.cp-home){display:none}
.cp[data-feature="images"] .cp-kb,.cp[data-feature="csat"] .cp-kb{background:none;padding:0}
.cp[data-feature="csat"] .cp-compose{display:none}
.cp-att{flex:none;display:flex;gap:8px;padding:10px 0 4px 14px;overflow:hidden;border-top:1px solid var(--line)}
.cp-att i{position:relative;flex:none;width:128px;height:128px;border-radius:14px;background:#26272a center/cover no-repeat}
.cp-att span{position:absolute;right:7px;top:7px;width:24px;height:24px;border-radius:50%;background:rgba(0,0,0,.55);display:grid;place-items:center;color:#fff}
.cp-att span svg{width:14px;height:14px;stroke-width:2.4}
.cp-closed{flex:none;align-self:center;margin:14px 0 4px;font-size:13px;color:var(--dim)}
.cp-rate{flex:none;padding:16px 6px 18px}
.cp-rate b{display:block;font-size:20px;font-weight:700;letter-spacing:-.02em;line-height:1.2}
.cp-faces{display:flex;justify-content:space-between;align-items:center;margin-top:18px;min-height:56px}
.cp-faces span{font-size:46px;line-height:1;transition:transform .25s cubic-bezier(.3,1.4,.5,1)}
.cp-faces span.tap{transform:scale(1.25)}
.cp-rate.done .cp-faces{justify-content:flex-start;gap:14px}
.cp-rate.done .cp-faces span{font-size:30px;animation:cp-pop .45s cubic-bezier(.3,1.4,.5,1)}
.cp-faces em{font-style:normal;font-size:17px;color:var(--dim)}
.cp-faces em.l{color:var(--ink);font-weight:600}
@keyframes cp-pop{from{transform:scale(.4)}to{transform:none}}
