/* Chuco.AI chat widget — "Dusk over the Franklins" */
.cc-root { position: fixed; right: 20px; bottom: 20px; z-index: 999; font-family: var(--font-body, "Avenir Next", "Segoe UI", system-ui, sans-serif); }

.cc-launcher {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold-bright, #F2A93B); color: #231A36;
  border: none; border-radius: 999px; padding: 14px 22px;
  font-family: var(--font-display, "Arial Narrow", sans-serif); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; font-size: 15px;
  cursor: pointer; box-shadow: 0 4px 24px rgba(43, 33, 64, .35);
}
.cc-launcher:hover { background: #FFBE55; }
.cc-launcher:focus-visible { outline: 3px solid var(--violet, #5B2EBC); outline-offset: 2px; }
.cc-launcher svg { width: 20px; height: 20px; }
/* typing dots punched out of the filled bubble, matching the button face */
.cc-launcher .cc-dot { fill: var(--gold-bright, #F2A93B); }
.cc-launcher:hover .cc-dot { fill: #FFBE55; }
.cc-l-short { display: none; }
/* pulsing violet glow so the button always draws the eye */
.cc-launcher::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 16px 4px rgba(157, 119, 242, .55);
}
@media (prefers-reduced-motion: no-preference) {
  .cc-launcher::after { animation: cc-glow 2.2s ease-in-out infinite; }
  @keyframes cc-glow {
    0%, 100% { box-shadow: 0 0 10px 2px rgba(157, 119, 242, .4); }
    50% { box-shadow: 0 0 26px 9px rgba(157, 119, 242, .85); }
  }
}
.cc-root.cc-open .cc-launcher { display: none; }

.cc-panel {
  padding: 0; /* the site styles all <section> elements with vertical padding */
  width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100dvh - 40px));
  display: flex; flex-direction: column;
  background: var(--surface, #FFFDF7);
  border: 1px solid var(--line, #E3D9C6); border-radius: 12px;
  box-shadow: 0 12px 48px rgba(24, 15, 45, .4);
  overflow: hidden;
}
.cc-panel[hidden] { display: none; }

.cc-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: linear-gradient(135deg, #191129 0%, #231A36 50%, #3A2560 100%);
  color: #F3EEE3;
}
.cc-rocket { height: 34px; width: 34px; flex-shrink: 0; }
.cc-title { margin: 0; font-family: var(--font-display, "Arial Narrow", sans-serif); font-weight: 800; font-size: 21px; line-height: 1.1; }
.cc-title span { color: #F2A93B; }
.cc-sub { margin: 0; font-size: 12px; color: #B4A8CE; }
.cc-close {
  margin-left: auto; background: none; border: none; color: #B4A8CE;
  font-size: 26px; line-height: 1; cursor: pointer; padding: 2px 8px;
}
.cc-close:hover, .cc-close:focus-visible { color: #F2A93B; }

.cc-msgs { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.cc-msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; font-size: 16px; line-height: 1.45; overflow-wrap: break-word; }
.cc-assistant { align-self: flex-start; background: var(--ground, #F7F1E5); border: 1px solid var(--line, #E3D9C6); border-bottom-left-radius: 4px; color: var(--ink, #2B2140); }
.cc-user { align-self: flex-end; background: var(--violet, #5B2EBC); color: #F3EEE3; border-bottom-right-radius: 4px; }
.cc-msg a { color: inherit; text-decoration: underline; }

.cc-book {
  display: inline-block; margin-top: 10px; background: var(--gold-bright, #F2A93B); color: #231A36 !important;
  font-family: var(--font-display, "Arial Narrow", sans-serif); font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; font-size: 13px; padding: 9px 16px; border-radius: 4px; text-decoration: none !important;
}
.cc-book:hover { background: #FFBE55; }

.cc-typing { display: flex; gap: 5px; padding: 14px; }
.cc-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted, #6D6380); animation: cc-blink 1.2s infinite both; }
.cc-typing span:nth-child(2) { animation-delay: .2s; }
.cc-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes cc-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cc-typing span { animation: none; opacity: .6; } }

.cc-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 8px; }
.cc-chips:empty { display: none; }
.cc-chip {
  background: none; border: 1px solid var(--violet, #5B2EBC); color: var(--violet, #5B2EBC);
  border-radius: 999px; padding: 7px 13px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.cc-chip:hover { background: var(--violet, #5B2EBC); color: #F3EEE3; }

.cc-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line, #E3D9C6); }
.cc-input {
  flex: 1; border: 1px solid var(--line, #E3D9C6); border-radius: 8px; padding: 10px 12px;
  /* 16px minimum — anything smaller makes iOS Safari auto-zoom the page on focus */
  font: inherit; font-size: 16px; background: var(--ground, #F7F1E5); color: var(--ink, #2B2140); min-width: 0;
}
.cc-input:focus-visible { outline: 2px solid var(--violet, #5B2EBC); outline-offset: 1px; }
.cc-send {
  background: var(--gold-bright, #F2A93B); color: #231A36; border: none; border-radius: 8px;
  padding: 10px 16px; font-family: var(--font-display, "Arial Narrow", sans-serif); font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; font-size: 14px; cursor: pointer;
}
.cc-send:hover { background: #FFBE55; }
.cc-send:focus-visible { outline: 2px solid var(--violet, #5B2EBC); outline-offset: 1px; }

.cc-foot { margin: 0; padding: 8px 16px 12px; font-size: 12px; text-align: center; color: var(--muted, #6D6380); }
.cc-foot a { color: inherit; }
.cc-foot a:hover { color: var(--violet, #5B2EBC); }

html.cc-lock, html.cc-lock body { overflow: hidden; }

@media (max-width: 640px) {
  .cc-root { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  /* compact labeled pill on phones — keeps the word "Chat" visible */
  .cc-launcher { padding: 13px 18px; gap: 8px; }
  .cc-l-full { display: none; }
  .cc-l-short { display: inline; }
  .cc-launcher svg { width: 24px; height: 24px; }
  /* full-screen chat sheet */
  .cc-root.cc-open { inset: 0; right: 0; bottom: 0; }
  .cc-root.cc-open .cc-panel {
    width: 100%; height: 100%; max-height: none;
    border: none; border-radius: 0; box-shadow: none;
  }
  .cc-head { padding-top: calc(14px + env(safe-area-inset-top)); }
  .cc-close { font-size: 30px; padding: 6px 14px; }
  .cc-msg { max-width: 88%; font-size: 16px; }
  .cc-chip { padding: 10px 15px; font-size: 14px; }
  .cc-send { padding: 12px 18px; }
  .cc-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}
