@layer rental-features {
  .tc-shell .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .tc-dock { position: fixed; right: 22px; bottom: 22px; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: calc(100vw - 24px); }
  .tc-launcher { position: relative; }
  .tc-launcher.nav > .tc-count { margin-left: auto; }
  .tc-launcher.mobile-bottom-nav-item > .tc-count { position: absolute; top: 0; right: 8px; }
  .tc-launcher.btn { display: inline-flex; align-items: center; gap: 8px; min-height: var(--ui-control-touch-height); }
  .tc-launcher.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
  #tcNotice { max-width: min(330px, calc(100vw - 24px)); }
  .tc-dialog { width: min(860px, calc(100vw - 32px)); height: min(760px, calc(100dvh - 36px)); max-width: none; max-height: none; padding: 0; overflow: hidden; }
  .tc-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; min-height: 0; }
  .tc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; }
  .tc-head h2, .tc-peer-head h3 { margin: 0; }
  .tc-head p, .tc-peer-head p { margin: 4px 0 0; }
  .tc-head-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
  .tc-main { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 0; }
  .tc-people { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
  .tc-contact-search { padding: 12px; }
  .tc-contact-search .input { width: 100%; }
  .tc-contact-list { overflow-y: auto; padding: 0 8px 8px; }
  .tc-contact { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 8px; margin-bottom: 4px; }
  .tc-contact-copy { min-width: 0; flex: 1; display: grid; gap: 5px; }
  .tc-contact-copy :is(strong,small) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tc-avatar { width: 36px; height: 36px; display: grid; place-items: center; flex-shrink: 0; }
  .tc-count { flex-shrink: 0; min-width: 20px; padding: 2px 5px; text-align: center; }
  .tc-conversation { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; min-width: 0; }
  .tc-peer-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; min-width: 0; }
  .tc-peer-head > div { min-width: 0; overflow-wrap: anywhere; }
  #tcBack { display: none; }
  .tc-placeholder { grid-row: 2 / 4; align-self: center; justify-self: center; text-align: center; padding: 24px; }
  .tc-placeholder-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 8px; }
  .tc-placeholder p { line-height: 1.8; margin-top: 8px; }
  .tc-message-area { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
  .tc-history-actions { display: flex; justify-content: center; gap: 8px; }
  .tc-messages { overflow: auto; min-height: 0; padding: 12px 16px; overscroll-behavior: contain; }
  .tc-message { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 16px; gap: 5px; }
  .tc-message.is-mine { align-items: flex-end; }
  .tc-message-meta { display: flex; flex-wrap: wrap; gap: 8px; }
  .tc-bubble { max-width: 88%; min-width: 0; padding: 10px 12px; overflow-wrap: anywhere; }
  .tc-bubble > p { margin: 0; white-space: pre-wrap; }
  .tc-order-card { display: grid; gap: 5px; padding: 12px; text-align: left; min-width: 0; width: 100%; }
  .tc-bubble:has(.tc-order-card) { min-width: min(250px, 100%); }
  .tc-bubble > p + .tc-order-card { margin-top: 10px; }
  .tc-order-card :is(strong,span,small) { white-space: normal; overflow-wrap: anywhere; }
  .tc-composer { padding: 10px 14px 12px; min-width: 0; }
  .tc-composer > textarea { width: 100%; resize: vertical; min-height: 70px; max-height: 140px; }
  .tc-compose-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
  .tc-compose-actions > span { margin-left: auto; }
  .tc-compose-actions > button:last-child { margin-left: auto; }
  .tc-attachment, .tc-pending { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; margin-bottom: 8px; }
  .tc-attachment > span { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
  .tc-attachment > button { flex-shrink: 0; }
  .tc-pending { flex-wrap: wrap; }
  .tc-status { margin: 0; padding: 8px 14px; overflow-wrap: anywhere; }
  .tc-order-picker { position: absolute; inset: 8px; z-index: 2; display: grid; grid-template-rows: auto auto auto minmax(96px, 1fr) auto; padding: 12px; gap: 10px; overflow: auto; min-width: 0; }
  .tc-order-picker > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .tc-picker-head-actions { display: flex; align-items: center; gap: 8px; }
  .tc-picker-filters { display: grid; gap: 8px; min-width: 0; }
  .tc-picker-filter-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tc-picker-filter-row label { display: grid; gap: 4px; min-width: 0; }
  .tc-picker-filters .input { width: 100%; min-width: 0; max-width: 100%; }
  .tc-pick-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; }
  .tc-order-results { overflow: auto; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
  .tc-order-results > button { width: 100%; flex-shrink: 0; }
  .tc-pick-copy { display: grid; gap: 4px; min-width: 0; width: 100%; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  .tc-empty { padding: 20px 10px; line-height: 1.7; text-align: center; }
  @media (max-width: 720px) {
    .tc-dock { right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); }
    .tc-dialog { width: 100%; height: 100dvh; margin: 0; }
    .tc-head { padding: max(10px, env(safe-area-inset-top)) 10px 10px; }
    .tc-head h2 { font-size: 18px; }
    .tc-head p { display: none; }
    .tc-head-actions { gap: 4px; }
    .tc-main { grid-template-columns: minmax(0, 1fr); }
    .tc-people { min-height: 0; }
    .tc-dialog[data-has-peer="false"] .tc-conversation { display: none; }
    .tc-dialog[data-has-peer="true"] .tc-people { display: none; }
    #tcBack { display: inline-flex; flex-shrink: 0; }
    .tc-peer-head { padding: 8px 10px; }
    .tc-messages { padding: 10px; }
    .tc-bubble { max-width: 92%; }
    .tc-composer { padding: 8px 10px; }
    .tc-keyboard-hint { display: none; }
    .tc-status { padding: 6px 10px max(6px, env(safe-area-inset-bottom)); }
    .tc-contact { min-height: 64px; }
    .tc-order-card { min-height: 80px; }
  }
}
