/* The trip chat. */
.chat { display: flex; flex-direction: column; height: calc(100dvh - 230px); min-height: 360px; }
.ch-status:empty { display: none; }
.ch-off { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; padding: 6px 10px; border-radius: 999px; background: color-mix(in srgb, var(--sun) 18%, var(--surface)); font-size: .8rem; color: var(--muted); }
.ch-list { flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 4px 2px 12px; overscroll-behavior: contain; }
.ch-more { align-self: center; margin-bottom: 10px; }
.ch-filter { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-size: .86rem; }
.ch-filter .icon { color: var(--accent); }
.ch-filter span { flex: 1 1 auto; }
.ch-day { align-self: center; margin: 14px 0 8px; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); font-size: .76rem; font-weight: 600; color: var(--muted); }
.ch-empty { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); text-align: center; }
.ch-empty .icon { width: 36px; height: 36px; color: var(--faint); }
.ch-error { color: var(--bad); font-size: .86rem; text-align: center; }
.ch-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 86%; }
.ch-msg.first { margin-top: 10px; }
.ch-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.ch-face { flex: none; width: 28px; }
.ch-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; position: relative; }
.ch-msg.mine .ch-body { align-items: flex-end; }
.ch-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-size: .8rem; color: var(--muted); }
.ch-head strong { color: var(--ink); }
.ch-some { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--coral) 14%, var(--surface)); color: var(--coral); font-size: .74rem; font-weight: 600; }
.ch-some .icon { width: 12px; height: 12px; }
.ch-quote { display: flex; flex-direction: column; gap: 1px; max-width: 100%; padding: 6px 10px; border: 0; border-left: 3px solid var(--accent); border-radius: 8px; background: color-mix(in srgb, var(--surface-2) 60%, transparent); color: var(--muted); font: inherit; font-size: .8rem; text-align: left; cursor: pointer; }
.ch-quote strong { color: var(--ink); }
.ch-quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-stop { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 600; color: var(--accent); }
.ch-stop .icon { width: 13px; height: 13px; }
.ch-bubble { padding: 9px 13px; border-radius: 16px 16px 16px 4px; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ch-msg.mine .ch-bubble { border-radius: 16px 16px 4px 16px; background: var(--accent); color: var(--accent-ink); }
.ch-msg.mine .ch-bubble a { color: inherit; }
.ch-msg.gone .ch-bubble { color: var(--muted); background: transparent; border: 1px dashed var(--line); box-shadow: none; }
.ch-link { display: flex; flex-direction: column; margin-top: 8px; border-radius: 12px; overflow: hidden; background: var(--surface); color: var(--ink); text-decoration: none; border: 1px solid var(--line); }
.ch-link img { display: block; width: 100%; max-height: 180px; object-fit: cover; }
.ch-link-text { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; font-size: .84rem; }
.ch-link-text span { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ch-link-text small { color: var(--faint); font-size: .74rem; }
.ch-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -2px; }
.ch-react { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: .84rem; cursor: pointer; }
.ch-react.on { border-color: var(--accent); background: var(--accent-soft); }
.ch-react small { font-size: .74rem; color: var(--muted); }
.ch-tools { display: flex; gap: 12px; }
.ch-tools .link-btn { font-size: .76rem; color: var(--muted); opacity: 0; transition: opacity .15s; }
.ch-msg:hover .ch-tools .link-btn, .ch-msg:focus-within .ch-tools .link-btn { opacity: 1; }
@media (hover: none) { .ch-tools .link-btn { opacity: 1; } }
.ch-react-menu { position: absolute; bottom: 100%; left: 0; z-index: 3; display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface); box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.ch-msg.mine .ch-react-menu { left: auto; right: 0; }
.ch-react-menu button { border: 0; background: none; font-size: 1.3rem; padding: 4px 6px; border-radius: 999px; cursor: pointer; }
.ch-react-menu button:hover { background: var(--surface-2); }
.ch-flash .ch-bubble { outline: 2px solid var(--sun); }
.ch-edited { display: block; margin-top: 2px; font-size: .72rem; opacity: .7; }
.ch-editor { display: flex; flex-direction: column; gap: 6px; min-width: min(320px, 70vw); }
.ch-editor-actions { display: flex; justify-content: flex-end; gap: 6px; }
.ch-compose { display: flex; flex-direction: column; gap: 6px; padding: 8px 0 0; border-top: 1px solid var(--line); }
.ch-replying { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); }
.ch-replying span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-replying strong { color: var(--ink); }
.ch-to { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-to .chip.some { border-color: var(--coral); color: var(--coral); }
.ch-row { display: flex; align-items: flex-end; gap: 8px; }
.ch-input { flex: 1 1 auto; min-height: 42px; max-height: 140px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; line-height: 1.4; resize: none; }
.ch-send { flex: none; }
.ch-select { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; }
.tabs .badge, .bottomnav .badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--coral); color: #fff; font-size: .7rem; font-weight: 700; }
.trip-card .badge { position: absolute; top: 14px; right: 14px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--coral); color: #fff; font-size: .78rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.discuss { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; margin-top: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--accent); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.discuss:hover { background: var(--accent-soft); }
