/* Heritage conversation surface. Metadata never shares booking's .time selector. */
.app-shell .chat-screen{background:#FAFAFC}
.app-shell .chat-head{flex:0 0 auto;padding:12px 16px;gap:10px;background:#fff;backdrop-filter:none;border-bottom:1px solid var(--line)}
.app-shell .chat-head .who{text-align:left}
.app-shell .chat-head .who b{font-size:15px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-shell .chat-head .who>span{font-size:11px;line-height:1.5;color:var(--ui-secondary);font-weight:600}
.app-shell .chat-head .who>span.live{color:var(--crimson)}
.app-shell .chat-head .who>span.live::before{content:'';display:inline-block;width:5px;height:5px;background:currentColor;border-radius:50%;margin-right:5px;vertical-align:2px}
.app-shell .chat-head .icon-btn{width:44px;height:44px;min-width:44px;background:var(--blush);color:var(--crimson);font-size:20px}
.app-shell .chat-head .icon-btn:disabled{background:var(--fill);color:var(--ui-secondary);opacity:.6;box-shadow:none;background-image:none}
.app-shell .chat-head .avatar{width:40px;height:40px;flex-shrink:0}
.app-shell .chat-body{padding:16px 16px 20px;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:#D3D3DC transparent}
.app-shell .chat-guidance{display:flex;align-items:flex-start;gap:8px;color:var(--ui-secondary);font-size:11px;line-height:1.65;margin-bottom:20px}
.app-shell .chat-guidance>iconify-icon{font-size:16px;margin-top:2px}
.app-shell .chat-day{display:flex;align-items:center;gap:12px;margin:22px 0 16px;color:var(--ui-secondary);font-size:10px;font-weight:700;text-align:center}
.app-shell .chat-day::before,.app-shell .chat-day::after{content:'';height:1px;flex:1;background:var(--line)}
.app-shell #message-list{display:flow-root}
.app-shell .chat-body .msg{width:fit-content;max-width:85%;padding:11px 14px 8px;margin:0 0 10px;border-radius:16px;box-shadow:none;font-size:14px;line-height:1.6;min-width:64px}
.app-shell .chat-body .msg.in{margin-left:0;margin-right:auto;background:var(--fill);color:var(--ink);border-bottom-left-radius:5px}
.app-shell .chat-body .msg.out{margin-left:auto;margin-right:0;background:var(--crimson);color:#fff;border-bottom-right-radius:5px}
.app-shell .msg-text{white-space:pre-wrap;overflow-wrap:anywhere;margin:0}
.app-shell .msg-meta{display:flex;gap:6px;align-items:center;justify-content:flex-end;margin-top:5px;font-size:10px;line-height:1.5;font-variant-numeric:tabular-nums;color:var(--ui-secondary)}
.app-shell .msg.out .msg-meta{color:#fff;opacity:.85}
.app-shell .msg-meta time{font:inherit;border:0;padding:0;border-radius:0;background:transparent}
.app-shell .msg-sent{display:inline-flex;gap:4px;align-items:center}
.app-shell .chat-screen>.quick{flex:0 0 auto;padding:10px 16px;background:#fff;border-top:1px solid var(--line);gap:8px}
.app-shell .quick .chip{min-height:36px;font-size:11px;padding:7px 12px;color:var(--crimson);background:var(--blush);border:0;flex-shrink:0}
.app-shell .chat-screen>.chat-input{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:10px;align-items:end;flex:0 0 auto;padding:10px 16px max(16px,env(safe-area-inset-bottom));border-top:0;background:#fff}
.app-shell .chat-input .form-error{grid-column:1/-1;margin:0;font-size:12px;line-height:1.6;color:var(--crimson)}
.app-shell .chat-input .form-error:empty{display:none}
.app-shell .chat-input textarea.chat-compose{display:block;min-width:0;min-height:44px;height:44px;max-height:120px;width:100%;padding:10px 13px;border:1px solid var(--ui-border);border-radius:16px;background:#FAFAFC;font-size:16px;line-height:22px;color:var(--ink);resize:none;overflow-y:auto;margin:0;transition:border-color var(--ui-fast) ease,background-color var(--ui-fast) ease}
.app-shell .chat-input textarea.chat-compose:focus{background:#fff;border-color:var(--crimson)}
.app-shell .chat-input .send{width:44px;height:44px;min-width:44px;border-radius:14px;background:var(--crimson);color:#fff;box-shadow:none;font-size:20px;transition:background-color var(--ui-fast) ease,transform 120ms var(--ui-ease)}
.app-shell .chat-input .send:active:not(:disabled){transform:scale(.96)}
.app-shell .chat-input .send:disabled{background:var(--fill);color:var(--ui-secondary);opacity:1}
.app-shell #load-earlier{display:block;margin:0 auto 12px;color:var(--crimson);background:#fff;border:1px solid var(--line);font-size:11px}
.app-shell #load-earlier[hidden]{display:none}
@media(prefers-reduced-motion:reduce){.app-shell .chat-input .send:active{transform:none}}

.chat-identity > .nav { justify-content: center; }
.chat-identity > .scroll { display: grid; gap: 16px; align-content: start; padding-inline: 16px; }
.chat-identity-card {
  display: grid;
  gap: 9px;
  padding: 17px;
  border: 1px solid #f0dade;
  border-radius: 16px;
  background: #fff6f7;
}
.chat-identity-card h1 { margin: 0; color: var(--ink); font-size: 24px; font-weight: 750; line-height: 1.15; text-wrap: balance; }
.chat-identity-card p { margin: 0; color: var(--ui-secondary); font-size: 14px; line-height: 1.5; }
.chat-identity-status { display: flex; align-items: center; gap: 9px; color: var(--crimson); font-size: 12px; font-weight: 750; }
.chat-identity-status > span, .chat-identity-room-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  color: var(--crimson);
  background: #f8e2e7;
  border-radius: 12px;
  font-size: 20px;
}
.app-shell .chat-identity-cta {
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  border-radius: 10px;
  background: var(--crimson);
  box-shadow: none;
  font-size: 14px;
  text-align: center;
}
.app-shell .chat-identity-cta:hover { background: #741623; color: #fff; }
.chat-identity-note, .chat-identity-history > p {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding-inline: 2px;
  color: var(--ui-secondary);
  font-size: 12px;
  line-height: 1.5;
}
.chat-identity-note > iconify-icon { flex: none; margin-top: 2px; color: var(--crimson); font-size: 15px; }
.chat-identity-history-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; margin-bottom: 5px; }
.chat-identity-history-head h2 { margin: 0; font-size: 16px; font-weight: 750; }
.chat-identity-history-head > span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 5px; color: #563f49; background: #f7eaee; font-size: 11px; }
.chat-identity-room {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 6px 2px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.chat-identity-room:hover { color: var(--crimson); background: #fff6f7; }
.chat-identity-room-icon { width: 32px; height: 32px; border-radius: 50%; font-size: 16px; }
.chat-identity-room strong { display: block; overflow-wrap: anywhere; font-size: 14px; }
.chat-identity-room small { display: block; color: var(--ui-secondary); font-size: 12px; }
.chat-identity-more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--crimson); font-size: 13px; font-weight: 700; }
.app-shell .chat-identity-retry { min-height: 44px; margin-top: 6px; }
