/* The front desk chat (Gerold, 13 November 2026): her launcher at the bottom right and the chat panel.
   The site's own tokens and type; Neon only on the thinking cell. Corners: tags 4, buttons and fields 8, bubbles 12,
   panel 20; her portrait is round. A card from 600 px, a full-height sheet below it. */

.tc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------- the launcher ---------- */
.tc-launch {
  position: fixed; z-index: 58;
  right: max(24px, calc(8px + env(safe-area-inset-right, 0px))); bottom: max(24px, calc(8px + env(safe-area-inset-bottom, 0px)));
  display: inline-flex; align-items: center; gap: 12px; height: 56px; margin: 0; padding: 0 20px 0 6px;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--r-panel, 20px);
  background: rgba(11, 12, 14, .72); -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .45), 0 4px 12px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .12);
  color: #F5F5F4; font: 500 .9375rem/20px var(--sans); white-space: nowrap;
  cursor: pointer; user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  view-transition-name: tc-launch;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s, background-color 150ms var(--ease-out), border-color 150ms var(--ease-out),
    padding 280ms var(--ease-out), gap 280ms var(--ease-out), border-radius 280ms var(--ease-out);
}
.tc-launch:active { transform: scale(.97); }
/* Gerold, 13 November 2026: the full card at the top of the page; once you scroll it folds to her round face,
   and pointing at it (or tabbing to it) unfolds the label again, growing to the left. */
.tc-launch-label { display: block; overflow: hidden; max-width: 16rem; transition: max-width 280ms var(--ease-out), opacity 200ms var(--ease-out); }
@media (min-width: 900px) {
  .tc-launch.is-mini { gap: 0; padding: 0 5px; border-radius: 28px; }
  .tc-launch.is-mini .tc-launch-label { max-width: 0; opacity: 0; transition: max-width 240ms var(--ease-out), opacity 120ms var(--ease-out); }
  .tc-launch.is-mini:focus-visible { gap: 12px; padding: 0 20px 0 6px; border-radius: var(--r-panel, 20px); }
  .tc-launch.is-mini:focus-visible .tc-launch-label { max-width: 16rem; opacity: 1; }
}
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .tc-launch.is-mini:hover { gap: 12px; padding: 0 20px 0 6px; border-radius: var(--r-panel, 20px); }
  .tc-launch.is-mini:hover .tc-launch-label { max-width: 16rem; opacity: 1; transition: max-width 280ms var(--ease-out), opacity 200ms 60ms var(--ease-out); }
}
.tc-launch:not(.is-ready), .tc-launch.is-away, .tc-launch.is-tucked,
html:has(.menu-btn[aria-expanded="true"]) .tc-launch {
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(8px) scale(.96);
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out), visibility 0s 160ms;
}
@media (hover: hover) and (pointer: fine) {
  .tc-launch:hover { background: rgba(28, 30, 33, .86); border-color: rgba(255, 255, 255, .22); }
}

/* her portrait: round, with a soft ring; the face sits in the middle of the circle */
.tc-face {
  position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: #1C1E21;
  box-shadow: 0 0 0 2px rgba(11, 12, 14, .9), 0 0 0 3.5px rgba(255, 255, 255, .3);
}
.tc-face img { position: absolute; left: -40%; top: -13%; width: 180%; max-width: none; height: auto; }

/* ---------- the panel ---------- */
.tc-panel {
  position: fixed; z-index: 70;
  right: max(24px, calc(8px + env(safe-area-inset-right, 0px))); bottom: max(24px, calc(8px + env(safe-area-inset-bottom, 0px)));
  width: clamp(380px, 26vw, 420px); height: min(680px, calc(100dvh - 112px));
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .10); border-radius: var(--r-panel, 20px);
  background: rgba(16, 17, 20, .94); -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6), 0 4px 16px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .10);
  color: #F5F5F4; font: 400 .9375rem/1.5 var(--sans); text-align: left;
  --text: #F5F5F4; --text-2: #B4B7BC; --text-3: #8A8E94;
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .14); --line-3: rgba(255, 255, 255, .28);
  opacity: 0; transform: translateY(12px) scale(.98); transform-origin: 100% 100%;
  transition: opacity 200ms var(--ease-out), transform 260ms var(--ease-out);
}
.tc-panel[hidden] { display: none; }
.tc-panel.is-open { opacity: 1; transform: none; }
.tc-panel:focus { outline: none; }
.tc-panel :focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }

.tc-head { flex: none; display: flex; align-items: center; gap: 14px; padding: 14px 12px 14px 18px; border-bottom: 1px solid var(--line); }
.tc-who { display: flex; align-items: center; gap: 8px; min-width: 0; margin-right: auto; }
.tc-name { font: 600 1rem/24px var(--sans); letter-spacing: -.01em; white-space: nowrap; }
.tc-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: var(--r-tag, 4px); box-shadow: inset 0 0 0 1px var(--line-3); color: var(--text-2); font: 500 .6875rem/1 var(--mono); letter-spacing: .04em; }

