/* pak-64a Pearl Chat Plus (pcx-) — shared by PRSXA and Pearl AI */
/* richer answers */
.bubble.md .pcx-tw{margin:8px 0 12px;overflow:auto;border:1px solid rgba(127,127,127,.22);border-radius:12px;-webkit-overflow-scrolling:touch}
.bubble.md table.pcx-table{border-collapse:separate;border-spacing:0;width:100%;min-width:320px;font-size:.95em;line-height:1.45}
.bubble.md table.pcx-table th,.bubble.md table.pcx-table td{padding:9px 13px;border-bottom:1px solid rgba(127,127,127,.18);text-align:left;vertical-align:top}
.bubble.md table.pcx-table th{font-weight:700;background:rgba(127,127,127,.09);white-space:nowrap;position:sticky;top:0}
.bubble.md table.pcx-table tr:last-child td{border-bottom:0}
.bubble.md table.pcx-table tbody tr:hover td{background:rgba(127,127,127,.05)}
.bubble.md .pcx-quote{margin:8px 0 12px;padding:8px 16px;border-left:3px solid var(--accent,#3161E8);background:rgba(49,97,232,.06);border-radius:0 10px 10px 0;color:inherit}
.bubble.md .pcx-quote p:last-child{margin-bottom:0}
.bubble.md ul ul,.bubble.md ul ol,.bubble.md ol ul,.bubble.md ol ol{margin:4px 0 2px 2px}
.bubble.md li>ul,.bubble.md li>ol{margin-top:4px}
.bubble.md .pcx-task{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin:0 7px 0 -2px;border:1.5px solid rgba(127,127,127,.5);border-radius:5px;vertical-align:-3px;color:#fff}
.bubble.md .pcx-task.is-done{background:#34C759;border-color:#34C759}
.bubble.md li:has(>.pcx-task){list-style:none;margin-left:-18px}
.bubble.md s{opacity:.7}
/* reply actions */
.pcx-fb{display:inline-flex;align-items:center;gap:2px;margin-left:2px}
.pcx-rate.is-on{color:var(--accent,#3161E8);background:rgba(49,97,232,.1)}
.pcx-rate[data-rate="down"].is-on{color:#FF3B30;background:rgba(255,59,48,.1)}
.pcx-menu{position:fixed;z-index:1200;padding:6px;border-radius:14px;background:var(--pxs-panel,#fff);border:1px solid var(--pxs-line,rgba(15,23,42,.12));box-shadow:0 18px 50px rgba(5,10,24,.22)}
.pcx-menu button{display:flex;flex-direction:column;align-items:flex-start;gap:1px;width:100%;border:0;background:none;text-align:left;padding:8px 10px;border-radius:10px;font:inherit;color:var(--pxs-text,var(--app-text,#0f172a));cursor:pointer}
.pcx-menu button b{font-size:13.5px;font-weight:650}.pcx-menu button small{font-size:12px;color:var(--pxs-muted,#64748b)}
.pcx-menu button:hover,.pcx-menu button:focus-visible{background:var(--pxs-hover,rgba(15,23,42,.06));outline:none}
.pcx-why{margin:6px 0 10px;padding:12px 14px;border-radius:14px;border:1px solid var(--pxs-line,rgba(15,23,42,.12));background:var(--pxs-panel,rgba(127,127,127,.06));font-size:13.5px;animation:pcxIn .18s ease-out}
@keyframes pcxIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.pcx-why-t{font-weight:650;margin-bottom:8px}
.pcx-why-r{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.pcx-chip{height:30px;padding:0 12px;border-radius:99px;border:1px solid var(--pxs-line,rgba(15,23,42,.16));background:transparent;color:inherit;font:inherit;font-size:13px;cursor:pointer}
.pcx-chip.is-on{background:var(--accent,#3161E8);border-color:var(--accent,#3161E8);color:#fff}
.pcx-why-n{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.pcx-why-n input{flex:1;min-width:160px;height:36px;padding:0 12px;border-radius:10px;border:1px solid var(--pxs-line,rgba(15,23,42,.16));background:transparent;color:inherit;font:inherit;font-size:13.5px}
.pcx-why-n input:focus{outline:none;border-color:var(--accent,#3161E8);box-shadow:0 0 0 3px rgba(49,97,232,.18)}
.pcx-send{height:36px;padding:0 16px;border-radius:10px;border:0;background:var(--accent,#3161E8);color:#fff;font:inherit;font-size:13.5px;font-weight:650;cursor:pointer}
.pcx-send[disabled]{opacity:.6;cursor:default}
.pcx-skip,.pcx-link{height:36px;padding:0 10px;border:0;background:none;color:var(--pxs-muted,#64748b);font:inherit;font-size:13.5px;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.pcx-link{height:auto;padding:0;color:var(--accent,#3161E8)}
/* offline */
.pcx-net{position:fixed;left:50%;top:12px;transform:translateX(-50%);z-index:1300;display:flex;align-items:center;gap:9px;max-width:calc(100vw - 24px);padding:9px 16px;border-radius:99px;background:#1f2937;color:#fff;font-size:13.5px;font-weight:600;box-shadow:0 10px 30px rgba(0,0,0,.25);animation:pcxIn .2s ease-out}
.pcx-net[hidden]{display:none}
html.pcx-offline #send-btn{opacity:.55}
/* still writing / waiting */
.bubble.pcx-wait{display:flex;align-items:center;gap:10px;color:var(--pxs-muted,#64748b);font-size:14px}
.pcx-dot{flex:none;width:10px;height:10px;border-radius:50%;background:#FF9500;animation:pcxBreath 1.8s ease-in-out infinite}
@keyframes pcxBreath{0%,100%{transform:scale(.78);opacity:.7}50%{transform:scale(1.15);opacity:1}}
@media (prefers-reduced-motion:reduce){.pcx-dot,.pcx-why,.pcx-net{animation:none}}
/* phones */
@media (max-width:640px){
  .pal-acts{flex-wrap:wrap;row-gap:4px}
  .pal-acts .pal-meta{width:100%;padding-top:2px;font-size:11.5px}
  .pcx-again span{display:none}
  .bubble.md .pcx-tw{margin-left:-4px;margin-right:-4px;border-radius:10px}
  .bubble.md table.pcx-table{font-size:.9em}.bubble.md table.pcx-table th,.bubble.md table.pcx-table td{padding:7px 10px}
  .pcx-why-n input{min-width:0;width:100%}
  .pcx-net{top:calc(58px + env(safe-area-inset-top));width:calc(100vw - 24px);justify-content:center;text-align:center;border-radius:14px;font-size:13px;line-height:1.3}
}
