/* ScoutTract Party chat (party-chat.js). navy #1F2A44, copper #B87333 */
.ch-badge{position:absolute;top:-4px;right:-4px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#B87333;color:#fff;font:700 11px/18px system-ui,-apple-system,Segoe UI,Roboto,sans-serif;text-align:center;box-shadow:0 0 0 2px #fff;pointer-events:none;z-index:2}
.ch-badge[hidden]{display:none}
.stw-mb[data-pt],#stMoreParty,#ptClipsBtn,.ch-panel-btn{position:relative}
.ch-panel-btn{width:100%;margin:6px 0 10px;font-weight:600}
.ch-sheet{position:fixed;z-index:1100;right:16px;bottom:16px;width:min(440px,calc(100vw - 32px));height:min(640px,calc(100dvh - 32px));display:flex;flex-direction:column;background:rgba(246,247,249,0.96);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,0.5);border-radius:16px;box-shadow:0 12px 48px rgba(15,23,42,.35);overflow:hidden;font:15px system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:#1F2A44;transition:height 0.22s cubic-bezier(0.1,0.9,0.2,1),max-height 0.22s ease}
.ch-drag-handle{width:100%;height:22px;display:flex;align-items:center;justify-content:center;cursor:ns-resize;touch-action:none;background:#1F2A44;border-bottom:1px solid rgba(255,255,255,0.08);flex:none}
.ch-drag-pill{width:38px;height:4px;border-radius:2px;background:rgba(255,255,255,0.45);transition:background 0.15s ease}
.ch-drag-handle:active .ch-drag-pill,.ch-drag-handle:hover .ch-drag-pill{background:#B87333}
.ch-mini-bar{display:none;align-items:center;gap:8px;padding:8px 12px;background:#1F2A44;color:#fff;cursor:pointer;height:50px;box-sizing:border-box}
.ch-sheet.ch-mini .ch-mini-bar{display:flex}
.ch-sheet.ch-mini .ch-head,.ch-sheet.ch-mini .ch-feed,.ch-sheet.ch-mini .ch-pins,.ch-sheet.ch-mini .ch-quick,.ch-sheet.ch-mini .ch-comp,.ch-sheet.ch-mini .ch-count{display:none !important}
.ch-mini-txt{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13.5px}
.ch-mini-expand{font-size:16px;opacity:.8}
.ch-sheet[hidden]{display:none}
.ch-head{display:flex;align-items:center;gap:6px;padding:10px 10px 10px 14px;background:#1F2A44;color:#fff;flex:none}
.ch-head b{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:16px}
.ch-ic{flex:none;width:38px;height:38px;border:0;border-radius:50%;background:transparent;font-size:18px;cursor:pointer;color:inherit;padding:0}
.ch-head .ch-ic{background:rgba(255,255,255,.12);color:#fff}
.ch-feed{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:10px 10px 4px;-webkit-overflow-scrolling:touch}
.ch-day{text-align:center;font-size:12px;color:#6b7280;margin:10px 0 6px}
.ch-empty{text-align:center;color:#6b7280;margin-top:40px}
.ch-row{display:flex;flex-direction:column;align-items:flex-start;margin:4px 0}
.ch-row.me{align-items:flex-end}
.ch-bub{position:relative;max-width:82%;padding:7px 10px 6px;border-radius:14px 14px 14px 4px;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.12);overflow-wrap:anywhere;word-break:break-word}
.ch-row.me .ch-bub{background:#1F2A44;color:#fff;border-radius:14px 14px 4px 14px}
.ch-who{font-size:12px;font-weight:700;margin-bottom:2px}
.ch-text{white-space:normal;line-height:1.35}
.ch-time{display:inline-block;margin-left:8px;font-size:11px;opacity:.65;white-space:nowrap}
.ch-st{font-size:11px;color:#6b7280;margin:2px 4px 0}
.ch-st.fail{color:#b42318}
.ch-del{border:0;background:transparent;font-size:12px;opacity:.55;margin-left:4px;cursor:pointer;padding:0 2px}
.ch-del:hover{opacity:1}
.ch-card{display:flex;flex-direction:column;gap:2px;margin:2px 0}
.ch-card small{opacity:.8;font-size:12px}
.ch-link{border:0;background:transparent;color:#B87333;font-weight:600;padding:2px 0;cursor:pointer;font-size:13px;text-decoration:none;margin-right:10px}
.ch-row.me .ch-link{color:#f2c9a1}
.ch-play{width:30px;height:30px;border-radius:50%;border:0;background:#B87333;color:#fff;cursor:pointer;margin-right:4px}
.ch-sys{text-align:center;font-size:13px;color:#4b5563;margin:8px 12px}
.ch-sos{color:#b42318;background:#fdecea;border-radius:10px;padding:6px 8px}
.ch-sos .ch-link{color:#b42318}
.ch-pins{flex:none;max-height:40%;overflow-y:auto;background:#fff;border-top:1px solid #e5e7eb;padding:6px 10px;display:flex;flex-direction:column;gap:4px}
.ch-pins[hidden]{display:none}
.ch-pins button{text-align:left;border:1px solid #e5e7eb;border-radius:10px;background:#fff;padding:8px;font-size:14px;cursor:pointer}
.ch-pins small{color:#6b7280;margin-left:6px}
.ch-quick{flex:none;display:flex;gap:6px;overflow-x:auto;padding:6px 10px;scrollbar-width:none}
.ch-quick::-webkit-scrollbar{display:none}
.ch-quick button{flex:none;border:1px solid #B87333;color:#8a5426;background:#fff;border-radius:16px;padding:6px 12px;font-size:13px;cursor:pointer;white-space:nowrap}
.ch-quick .ch-to{position:sticky;left:0;z-index:1;border-color:#1F2A44;color:#1F2A44;font-weight:600;box-shadow:4px 0 6px #f6f7f9}
.ch-quick .ch-to.priv{border:2px solid #B87333;background:#fbf4ee;color:#8a5426}
.ch-priv{font-size:11.5px;font-weight:700;color:#B87333;margin-bottom:2px}
.ch-row.me .ch-priv{color:#f3c79c}
.ch-row.priv .ch-bub{box-shadow:inset 0 0 0 2px #B87333}
.ch-comp.priv textarea{border-color:#B87333}
.ch-rec.priv{background:#fbf4ee}
.ch-sheet .pt-tomenu{position:absolute;left:10px;right:10px;bottom:118px;z-index:5}
.ch-comp{flex:none;display:flex;align-items:flex-end;gap:4px;padding:6px 8px calc(8px + env(safe-area-inset-bottom,0px));background:#fff;border-top:1px solid #e5e7eb;margin:0}
.ch-comp .ch-ic{background:#f1f2f4}
.ch-comp textarea{flex:1;min-width:0;resize:none;border:1px solid #d1d5db;border-radius:18px;padding:8px 12px;font:16px/1.3 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;max-height:110px;background:#fff;color:#1F2A44}
.ch-send{flex:none;width:40px;height:40px;border:0;border-radius:50%;background:#B87333;color:#fff;font-size:18px;cursor:pointer}
.ch-count{flex:none;text-align:right;font-size:11px;color:#6b7280;padding:0 12px 4px;background:#fff}
.ch-count[hidden],.ch-say[hidden]{display:none}
.ch-say{flex:none;margin:0 10px 4px;padding:6px 10px;border-radius:10px;background:#1F2A44;color:#fff;font-size:13px}
.ch-flash{font-size:28px;cursor:pointer;filter:drop-shadow(0 2px 3px rgba(0,0,0,.45))}
@media (max-width:640px){
  .ch-sheet{left:0;right:0;bottom:0;top:auto;width:100vw;border-radius:20px 20px 0 0;box-shadow:0 -8px 32px rgba(15,23,42,.32);max-height:94dvh}
  .ch-sheet.ch-half{height:48dvh}
  .ch-sheet.ch-full{height:94dvh}
  .ch-sheet.ch-mini{height:50px;overflow:hidden}
}
@media (max-width:900px) and (orientation:landscape){
  .ch-sheet{right:10px;bottom:0;top:auto;width:min(420px,65vw);border-radius:16px 16px 0 0}
  .ch-sheet.ch-half{height:68dvh}
  .ch-sheet.ch-full{height:92dvh}
}
/* hold-to-talk mic in the composer (shown while the text field is empty) + recording bar */
.ch-mic{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.ch-mic.busy{background:#8a6a4a}
.ch-mic.rec{background:#b42318;transform:scale(1.18);box-shadow:0 0 0 6px rgba(180,35,24,.18)}
.ch-send[hidden],.ch-rec[hidden],.ch-rec-cx[hidden]{display:none}
.ch-rec{flex:1;min-width:0;display:flex;align-items:center;gap:8px;height:40px;padding:0 12px;border-radius:18px;background:#fdf0ee;color:#1F2A44;font:15px system-ui,-apple-system,Segoe UI,Roboto,sans-serif;overflow:hidden;white-space:nowrap}
.ch-rec b{font-variant-numeric:tabular-nums}
.ch-rec-dot{width:10px;height:10px;border-radius:50%;background:#b42318;animation:chRecBlink 1s infinite}
.ch-rec-cx{margin-left:auto;color:#6b7280;font-size:13px}
.ch-comp.recording textarea,.ch-comp.recording #chLoc,.ch-comp.recording #chPin{display:none}
@keyframes chRecBlink{50%{opacity:.25}}