.tc-btn {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center; margin: 0; padding: 0;
  border: 1px solid var(--line-2); border-radius: var(--r-btn, 8px); background: transparent; color: var(--text);
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background-color 150ms var(--ease-out), border-color 150ms var(--ease-out), color 150ms var(--ease-out), transform 140ms var(--ease-out);
}
.tc-btn svg { width: 20px; height: 20px; }
.tc-btn:active:not(:disabled) { transform: scale(.95); }
.tc-close { width: 40px; height: 40px; border-color: transparent; color: var(--text-2); }
.tc-mic[aria-pressed="true"] { background: rgba(255, 255, 255, .14); border-color: var(--line-3); }
.tc-send { background: var(--ground, #F5F5F4); border-color: transparent; color: var(--ink, #0B0C0E); }
.tc-send:disabled { background: rgba(255, 255, 255, .08); color: var(--text-3); cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .tc-close:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
  .tc-mic:hover { background: rgba(255, 255, 255, .08); border-color: var(--line-3); }
  .tc-send:not(:disabled):hover { background: #FFFFFF; }
}

/* ---------- the conversation ---------- */
.tc-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 16px 16px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.tc-log { display: flex; flex-direction: column; gap: 10px; }
.tc-msg { max-width: 88%; padding: 10px 14px; border-radius: var(--r-card, 12px); overflow-wrap: break-word; }
.tc-her { align-self: flex-start; max-width: 94%; background: #1C1E21; box-shadow: inset 0 0 0 1px var(--line); }
.tc-me { align-self: flex-end; background: var(--ground, #F5F5F4); color: var(--ink, #0B0C0E); }
.tc-me.tc-tentative { opacity: .64; }
.tc-from { display: block; margin-bottom: 2px; color: var(--text-3); font: 400 .75rem/1.5 var(--mono); }
.tc-thinking { display: inline-flex; align-items: center; padding: 14px 16px; }
.tc-thinking .cells { width: 18px; }
.tc-notice { align-self: flex-start; max-width: 100%; color: var(--text-3); font-size: .875rem; }
.tc-actions { align-self: flex-start; }

.tc-book {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-btn, 8px);
  background: var(--ground, #F5F5F4); color: var(--ink, #0B0C0E); font: 500 .875rem/20px var(--sans); white-space: nowrap;
  transition: background-color 150ms var(--ease-out), transform 140ms var(--ease-out);
}
.tc-book svg { width: 18px; height: 18px; flex: none; }
.tc-book:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .tc-book:hover { background: #FFFFFF; } }

.tc-contact { align-self: stretch; display: grid; padding: 2px 14px 14px; border-radius: var(--r-card, 12px); background: #1C1E21; box-shadow: inset 0 0 0 1px var(--line); }
.tc-contact a:not(.tc-book) { display: flex; align-items: center; gap: 12px; min-height: 44px; border-bottom: 1px solid var(--line); color: var(--text); white-space: nowrap; }
.tc-contact .tc-label { flex: none; width: 76px; color: var(--text-3); font: 400 .75rem/1.5 var(--mono); }
.tc-contact .tc-book { justify-self: start; margin-top: 12px; }
@media (hover: hover) and (pointer: fine) { .tc-contact a:not(.tc-book):hover { color: #FFFFFF; } }

.tc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tc-chips:empty { display: none; }
.tc-chip {
  height: 36px; margin: 0; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-btn, 8px);
  background: transparent; color: var(--text); font: 500 .875rem/20px var(--sans); white-space: nowrap;
  cursor: pointer; touch-action: manipulation; transition: background-color 150ms var(--ease-out), border-color 150ms var(--ease-out), transform 140ms var(--ease-out);
}
.tc-chip:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .tc-chip:hover { background: rgba(255, 255, 255, .06); border-color: var(--line-3); } }

/* ---------- typing, the microphone, the notes ---------- */
.tc-foot { flex: none; padding: 12px 16px 14px; border-top: 1px solid var(--line); }
.tc-form { display: flex; align-items: center; gap: 8px; margin: 0; }
.tc-input {
  flex: 1 1 auto; min-width: 0; height: 44px; margin: 0; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: var(--r-btn, 8px); background: rgba(255, 255, 255, .05);
  color: var(--text); font: 400 1rem/24px var(--sans); -webkit-appearance: none; appearance: none;
  transition: border-color 150ms var(--ease-out), background-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.tc-input::placeholder { color: var(--text-3); opacity: 1; }
.tc-panel .tc-input:focus-visible { outline: none; border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .07); box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
.tc-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; color: var(--text-3); font: 400 .75rem/16px var(--mono); }
.tc-state { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tc-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #FF5A52; }
.tc-state.is-on .tc-dot { background: #34D058; }
.tc-meta a { color: var(--text-2); white-space: nowrap; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .tc-meta a:hover { color: var(--text); } }

/* ---------- tablet and phone: her round portrait alone; below 600 px the panel is a full-height sheet ---------- */
@media (max-width: 899px) {
  .tc-launch { width: 56px; padding: 0; justify-content: center; border-radius: 50%; }
  .tc-launch .tc-face { width: 46px; height: 46px; }
  .tc-launch-label { display: none; }
}
@media (max-width: 599px) {
  .tc-launch { right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .tc-panel {
    top: 0; left: 0; right: auto; bottom: auto; width: 100%; height: 100dvh; border: 0; border-radius: 0;
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
    background: rgba(16, 17, 20, .98); transform: translateY(24px); transform-origin: 50% 100%;
  }
  .tc-head { padding: 12px 8px 12px 16px; }
  .tc-msg { max-width: 92%; }
  .tc-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  html.tc-lock, html.tc-lock body { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .tc-launch { transition: none !important; }
  .tc-panel, .tc-btn, .tc-chip, .tc-book { transition-duration: .01ms !important; }
  .tc-panel, .tc-launch.is-tucked, .tc-launch.is-away, .tc-launch:not(.is-ready) { transform: none !important; }
}
@media print { .tc-launch, .tc-panel { display: none !important; } }
