/* Smarco Concierge: a built-in guided chat (no third-party service). Midnight & Brass. */
.cg-fab { position: fixed; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 70;
  display: inline-flex; align-items: center; gap: 10px; padding: 0 18px 0 6px; height: 56px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 .9rem/1 "Geist", system-ui, sans-serif; letter-spacing: -.01em; color: #071631;
  background: linear-gradient(135deg, #F3D9A0 0%, #D8A848 48%, #B88A30 100%);
  box-shadow: 0 0 0 1px rgba(255,236,190,.4) inset, 0 18px 40px -14px rgba(216,168,72,.8), 0 6px 16px -6px rgba(0,0,0,.5);
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease; }
.cg-fab:hover { transform: translateY(-2px); }
.cg-fab-ic { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #071631; color: #F3D9A0; }
.cg-fab-ic::after { content: ""; position: absolute; top: 3px; right: 3px; width: 9px; height: 9px; border-radius: 50%; background: #3BD16F; box-shadow: 0 0 0 2px #071631; }
.cg-fab-ic::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(216,168,72,.7); animation: cg-wave 2.8s cubic-bezier(.2,.6,.3,1) infinite; }
@keyframes cg-wave { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
.cg-open .cg-fab { transform: scale(.9); opacity: 0; pointer-events: none; }

.cg-panel { position: fixed; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 71;
  width: min(390px, calc(100vw - 36px)); height: min(600px, calc(100vh - 110px)); display: flex; flex-direction: column; overflow: hidden;
  border-radius: 22px; color: #EDE6D6; font-family: "Geist", system-ui, sans-serif;
  background: radial-gradient(120% 60% at 100% 0%, rgba(216,168,72,.16), transparent 60%), linear-gradient(180deg, #0C2147 0%, #071631 100%);
  box-shadow: 0 0 0 1px rgba(216,168,72,.3), 0 40px 90px -30px rgba(0,0,0,.85);
  transform-origin: 100% 100%; transform: translateY(16px) scale(.96); opacity: 0; visibility: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s ease, visibility 0s linear .35s; }
.cg-open .cg-panel { transform: none; opacity: 1; visibility: visible; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s ease, visibility 0s; }

.cg-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; border-bottom: 1px solid rgba(216,168,72,.18); }
.cg-avatar { width: 42px; height: 42px; flex: none; border-radius: 12px; background: #F5EFE2; display: grid; place-items: center; overflow: hidden; }
.cg-avatar img { width: 120%; height: auto; margin-left: -6%; }
.cg-title { margin: 0; font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: 1.45rem; line-height: 1; color: #FFFBF1; }
.cg-sub { margin: .25rem 0 0; font-size: .74rem; color: #A9B3C3; display: flex; align-items: center; gap: 6px; }
.cg-sub::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3BD16F; }
.cg-close { margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: #EDE6D6; cursor: pointer; display: grid; place-items: center; }
.cg-close:hover { background: rgba(255,255,255,.16); }

.cg-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; overscroll-behavior: contain; }
.cg-msg { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: .92rem; line-height: 1.5; white-space: pre-line; animation: cg-in .35s cubic-bezier(.2,.8,.2,1) both; }
.cg-bot { align-self: flex-start; background: rgba(255,255,255,.07); border: 1px solid rgba(216,168,72,.14); border-bottom-left-radius: 6px; }
.cg-me { align-self: flex-end; color: #071631; background: linear-gradient(135deg, #F3D9A0, #D8A848); border-bottom-right-radius: 6px; font-weight: 500; }
.cg-msg a { color: #F3D9A0; }
.cg-typing { display: inline-flex; gap: 4px; }
.cg-typing i { width: 6px; height: 6px; border-radius: 50%; background: #D8A848; animation: cg-dot 1s infinite ease-in-out; }
.cg-typing i:nth-child(2) { animation-delay: .15s; } .cg-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes cg-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes cg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.cg-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 6px; animation: cg-in .35s cubic-bezier(.2,.8,.2,1) both; }
.cg-chip { border: 1px solid rgba(216,168,72,.45); background: rgba(216,168,72,.08); color: #F7F1E4; border-radius: 999px; padding: 9px 14px; font: 500 .84rem/1 "Geist", system-ui, sans-serif; cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.cg-chip:hover, .cg-chip:focus-visible { background: rgba(216,168,72,.2); border-color: #D8A848; outline: none; }
.cg-chip.cg-primary { color: #071631; border-color: transparent; background: linear-gradient(135deg, #F3D9A0, #D8A848 48%, #B88A30); font-weight: 600; }
.cg-chip.cg-wa { color: #fff; border-color: transparent; background: #1FA855; font-weight: 600; }

.cg-form { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid rgba(216,168,72,.16); background: rgba(0,0,0,.15); }
.cg-input { flex: 1; min-width: 0; border: 1px solid rgba(216,168,72,.28); background: rgba(255,255,255,.05); color: #F7F1E4; border-radius: 999px; padding: 11px 16px; font: 400 .92rem/1.2 "Geist", system-ui, sans-serif; }
.cg-input::placeholder { color: #8E99AB; }
.cg-input:focus { outline: none; border-color: #D8A848; background: rgba(255,255,255,.08); }
.cg-input:disabled { opacity: .5; }
.cg-send { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; cursor: pointer; color: #071631; background: linear-gradient(135deg, #F3D9A0, #D8A848 48%, #B88A30); display: grid; place-items: center; }
.cg-send:disabled { opacity: .45; cursor: default; }
.cg-foot { margin: 0; padding: 0 14px 10px; font-size: .68rem; color: #7F8BA0; text-align: center; background: rgba(0,0,0,.15); }

/* Film homepage: sit above the journey bar */
.cg-film .cg-fab, .cg-film .cg-panel { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
/* Sector pages on phones: keep clear of the centre dock */
@media (max-width: 900px) { .cg-has-dock .cg-fab { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); } }
/* Phones: compact button, the panel becomes a bottom sheet */
@media (max-width: 600px) {
  .cg-fab { padding: 0; width: 56px; justify-content: center; }
  .cg-fab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cg-fab-ic { width: 56px; height: 56px; background: transparent; color: #071631; }
  .cg-fab-ic::after { box-shadow: 0 0 0 2px #D8A848; }
  .cg-panel, .cg-film .cg-panel { right: 8px; left: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); width: auto; height: min(78vh, 620px); border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .cg-fab-ic::before, .cg-typing i { animation: none; }
  .cg-msg, .cg-chips { animation: none; }
  .cg-panel { transition: opacity .2s ease, visibility 0s linear .2s; transform: none; }
}
a.cg-chip { text-decoration: none; display: inline-flex; align-items: center; }

/* ---------- Captain Marco ---------- */
.cm { display: block; overflow: visible; }
.cg-fab-ic { background: #F5EFE2; overflow: visible; }
.cg-fab-ic .cm { width: 40px; height: 40px; margin-top: 2px; }
.cg-avatar { background: #F5EFE2; overflow: visible; border-radius: 50%; box-shadow: 0 0 0 2px rgba(216,168,72,.55); }
.cg-avatar .cm { width: 40px; height: 40px; margin-top: 2px; }
.cg-row { display: flex; align-items: flex-end; gap: 8px; max-width: 92%; animation: cg-in .35s cubic-bezier(.2,.8,.2,1) both; }
.cg-row .cg-msg { max-width: none; animation: none; }
.cg-mini { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #F5EFE2; display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(216,168,72,.45); }
.cg-mini .cm { width: 28px; height: 28px; margin-top: 2px; }
.cg-chips { padding-left: 38px; }
/* blink */
.cm-eyes { transform-box: fill-box; transform-origin: center; animation: cm-blink 4.6s infinite; }
.cm-mini .cm-eyes { animation-delay: 1.3s; }
@keyframes cm-blink { 0%, 93%, 100% { transform: scaleY(1); } 95.5% { transform: scaleY(.1); } }
/* wave hello */
.cm-hand { transform-box: fill-box; transform-origin: 30% 100%; animation: cm-wave 6s ease-in-out infinite 1s; }
@keyframes cm-wave { 0%, 70%, 100% { transform: rotate(0deg); } 74% { transform: rotate(-18deg); } 78% { transform: rotate(14deg); } 82% { transform: rotate(-14deg); } 86% { transform: rotate(10deg); } 90% { transform: rotate(0deg); } }
.cg-open .cg-avatar .cm-hand { animation: cm-wave 6s ease-in-out infinite .2s; }
/* the badge star twinkles */
.cm-star { transform-box: fill-box; transform-origin: center; animation: cm-twinkle 3.2s ease-in-out infinite; }
@keyframes cm-twinkle { 0%, 100% { transform: scale(1); filter: none; } 50% { transform: scale(1.25) rotate(18deg); filter: drop-shadow(0 0 2px #FFE7B0); } }
/* phones: the round button shows only the captain */
@media (max-width: 600px) { .cg-fab-ic { background: #F5EFE2; box-shadow: inset 0 0 0 3px #D8A848; } .cg-fab-ic .cm { width: 46px; height: 46px; } .cg-fab-ic::after { box-shadow: 0 0 0 2px #D8A848; } }
@media (prefers-reduced-motion: reduce) { .cm-eyes, .cm-hand, .cm-star, .cg-row { animation: none; } }
/* chat text wraps evenly */
.cg-msg { text-wrap: pretty; }
/* film page end screen on smaller screens: the button folds to the captain's face so it never crowds the logo card */
@media (max-width: 1100px) {
  body.end .cg-fab { padding: 0; width: 56px; justify-content: center; }
  body.end .cg-fab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  body.end .cg-fab-ic { width: 56px; height: 56px; box-shadow: inset 0 0 0 3px #D8A848; }
  body.end .cg-fab-ic .cm { width: 46px; height: 46px; }
}
/* restraint: the button's halo breathes slowly */
.cg-fab-ic::before { animation-duration: 4.8s; border-color: rgba(216,168,72,.45); }
