/* AM Academy concierge — Sixty, the Academy's AI assistant, in a corner chat.
   A separate stylesheet, not an addition to styles.css: the site skin is edited on its own branch
   and this feature should never be the reason that edit conflicts.
   No inline style attributes anywhere in concierge.js — the site's CSP is `style-src 'self'`,
   which blocks a style="" attribute just as hard as it blocks a <style> block. */

.concierge{position:fixed;right:20px;bottom:20px;z-index:60;display:flex;flex-direction:column;align-items:flex-end;gap:12px;font-family:var(--sans,system-ui,sans-serif)}
.concierge-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}

.concierge-bubble{display:inline-flex;align-items:center;gap:12px;padding:8px 20px 8px 8px;color:var(--bone,#f3eee4);background:rgba(12,11,9,.92);border:1px solid rgba(229,182,74,.42);border-radius:999px;cursor:pointer;box-shadow:0 16px 44px rgba(0,0,0,.5);backdrop-filter:blur(14px);transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}
.concierge-bubble:hover{transform:translateY(-2px);border-color:rgba(229,182,74,.8);box-shadow:0 20px 52px rgba(0,0,0,.58)}
.concierge-bubble-avatar{width:44px;height:44px;border-radius:50%;object-fit:cover;border:1px solid rgba(229,182,74,.5)}
.concierge-bubble-label{font-size:14px;font-weight:700;letter-spacing:-.01em}

/* `hidden` must still win. An explicit `display` beats the UA stylesheet's [hidden]{display:none},
   so without this rule the panel ships permanently open — which is exactly what it did. */
.concierge-panel[hidden]{display:none}
.concierge-panel{display:flex;flex-direction:column;width:min(calc(100vw - 40px),380px);max-height:min(80vh,680px);background:linear-gradient(160deg,#14120e,#0b0a08);border:1px solid rgba(229,182,74,.28);box-shadow:0 28px 70px rgba(0,0,0,.62);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
/* Only the transcript gives up height when the window is short; every other part keeps its own, and
   past that the panel itself scrolls, so the composer can never be clipped out of reach (2026-10-18:
   on a 667px phone the field and Send button were cut off below the panel's edge). */
.concierge-head,.concierge-notice,.concierge-topics,.concierge-composer,.concierge-fine{flex-shrink:0}
.concierge-head{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:14px 14px 12px;border-bottom:1px solid rgba(229,182,74,.18)}
.concierge-head-avatar{width:48px;height:48px;border-radius:50%;object-fit:cover;border:1px solid rgba(229,182,74,.45)}
.concierge-head-text{min-width:0}
.concierge-name{margin:0;font-family:var(--serif,Georgia,serif);font-size:19px;font-weight:400;letter-spacing:.02em;color:var(--bone,#f3eee4)}
.concierge-role{margin:2px 0 0;color:#b8ad9c;font-size:12px;line-height:1.35}
.concierge-close{width:32px;height:32px;color:#b8ad9c;background:transparent;border:1px solid rgba(229,182,74,.24);border-radius:50%;font-size:18px;line-height:1;cursor:pointer}
.concierge-close:hover{color:var(--bone,#f3eee4);border-color:rgba(229,182,74,.6)}
/* The language pills: always visible, never a select — a visitor whose language was guessed wrong
   has to see the way out without opening anything. */
.concierge-langs{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px}
.concierge-lang{padding:5px 10px;color:#b8ad9c;background:transparent;border:1px solid rgba(229,182,74,.24);border-radius:999px;font-family:inherit;font-size:11px;line-height:1.2;cursor:pointer;transition:color .15s ease,border-color .15s ease,background .15s ease}
.concierge-lang:hover{color:#f6da8a;border-color:rgba(229,182,74,.6)}
.concierge-lang[aria-pressed="true"]{color:#100d07;background:linear-gradient(135deg,#f0c65b,#d8a735);border-color:#e7b94f;font-weight:700}
.concierge-notice{margin:0;padding:10px 14px;color:#9d947f;background:rgba(229,182,74,.05);border-bottom:1px solid rgba(229,182,74,.14);font-size:11px;line-height:1.45}

.concierge-log{flex:1 1 auto;min-height:160px;padding:14px;overflow-y:auto;display:flex;flex-direction:column;gap:12px}
.concierge-msg{display:flex;flex-direction:column;gap:3px;max-width:92%}
.concierge-msg-you{align-self:flex-end;align-items:flex-end}
.concierge-msg-who{color:#8d8574;font-family:var(--mono,ui-monospace,monospace);font-size:9px;letter-spacing:.14em;text-transform:uppercase}
.concierge-msg-text{margin:0;padding:10px 13px;font-size:14px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.concierge-msg-sixty .concierge-msg-text{color:var(--bone,#f3eee4);background:rgba(255,255,255,.04);border:1px solid rgba(229,182,74,.16)}
.concierge-msg-you .concierge-msg-text{color:#100d07;background:linear-gradient(135deg,#f0c65b,#d8a735);border:1px solid #e7b94f}
.concierge-msg.is-pending .concierge-msg-text{color:#9d947f;font-style:italic}
.concierge-msg.is-error .concierge-msg-text{color:#f0c65b;border-color:rgba(240,198,91,.4)}

.concierge-topics{display:flex;flex-wrap:wrap;gap:6px;padding:0 14px 12px}
.concierge-topic{padding:7px 12px;color:#d9d1c2;background:transparent;border:1px solid rgba(229,182,74,.28);border-radius:999px;font-size:12px;cursor:pointer;transition:color .15s ease,border-color .15s ease,background .15s ease}
.concierge-topic:hover{color:#f6da8a;background:rgba(229,182,74,.07);border-color:rgba(229,182,74,.65)}

.concierge-composer{display:grid;grid-template-columns:1fr auto;gap:8px;padding:12px 14px;border-top:1px solid rgba(229,182,74,.18)}
.concierge-turnstile{grid-column:1/-1}
.concierge-composer textarea{min-height:42px;max-height:120px;padding:11px 12px;color:var(--bone,#f3eee4);background:rgba(255,255,255,.04);border:1px solid rgba(229,182,74,.22);border-radius:2px;font-family:inherit;font-size:14px;line-height:1.4;resize:vertical}
.concierge-composer textarea::placeholder{color:#7e7768}
.concierge-composer textarea:focus{border-color:rgba(229,182,74,.6);outline:none}
.concierge-send{align-self:end;min-height:42px;padding:0 18px;color:#100d07;background:linear-gradient(135deg,#f0c65b,#d8a735);border:1px solid #e7b94f;border-radius:2px;font-weight:800;font-size:13px;cursor:pointer}
.concierge-send:hover{background:linear-gradient(135deg,#f6da8a,#e5b64a)}
.concierge-send:disabled{color:#817b70;background:#25231f;border-color:#3d382f;cursor:not-allowed}
.concierge-fine{margin:0;padding:0 14px 13px;color:#7e7768;font-size:10px;line-height:1.45}

@media(max-width:720px){
  /* The launcher is a round avatar button on a phone, never a stretched bar: the hero's own doors
     own the bottom of the first screen. The label lives on in the button's aria-label.
     2026-10-18: always visible from first paint, so it is small and sits in the corner, clear of
     the hero's buttons. `left` is not set: a full-width fixed box would swallow taps meant for the page. */
  .concierge{right:12px;bottom:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px));gap:10px}
  /* Everything above the launcher is the panel's: the viewport less the bubble, its gap and a margin. */
  .concierge-panel{width:calc(100vw - 24px);max-height:calc(100vh - 84px);max-height:calc(100dvh - 84px - env(safe-area-inset-bottom,0px))}
  .concierge-log{min-height:120px}
  /* 16px, not 14: iOS Safari zooms the whole page in when a field under 16px takes focus, and the
     visitor had to pinch the site back to screen size after opening the chat. */
  .concierge-composer textarea{font-size:16px}
  .concierge-bubble{align-self:flex-end;justify-content:center;width:48px;height:48px;padding:0;border-radius:50%}
  .concierge-bubble-avatar{width:46px;height:46px;border:0}
  .concierge-bubble-label{display:none}
}
@media(prefers-reduced-motion:reduce){
  .concierge-bubble,.concierge-topic,.concierge-lang{transition:none}
  .concierge-bubble:hover{transform:none}
}
