/* Site chat: questions go to the organiser's Telegram bot, answers come back here. */
.chat-launcher[hidden],.chat-panel[hidden],.chat-email[hidden],.chat-unread[hidden]{display:none}
.chat-launcher{position:fixed;z-index:85;right:64px;bottom:24px;display:flex;align-items:center;gap:10px;padding:13px 20px 13px 16px;border:0;border-radius:999px;background:var(--gold);color:var(--ink);font:500 15px/1 Manrope,Arial,sans-serif;letter-spacing:-.01em;cursor:pointer;box-shadow:0 10px 34px #0006,0 0 0 1px #f5dfad66 inset;opacity:0;transform:translateY(12px);transition:opacity .35s var(--ease,cubic-bezier(.22,.8,.24,1)),transform .35s var(--ease,cubic-bezier(.22,.8,.24,1)),background .2s}
.chat-launcher.is-visible{opacity:1;transform:none}
.chat-launcher:hover{background:#e5c998}
.chat-launcher:focus-visible{outline:2px solid var(--paper);outline-offset:3px}
.chat-launcher svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}
.chat-unread{position:absolute;top:4px;right:6px;width:11px;height:11px;border-radius:50%;background:#e0674a;box-shadow:0 0 0 2px var(--gold)}
.chat-open .chat-launcher{opacity:0;pointer-events:none}

.chat-panel{position:fixed;z-index:90;right:64px;bottom:24px;display:flex;flex-direction:column;width:380px;height:min(560px,calc(100svh - 48px));background:#211b16;color:var(--paper);border:1px solid #d3b27250;box-shadow:0 18px 70px #000a;font-family:Manrope,Arial,sans-serif}
.chat-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 18px 14px 20px;border-bottom:1px solid #d3b27233}
.chat-title{margin:0;font-size:17px;font-weight:500;letter-spacing:-.02em}
.chat-sub{margin:4px 0 0;font-size:12px;color:var(--muted)}
.chat-close{flex:none;width:36px;height:36px;margin:-6px -8px 0 0;border:0;background:none;color:var(--muted);font-size:28px;line-height:1;cursor:pointer}
.chat-close:hover{color:var(--paper)}

.chat-log{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:18px 20px;-webkit-mask-image:linear-gradient(transparent,#000 22px);mask-image:linear-gradient(transparent,#000 22px);display:flex;flex-direction:column;gap:10px}
.chat-msg{max-width:84%;margin:0;padding:10px 14px;font-size:14px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.chat-msg-owner{align-self:flex-start;background:#2f2721;border:1px solid #d3b27233;color:#e9dfce}
.chat-msg-visitor{align-self:flex-end;background:var(--gold);color:var(--ink)}
.chat-msg-pending{opacity:.6}

.chat-email{margin:0 20px 12px;padding:14px;border:1px dashed #d3b27280;font-size:13px;line-height:1.5;color:#d6c8b5}
.chat-email>p:first-child{margin:0 0 10px}
.chat-email-row{display:flex;gap:8px}
.chat-email input{flex:1;min-width:0;padding:10px 12px;border:1px solid #d3b2724d;border-radius:0;background:#171410;color:var(--paper);font:16px/1.3 Manrope,Arial,sans-serif}
.chat-email input:focus{outline:none;border-color:var(--gold)}
.chat-email button[type=submit]{flex:none;padding:0 14px;border:0;background:var(--gold);color:var(--ink);font:500 14px Manrope,Arial,sans-serif;cursor:pointer}

.chat-form{display:flex;align-items:flex-end;gap:8px;margin:0;padding:12px 14px 16px 20px;border-top:1px solid #d3b27233}
.chat-form textarea{flex:1;min-width:0;max-height:120px;padding:11px 12px;border:1px solid #d3b2724d;border-radius:0;background:#171410;color:var(--paper);font:16px/1.4 Manrope,Arial,sans-serif;resize:none}
.chat-form textarea::placeholder{color:#8f8170}
.chat-form textarea:focus{outline:none;border-color:var(--gold)}
.chat-form button{flex:none;display:grid;place-items:center;width:46px;height:46px;border:0;background:var(--gold);color:var(--ink);cursor:pointer}
.chat-form button[disabled]{opacity:.6;cursor:progress}
.chat-form svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.chat-error{margin:-8px 20px 12px;font-size:13px;line-height:1.4;color:#f0a58a}
.chat-email .chat-error{margin:6px 0 0}
.chat-error:empty{display:none}
.chat-fine{margin:6px 20px 14px;font-size:12px;line-height:1.5;color:var(--muted)}
.chat-email .chat-fine{margin:8px 0 0}
.chat-fine button{display:inline;padding:0;border:0;background:none;color:var(--gold);font:inherit;text-decoration:underline;text-underline-offset:3px;cursor:pointer}

.faq-chat-link{display:inline;padding:0;border:0;background:none;color:inherit;font:inherit;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.waitlist-lead .faq-chat-link{color:var(--gold)}

@media(max-width:760px){
  .chat-launcher{right:46px;bottom:max(16px,env(safe-area-inset-bottom));width:54px;height:54px;padding:0;justify-content:center}
  .chat-launcher span{display:none}
  .chat-launcher svg{width:24px;height:24px}
  .chat-panel{inset:0;width:auto;height:auto;border:0;padding-bottom:env(safe-area-inset-bottom)}
  .chat-head{padding-top:max(18px,env(safe-area-inset-top))}
}
@media(prefers-reduced-motion:reduce){.chat-launcher{transition:none}}

/* Timon: his face on the button, the teaser over it, typing dots, the organiser's signed answers. */
.chat-launcher{padding-left:7px}
.chat-launcher-face{position:relative;flex:none;width:42px;height:42px}
.chat-face{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover;box-shadow:0 0 0 2px #f5dfad;background:#8d97a3}
/* The face is a live video now; the old head tilt stays only for a still picture. */
.chat-launcher-face img.chat-face{transform-origin:50% 85%;animation:timon-tilt 9s var(--ease,cubic-bezier(.22,.8,.24,1)) 3s infinite}
@keyframes timon-tilt{0%,86%,100%{transform:none}89%{transform:rotate(-13deg)}93%{transform:rotate(-9deg)}96%{transform:rotate(4deg)}}
.chat-online{position:absolute;right:-1px;bottom:1px;width:11px;height:11px;border-radius:50%;background:#5ec27a;box-shadow:0 0 0 2px var(--gold)}
.chat-who{display:flex;align-items:center;gap:12px}
.chat-avatar{flex:none;width:44px;height:44px}
.chat-avatar .chat-face{box-shadow:0 0 0 1px #d3b27280}

.chat-teaser[hidden]{display:none}
.chat-teaser{position:fixed;z-index:86;right:64px;bottom:94px;display:flex;align-items:flex-start;max-width:290px;background:#2f2721;color:#e9dfce;border:1px solid #d3b27266;box-shadow:0 14px 44px #0008;opacity:0;transform:translateY(8px) scale(.97);transform-origin:85% 100%;transition:opacity .35s var(--ease,cubic-bezier(.22,.8,.24,1)),transform .35s var(--ease,cubic-bezier(.22,.8,.24,1))}
.chat-teaser.is-visible{opacity:1;transform:none}
.chat-teaser::after{content:"";position:absolute;right:30px;bottom:-7px;width:12px;height:12px;background:#2f2721;border-right:1px solid #d3b27266;border-bottom:1px solid #d3b27266;transform:rotate(45deg)}
.chat-teaser-text{flex:1;padding:12px 4px 12px 16px;text-align:left;font:14px/1.45 Manrope,Arial,sans-serif;color:inherit;cursor:pointer}
.chat-teaser-close{flex:none;width:34px;height:34px;color:var(--muted);font-size:22px;line-height:1}
.chat-teaser-close:hover{color:var(--paper)}
.chat-open .chat-teaser{display:none}

.chat-msg[data-author]::before{content:attr(data-author);display:block;margin-bottom:3px;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--gold)}
.chat-typing{display:flex;gap:5px;align-items:center;padding:14px 16px}
.chat-typing i{width:7px;height:7px;border-radius:50%;background:var(--gold);opacity:.35;animation:chat-dot 1.2s infinite}
.chat-typing i:nth-child(2){animation-delay:.2s}
.chat-typing i:nth-child(3){animation-delay:.4s}
@keyframes chat-dot{0%,60%,100%{opacity:.35;transform:none}30%{opacity:1;transform:translateY(-3px)}}
.chat-fine-ai{margin-top:-4px}

/* Timon's team card: the back side has a way into the chat. */
.timon-card-chat{display:inline-block;margin-top:18px;padding:10px 16px;background:var(--gold);color:var(--ink);font:500 14px/1.2 Manrope,Arial,sans-serif;letter-spacing:-.01em;cursor:pointer}
.timon-card-chat:hover{background:#e5c998}

@media(max-width:760px){
  .chat-launcher{width:62px;height:62px;padding:0;background:none;box-shadow:0 6px 18px #0005}
  .chat-launcher-face{width:62px;height:62px}
  .chat-launcher-face .chat-face{box-shadow:0 0 0 3px var(--gold)}
  .chat-online{right:2px;bottom:3px;width:13px;height:13px;box-shadow:0 0 0 2px #211b16}
  .chat-unread{top:0;right:0}
  .chat-teaser{right:46px;bottom:max(92px,calc(env(safe-area-inset-bottom) + 76px));max-width:min(290px,calc(100vw - 62px))}
  .chat-teaser::after{right:22px}
}
@media(prefers-reduced-motion:reduce){
  .chat-typing i,.chat-launcher-face .chat-face{animation:none}.chat-typing i{opacity:.7}
  .chat-teaser{transition:none}
}
@media(max-width:760px){.chat-launcher .chat-launcher-face{display:block}}

/* The e-mail offer lives inside the conversation as a compact card. */
.chat-log .chat-email{position:relative;flex:none;margin:2px 0 0;padding:11px 12px 10px;font-size:12px;line-height:1.45}
.chat-log .chat-email>p:first-of-type{margin:0 26px 8px 0;font-size:13px;color:#e9dfce}
.chat-log .chat-email input{padding:8px 10px;font-size:16px}
.chat-log .chat-email button[type=submit]{padding:0 12px;font-size:13px}
.chat-log .chat-email .chat-fine{margin:6px 0 0;font-size:11px;line-height:1.4}
.chat-email-close{position:absolute;top:4px;right:4px;width:28px;height:28px;padding:0;border:0;background:none;color:var(--muted);font-size:20px;line-height:1;cursor:pointer}
.chat-email-close:hover{color:var(--paper)}

/* Timon's sign-up button under his message. */
.chat-signup{align-self:flex-start;display:inline-block;text-decoration:none;margin-top:-4px;padding:10px 16px;border:0;background:var(--gold);color:var(--ink);font:500 14px/1.2 Manrope,Arial,sans-serif;letter-spacing:-.01em;cursor:pointer}
.chat-signup:hover{background:#e5c998}

/* "Clear the conversation" in the note under the input; asks once before deleting. */
.chat-fine-ai{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px}
.chat-reset[hidden]{display:none}
.chat-reset{padding:0;border:0;background:none;color:var(--muted);font:inherit;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.chat-reset:hover{color:var(--paper)}
.chat-reset.is-armed{color:#f0a58a}

/* Timon's portrait over the chat window, opened from the face in the header. */
.chat-avatar{padding:0;border:0;border-radius:50%;background:none;cursor:zoom-in}
.chat-avatar:hover .chat-face{box-shadow:0 0 0 2px var(--gold)}
.chat-photo[hidden]{display:none}
.chat-photo{position:absolute;inset:0;z-index:2;margin:0;display:grid;place-items:center;padding:20px;background:#171410f2;cursor:zoom-out}
.chat-photo img,.chat-photo video{width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;box-shadow:0 18px 50px #000a}
.chat-photo-close{position:absolute;top:10px;right:12px;width:40px;height:40px;border:0;background:none;color:var(--paper);font-size:30px;line-height:1;cursor:pointer}

/* Quick starts over the input: they surface softly, one after another, after a pause in the conversation. */
.chat-chips[hidden]{display:none}
.chat-chips{display:flex;flex-wrap:wrap;gap:8px;padding:0 20px 12px}
.chat-chips button{padding:7px 12px;border:1px solid #d3b27266;border-radius:999px;background:none;color:#e9dfce;font:13px/1.2 Manrope,Arial,sans-serif;cursor:pointer;
  opacity:0;transform:translateY(6px);transition:opacity .6s var(--ease,cubic-bezier(.22,.8,.24,1)) calc(var(--i,0)*.12s),transform .6s var(--ease,cubic-bezier(.22,.8,.24,1)) calc(var(--i,0)*.12s),border-color .2s,color .2s}
.chat-chips.is-visible button{opacity:1;transform:none}
.chat-chips button:hover{border-color:var(--gold);color:var(--paper)}
@media(prefers-reduced-motion:reduce){.chat-chips button{transform:none;transition:opacity .3s,border-color .2s,color .2s}}

/* The two ticks: a card under Timon's request after the first message, like the e-mail card. */
.chat-consent[hidden]{display:none}
.chat-log .chat-consent{flex:none;margin:2px 0 0;padding:12px 12px 6px;border:1px dashed #d3b27280;font-size:13px;line-height:1.45;color:#d6c8b5;animation:chat-consent-in .5s var(--ease,cubic-bezier(.22,.8,.24,1))}
.chat-check{display:flex;gap:10px;align-items:flex-start;margin:0 0 6px;cursor:pointer}
.chat-check input{flex:none;width:18px;height:18px;margin:1px 0 0;accent-color:#d3b272;cursor:pointer}
.chat-check button{display:inline;padding:0;border:0;background:none;color:var(--gold);font:inherit;text-align:left;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.chat-consent.is-asking{border-style:solid;border-color:var(--gold);animation:chat-consent-ask .5s}
@keyframes chat-consent-in{from{opacity:0;transform:translateY(6px)}}
@keyframes chat-consent-ask{20%,60%{transform:translateX(-4px)}40%,80%{transform:translateX(4px)}}
@media(prefers-reduced-motion:reduce){.chat-log .chat-consent,.chat-consent.is-asking{animation:none}}
