/* GW AI — the website assistant (launcher button + full-screen chat window · 23 Nov 2026: one room, type or talk).
   Same palette as the site (deep navy, champagne gold) pushed toward a futuristic look: chat bubbles on deep space,
   glass cards, a small living particle orb while a voice call is on. Everything is namespaced .gwai-* so the site
   styles are untouched. */

:root {
  --gwai-bg: #04070d;
  --gwai-bg-2: #0b1424;
  --gwai-gold: #e6c88f;
  --gwai-gold-2: #b08d57;
  --gwai-aqua: #8fd8d2;
  --gwai-ivory: #f5f1e8;
  --gwai-text: #ece6d9;
  --gwai-muted: #9a978f;
  --gwai-glass: rgba(255, 255, 255, .06);
  --gwai-glass-line: rgba(230, 200, 143, .22);
  --gwai-red: #d4544a;
}

html.gwai-open, html.gwai-open body { overflow: hidden; }

/* ---------- launcher (floating orb) ---------- */
.gwai-launch {
  position: fixed; z-index: 900;
  right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 6px; border: 1px solid var(--gwai-glass-line); border-radius: 999px;
  background: rgba(6, 11, 20, .82); color: var(--gwai-text);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .2);
  font: 500 14px/1 var(--sans, system-ui, sans-serif); letter-spacing: .02em;
  cursor: pointer; transition: transform .35s cubic-bezier(.2, .7, .2, 1), opacity .3s;
}
.gwai-launch:hover { transform: translateY(-2px); }
.gwai-launch:focus-visible { outline: 2px solid var(--gwai-gold); outline-offset: 3px; }
.gwai-launch[hidden] { display: none; }
.gwai-launch .gwai-mini {
  position: relative; width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 50% 45%, #fff6dd 0, #e6c88f 22%, #8a6a35 52%, #1a1407 74%);
  box-shadow: 0 0 22px rgba(230, 200, 143, .55);
  animation: gwai-breathe 3.2s ease-in-out infinite;
}
.gwai-launch .gwai-mini::before {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 55%, rgba(230, 200, 143, .9) 75%, transparent 90%);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%); mask: radial-gradient(circle, transparent 60%, #000 62%);
  animation: gwai-spin 2.8s linear infinite;
}
.gwai-launch .gwai-mini::after {
  content: ""; position: absolute; inset: 13px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .95) 0, rgba(255, 246, 221, .4) 45%, transparent 70%);
  mix-blend-mode: screen;
}
.gwai-launch .gwai-lbl { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.gwai-launch .gwai-lbl b { font-weight: 600; font-size: 14px; }
.gwai-launch .gwai-lbl small { font-size: 11px; color: var(--gwai-muted); letter-spacing: .04em; }
.gwai-hint {
  position: fixed; z-index: 899;
  right: max(16px, env(safe-area-inset-right)); bottom: calc(max(16px, env(safe-area-inset-bottom)) + 70px);
  max-width: 250px; padding: 12px 14px; border-radius: 14px;
  background: rgba(6, 11, 20, .9); color: var(--gwai-text); border: 1px solid var(--gwai-glass-line);
  font: 400 13px/1.55 var(--sans, system-ui, sans-serif);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; pointer-events: none;
}
.gwai-hint.on { opacity: 1; transform: none; }
@media (max-width: 560px) {
  .gwai-launch { padding: 5px; }
  .gwai-launch .gwai-lbl { display: none; }
  .gwai-launch .gwai-mini { width: 50px; height: 50px; }
  .gwai-hint { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 66px); }
}

/* in-page button (AI section) */
.addon .gwai-cta { margin-right: 12px; }
.gwai-cta .gwai-dot { /* sits on the gold button, so it is navy with a navy ping */
  width: 9px; height: 9px; border-radius: 50%; background: #0b1220;
  box-shadow: 0 0 0 0 rgba(11, 18, 32, .55); animation: gwai-ping 1.8s ease-out infinite;
}

/* "this device is marked as a GW device" (shown on the page, the window is closed then) */
.gwai-toast {
  position: fixed; z-index: 1001; left: 50%; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 78px);
  max-width: min(92vw, 420px); padding: 12px 18px; border-radius: 14px; text-align: center;
  background: rgba(6, 11, 20, .94); color: var(--gwai-text); border: 1px solid var(--gwai-glass-line);
  font: 400 14px/1.5 var(--sans, system-ui, sans-serif); box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  opacity: 0; transform: translate(-50%, 8px); transition: opacity .3s, transform .3s; pointer-events: none;
}
.gwai-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- the chat window (23 Nov 2026) ---------- */
.gwai {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
  padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: var(--gwai-bg); color: var(--gwai-text); color-scheme: dark;
  font: 400 16px/1.6 var(--sans, system-ui, sans-serif);
  overflow: hidden; isolation: isolate;
  opacity: 0; transition: opacity .45s ease;
}
.gwai[hidden], .gwai [hidden] { display: none !important; }
.gwai.is-in { opacity: 1; }
.gwai:focus { outline: none; }
.gwai * { box-sizing: border-box; }
/* family and colour only: a "font" shorthand here would also beat every button's own font-size below */
.gwai button, .gwai input, .gwai select, .gwai textarea { font-family: inherit; color: inherit; }
.gwai button:focus-visible, .gwai a:focus-visible, .gwai summary:focus-visible, .gwai select:focus-visible { outline: 2px solid var(--gwai-gold); outline-offset: 3px; }

.gwai-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.gwai-bg::before { /* deep space + warm glow near the top */
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 40% at 50% 18%, rgba(176, 141, 87, .14), transparent 70%),
    radial-gradient(90% 70% at 50% 110%, rgba(40, 70, 110, .32), transparent 70%),
    linear-gradient(180deg, #060b15 0%, var(--gwai-bg) 60%);
}
.gwai-bg::after { /* perspective grid fading out */
  content: ""; position: absolute; inset: -20% -20% 0;
  background-image:
    linear-gradient(rgba(230, 200, 143, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 200, 143, .05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask: radial-gradient(55% 45% at 50% 30%, #000 0, transparent 75%);
  mask: radial-gradient(55% 45% at 50% 30%, #000 0, transparent 75%);
  animation: gwai-drift 24s linear infinite;
}

/* one column: phone = the whole screen · from 900 px a centred column inside the same overlay */
.gwai-col { position: relative; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; width: 100%; max-width: 760px; margin: 0 auto; }

/* header */
.gwai-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-bottom: 10px; border-bottom: 1px solid rgba(230, 200, 143, .12);
}
.gwai-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.gwai-id > div { min-width: 0; }
.gwai-id svg { width: 34px; height: 34px; flex: none; }
.gwai-id b { display: block; font: 600 15px/1.25 var(--sans, system-ui, sans-serif); letter-spacing: .06em; }
.gwai-id small { display: block; color: var(--gwai-muted); font-size: 12px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gwai-live {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 2px 8px; border-radius: 999px;
  font: 600 10px/1.6 var(--sans, system-ui, sans-serif); letter-spacing: .14em; color: var(--gwai-gold);
  border: 1px solid var(--gwai-glass-line); vertical-align: 2px;
}
.gwai-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: gwai-blink 1.4s infinite; }
.gwai-staff {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; vertical-align: 2px;
  font: 600 10.5px/1.6 var(--sans, system-ui, sans-serif); letter-spacing: .03em; color: var(--gwai-aqua);
  border: 1px solid rgba(143, 216, 210, .4); background: rgba(143, 216, 210, .07);
}
.gwai-top-right { display: flex; align-items: center; gap: 8px; flex: none; }
.gwai-x {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--gwai-glass); border: 1px solid var(--gwai-glass-line); cursor: pointer;
}
.gwai-x svg { width: 18px; height: 18px; }
.gwai-team {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 14px; border-radius: 999px;
  background: rgba(230, 200, 143, .12); border: 1px solid rgba(230, 200, 143, .45); color: var(--gwai-ivory);
  font: 500 14px/1 var(--sans, system-ui, sans-serif); white-space: nowrap; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.gwai-team:hover { background: rgba(230, 200, 143, .2); }
.gwai-team svg { width: 18px; height: 18px; flex: none; color: var(--gwai-gold); }

/* "clear this chat on this device?" */
.gwai-confirm {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 10px; padding: 10px 12px;
  border-radius: 14px; background: rgba(212, 84, 74, .1); border: 1px solid rgba(212, 84, 74, .4); font-size: 14px; line-height: 1.5;
}
.gwai-confirm span { flex: 1 1 180px; }
.gwai-confirm button {
  min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer; font-size: 14px;
  background: var(--gwai-glass); border: 1px solid var(--gwai-glass-line);
}
.gwai-confirm .gwai-yes { background: rgba(212, 84, 74, .25); border-color: rgba(212, 84, 74, .65); color: #fff; }

/* the message log */
.gwai-logbox { position: relative; flex: 1 1 auto; min-height: 0; }
.gwai-log {   /* fills the box absolutely: a % height inside a flex item is not reliable on older Safari */
  position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 14px 2px 10px; scrollbar-width: thin; scrollbar-color: rgba(230, 200, 143, .25) transparent;
}
.gwai-note { margin: 0 auto 16px; max-width: 560px; text-align: center; color: #a39f96; font-size: 11.5px; line-height: 1.6; }
.gwai-msgs { display: flex; flex-direction: column; gap: 10px; }
.gwai-msg { position: relative; display: flex; flex-direction: column; gap: 8px; animation: gwai-msg-in .28s ease-out; }
.gwai-u { align-items: flex-end; }
.gwai-a { align-items: flex-start; }
.gwai-bub {
  max-width: 86%; padding: 10px 15px; border-radius: 20px;
  font: 400 15.5px/1.7 var(--sans, system-ui, sans-serif); white-space: pre-line; overflow-wrap: anywhere;
}
.gwai-u .gwai-bub {
  background: linear-gradient(135deg, rgba(241, 220, 174, .22), rgba(176, 141, 87, .2));
  border: 1px solid rgba(230, 200, 143, .38); color: var(--gwai-ivory); border-bottom-right-radius: 6px;
}
.gwai-a .gwai-bub {
  background: rgba(255, 255, 255, .055); border: 1px solid rgba(255, 255, 255, .09); color: var(--gwai-text);
  border-bottom-left-radius: 6px;
}
.gwai-sys { align-self: center; max-width: 92%; margin: 4px auto; text-align: center; color: var(--gwai-muted); font-size: 12.5px; line-height: 1.6; }
.gwai-sys.gwai-err { color: #ffc2b8; }
.gwai-retry {
  margin-left: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer; vertical-align: middle;
  background: rgba(230, 200, 143, .12); border: 1px solid var(--gwai-gold); color: var(--gwai-ivory); font-size: 13.5px;
}
.gwai-typing .gwai-bub { display: inline-flex; align-items: center; gap: 5px; padding: 15px 16px; }
.gwai-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--gwai-gold); opacity: .35; animation: gwai-dot 1.2s infinite; }
.gwai-typing i:nth-child(2) { animation-delay: .15s; }
.gwai-typing i:nth-child(3) { animation-delay: .3s; }
.gwai-newpill {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  background: rgba(11, 20, 36, .94); border: 1px solid var(--gwai-gold); color: var(--gwai-ivory);
  font-size: 13.5px; box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}

/* cards under an answer: fixed templates */
.gwai-cards { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 560px; }
.gwai-card {
  padding: 14px; border-radius: 18px; background: rgba(11, 20, 36, .82);
  border: 1px solid var(--gwai-glass-line); box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.gwai-ctitle { margin: 0 0 10px; font: 600 14.5px/1.45 var(--sans, system-ui, sans-serif); color: var(--gwai-gold); }
.gwai-csub { margin: -4px 0 10px; color: var(--gwai-muted); font-size: 12.5px; line-height: 1.55; }
.gwai-cfine { margin: 10px 0 0; color: var(--gwai-muted); font-size: 12.5px; line-height: 1.55; }
.gwai-clink {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; align-self: flex-start;
  color: var(--gwai-gold); text-decoration: none; font-size: 13.5px;
}
.gwai-clink:hover { text-decoration: underline; text-underline-offset: 3px; }
.gwai-clink svg { width: 14px; height: 14px; flex: none; }
.gwai-clinks { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 2px; }
.gwai-cbtn {
  align-self: flex-start; min-height: 44px; margin-top: 4px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  background: var(--gwai-glass); border: 1px solid var(--gwai-glass-line); font-size: 14px; line-height: 1.3;
}
.gwai-cbtn:hover { border-color: rgba(230, 200, 143, .55); }
.gwai .gwai-cprimary {
  background: linear-gradient(135deg, #f1dcae, #c9a464 55%, #9c7637); color: #1a1205; border: 0; font-weight: 600;
}
.gwai .gwai-cprimary:disabled { opacity: .6; cursor: progress; }
.gwai-svc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.gwai-svc-i {
  display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 6px; border-radius: 14px;
  background: var(--gwai-glass); border: 1px solid rgba(255, 255, 255, .08);
}
.gwai-svc-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.gwai-svc-h b { font-weight: 600; font-size: 14.5px; line-height: 1.45; color: var(--gwai-ivory); }
.gwai-svc-e { color: var(--gwai-muted); font-size: 12px; line-height: 1.4; }
.gwai-svc-i p { margin: 0 0 4px; font-size: 13.5px; line-height: 1.65; color: var(--gwai-text); }
.gwai-badge { display: inline-block; padding: 1px 9px; border-radius: 999px; border: 1px solid; font-size: 11.5px; line-height: 1.6; }
.gwai-badge-trial { color: var(--gwai-aqua); border-color: rgba(143, 216, 210, .45); background: rgba(143, 216, 210, .08); }
.gwai-badge-ready { color: var(--gwai-gold); border-color: rgba(230, 200, 143, .4); background: rgba(230, 200, 143, .07); }
.gwai-badge-wait { color: #f3bdb2; border-color: rgba(212, 84, 74, .45); background: rgba(212, 84, 74, .08); }
.gwai-rows { display: flex; flex-direction: column; gap: 6px; }
.gwai-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 12px; border-radius: 14px;
  background: var(--gwai-glass); border: 1px solid rgba(255, 255, 255, .08); color: var(--gwai-text);
  text-decoration: none; text-align: left; cursor: pointer; transition: border-color .2s, background .2s;
}
.gwai-row:hover { border-color: rgba(230, 200, 143, .45); background: rgba(230, 200, 143, .06); }
.gwai-row > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gwai-row b { font-weight: 600; font-size: 14.5px; line-height: 1.4; color: var(--gwai-ivory); }
.gwai-row small { font-size: 12.5px; line-height: 1.55; color: var(--gwai-muted); }
.gwai-row svg { width: 16px; height: 16px; flex: none; color: var(--gwai-gold); }
.gwai-cmp { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; line-height: 1.55; }
.gwai-cmp th, .gwai-cmp td { padding: 9px 6px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(255, 255, 255, .08); overflow-wrap: anywhere; }
.gwai-cmp thead th { color: var(--gwai-gold); font-weight: 600; font-size: 13.5px; }
.gwai-cmp thead th:first-child, .gwai-cmp tbody th { width: 25%; color: var(--gwai-muted); font-weight: 500; }
.gwai-players { display: flex; flex-direction: column; gap: 8px; }
.gwai-player {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px;
  background: var(--gwai-glass); border: 1px solid rgba(255, 255, 255, .08);
}
.gwai-play {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #f1dcae, #c9a464 55%, #9c7637);
}
.gwai .gwai-play { color: #1a1205; }
.gwai-play svg { width: 18px; height: 18px; }
.gwai-pinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gwai-pinfo b { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--gwai-ivory); }
.gwai-pinfo small { font-size: 12px; line-height: 1.45; color: var(--gwai-muted); }
.gwai-pinfo .gwai-perr { color: #ffc2b8; }
.gwai-pbar { height: 3px; margin-top: 5px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.gwai-pbar i { display: block; width: 0; height: 100%; background: var(--gwai-gold); transition: width .25s linear; }

/* the lead form */
.gwai-form { display: flex; flex-direction: column; gap: 10px; }
.gwai-two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.gwai-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12.5px; line-height: 1.4; color: var(--gwai-muted); }
.gwai-field input, .gwai-field select, .gwai-field textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--gwai-glass-line); color: var(--gwai-ivory);
  font: 400 16px/1.45 var(--sans, system-ui, sans-serif); outline: none;   /* 16 px: iOS does not zoom in */
}
.gwai-field textarea { min-height: 72px; resize: vertical; }
.gwai-field select option { background: #0b1424; color: var(--gwai-ivory); }
.gwai-field input:focus, .gwai-field select:focus, .gwai-field textarea:focus { border-color: var(--gwai-gold); box-shadow: 0 0 0 3px rgba(230, 200, 143, .15); }
.gwai-check { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 13.5px; line-height: 1.55; color: var(--gwai-text); }
.gwai-check label { display: flex; align-items: flex-start; gap: 10px; flex: 1 1 240px; min-height: 44px; padding-top: 4px; cursor: pointer; }
.gwai-check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--gwai-gold); }
.gwai-check a { display: inline-flex; align-items: center; min-height: 44px; color: var(--gwai-gold); text-decoration: underline; text-underline-offset: 2px; }
.gwai-ferr { margin: 0; color: #ffc2b8; font-size: 13.5px; line-height: 1.55; }
.gwai-form .gwai-cprimary { align-self: stretch; min-height: 48px; margin-top: 2px; font-size: 15px; }
.gwai-done { margin: 0; color: var(--gwai-aqua); font-size: 15px; line-height: 1.65; }

/* the dock: quick replies · shop alert · call bar · input bar · notes */
.gwai-dock { flex: none; display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.gwai-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gwai-chip {
  min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer; font-size: 14px; line-height: 1.3;
  background: var(--gwai-glass); border: 1px solid var(--gwai-glass-line); color: var(--gwai-text);
  transition: background .2s, border-color .2s;
}
.gwai-chip:hover { background: rgba(230, 200, 143, .12); border-color: rgba(230, 200, 143, .5); }
.gwai .gwai-chip-act { color: var(--gwai-aqua); border-color: rgba(143, 216, 210, .4); }
.gwai-chip-act:hover { background: rgba(143, 216, 210, .1); border-color: rgba(143, 216, 210, .6); }
/* sample shop (18 Nov 2026): the alert the shop's staff would get, shown when the assistant passes the request on */
.gwai-shop {
  margin: 0; padding: 10px 14px; border-radius: 14px; text-align: left;
  background: rgba(143, 216, 210, .08); border: 1px solid rgba(143, 216, 210, .35); color: var(--gwai-text);
  font-size: 13px; line-height: 1.45; animation: gwai-shop-in .35s ease-out;
}
.gwai-shop b { display: block; font-weight: 600; color: var(--gwai-aqua); }
.gwai-shop span { display: block; color: var(--gwai-muted); font-size: 12px; }
.gwai-after { display: flex; flex-wrap: wrap; gap: 8px; }
.gwai-after a, .gwai-after button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  font: 500 14px/1.2 var(--sans, system-ui, sans-serif); text-decoration: none;
  background: var(--gwai-glass); border: 1px solid var(--gwai-glass-line); color: var(--gwai-text);
}
.gwai-after .gwai-primary { background: rgba(230, 200, 143, .14); border-color: var(--gwai-gold); color: var(--gwai-ivory); }
.gwai-after svg { width: 16px; height: 16px; }

/* the call bar: small orb, status, time left, mute, hang up */
.gwai-call {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; border-radius: 22px;
  background: rgba(11, 20, 36, .85); border: 1px solid var(--gwai-glass-line);
}
.gwai-orbbox { position: relative; width: 60px; height: 60px; flex: none; }
/* absolute: a canvas sizes itself from its pixel buffer otherwise and pushes the bar around */
.gwai-orb { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gwai-status { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; color: var(--gwai-text); }
.gwai-status .gwai-sdot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--gwai-gold-2); box-shadow: 0 0 12px currentColor; color: var(--gwai-gold-2); }
.gwai[data-mode="listening"] .gwai-sdot { background: var(--gwai-aqua); color: var(--gwai-aqua); animation: gwai-blink 1.2s infinite; }
.gwai[data-mode="thinking"] .gwai-sdot { background: var(--gwai-ivory); color: var(--gwai-ivory); animation: gwai-blink .5s infinite; }
.gwai[data-mode="speaking"] .gwai-sdot { background: var(--gwai-gold); color: var(--gwai-gold); }
.gwai-status .gwai-stxt { font: 500 14px/1.4 var(--sans, system-ui, sans-serif); letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; }
.gwai-timer {
  flex: none; font: 500 13px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em;
  padding: 8px 10px; border-radius: 999px; background: var(--gwai-glass); border: 1px solid var(--gwai-glass-line);
}
.gwai-timer.low { color: #ffb4a8; border-color: rgba(212, 84, 74, .5); }
.gwai-side {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; cursor: pointer;
  background: var(--gwai-glass); border: 1px solid var(--gwai-glass-line); transition: background .2s;
}
.gwai-side svg { width: 20px; height: 20px; }
.gwai-side[aria-pressed="true"] { background: rgba(212, 84, 74, .2); border-color: var(--gwai-red); }
.gwai-hang {
  width: 48px; height: 48px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #e3685d, #b8392f); box-shadow: 0 8px 24px rgba(212, 84, 74, .35);
}
.gwai .gwai-hang { color: #fff; }
.gwai-hang svg { width: 22px; height: 22px; }
.gwai-hang:disabled { opacity: .6; cursor: progress; }

/* the input bar: always there */
.gwai-bar { display: flex; align-items: center; gap: 8px; }
.gwai-bar input {
  flex: 1; min-width: 0; height: 50px; padding: 0 18px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--gwai-glass-line); color: var(--gwai-ivory);
  font: 400 16px/1 var(--sans, system-ui, sans-serif); outline: none;   /* 16 px: iOS does not zoom in */
}
.gwai-bar input::placeholder { color: #8d897f; }
.gwai-bar input:focus { border-color: var(--gwai-gold); box-shadow: 0 0 0 3px rgba(230, 200, 143, .15); }
.gwai-send {
  width: 48px; height: 48px; border-radius: 50%; flex: none; display: grid; place-items: center; cursor: pointer;
  background: rgba(230, 200, 143, .18); border: 1px solid var(--gwai-gold); transition: opacity .2s, background .2s;
}
.gwai .gwai-send { color: var(--gwai-gold); }
.gwai-send:disabled { opacity: .35; cursor: default; }
.gwai-send svg { width: 20px; height: 20px; }
.gwai-mic {
  position: relative; width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #f6e6c0 0%, #e2c287 40%, #b08d57 100%);
  box-shadow: 0 8px 26px rgba(230, 200, 143, .25), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: transform .2s, filter .3s;
}
.gwai .gwai-mic { color: #1a1205; }
.gwai-mic:hover { transform: translateY(-1px); }
.gwai-mic svg { width: 22px; height: 22px; }
.gwai-mic::after { /* a soft ring that invites a tap */
  content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid rgba(230, 200, 143, .5);
  animation: gwai-ring 2.4s ease-out infinite; pointer-events: none;
}
.gwai-mic:disabled { cursor: progress; filter: saturate(.6) brightness(.8); }
.gwai-mic:disabled::after { animation: none; opacity: 0; }

.gwai-rec { margin: 0; text-align: center; color: #c9c4b7; font-size: 12px; line-height: 1.5; }
.gwai-rec a { color: var(--gwai-gold, #e6c88f); text-decoration: underline; text-underline-offset: 2px; }
.gwai-diag { margin: 0 auto; max-width: 640px; color: #77756f; font-size: 11px; text-align: center; }
.gwai-diag summary { cursor: pointer; }
.gwai-diag code { display: block; margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; color: #a39f96; }

.gwai-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (min-width: 600px) {
  .gwai-svc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gwai-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .gwai { padding-top: max(18px, env(safe-area-inset-top)); padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .gwai-bub { max-width: 78%; }
}
@media (max-width: 560px) {
  .gwai-id small { display: none; }
  .gwai-id svg { width: 30px; height: 30px; }
  .gwai-bub { max-width: 90%; }
  /* quick replies: one swipeable row */
  .gwai-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .gwai-chips::-webkit-scrollbar { display: none; }
  .gwai-chip { flex: none; }
}
@media (max-width: 400px) {
  /* a phone (most iPhones are 375–430 px): the Thai words "ฝากถึงทีม" stay readable — the mark goes and the GW device
     label sits under the name instead (browser test 23 Nov 2026). The longer English words become an icon. */
  .gwai-id svg { display: none; }
  .gwai-staff { display: block; width: max-content; margin: 2px 0 0; }
  .gwai-team { padding: 0 12px 0 10px; gap: 6px; }
  .gwai-top-right { gap: 6px; }
  html[data-lang="en"] .gwai-team { width: 44px; padding: 0; justify-content: center; }
  html[data-lang="en"] .gwai-team span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 340px) {
  /* a very narrow phone: "message the team" becomes an icon in every language (its words stay for screen readers) */
  .gwai-team { width: 44px; padding: 0; justify-content: center; }
  .gwai-team span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-height: 560px) {
  .gwai-rec { font-size: 11px; }
  .gwai-orbbox { width: 48px; height: 48px; }
}

@keyframes gwai-spin { to { transform: rotate(360deg); } }
@keyframes gwai-breathe { 0%, 100% { box-shadow: 0 0 18px rgba(230, 200, 143, .45); } 50% { box-shadow: 0 0 30px rgba(230, 200, 143, .8); } }
@keyframes gwai-ping { 0% { box-shadow: 0 0 0 0 rgba(11, 18, 32, .55); } 100% { box-shadow: 0 0 0 10px rgba(11, 18, 32, 0); } }
@keyframes gwai-blink { 50% { opacity: .35; } }
@keyframes gwai-halo { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.18, 1.45); opacity: 0; } }
@keyframes gwai-ring { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes gwai-drift { from { background-position: 0 0, 0 0; } to { background-position: 0 46px, 46px 0; } }
@keyframes gwai-msg-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes gwai-dot { 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes gwai-shop-in { from { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  .gwai-launch .gwai-mini, .gwai-launch .gwai-mini::before, .gwai-bg::after, .gwai-mic::after, .gwai-cta .gwai-dot,
  .gwai-msg, .gwai-shop, .gwai-live::before { animation: none; }
  .gwai-typing i { animation: none; opacity: .7; }
  .gwai-toast, .gwai-pbar i { transition: none; }
}

/* ---------- AI-first contact card (contact section, dark · 27 Oct 2026) ---------- */
.gwai-desk {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start;
  margin: 28px 0 34px; padding: 24px; border: 1px solid var(--gwai-glass-line); border-radius: 14px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(230, 200, 143, .11), rgba(255, 255, 255, .02) 62%);
}
.gwai-desk h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(20px, 2.2vw, 24px); line-height: 1.35; color: var(--gwai-ivory); margin: 6px 0 8px; }
.gwai-desk p { color: var(--on-dark-muted, #a7a194); margin: 0 0 18px; }
.gwai-desk .gwai-desk-live { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; letter-spacing: .02em; color: var(--gwai-aqua); }
.gwai-desk-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--gwai-aqua); box-shadow: 0 0 0 0 rgba(143, 216, 210, .6); animation: gwai-desk-ping 1.8s ease-out infinite; }
.gwai-desk-orb {
  position: relative; width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6dd 0%, var(--gwai-gold) 22%, var(--gwai-gold-2) 56%, #2a2214 100%);
  box-shadow: 0 0 28px rgba(230, 200, 143, .35); animation: gwai-desk-breathe 3.2s ease-in-out infinite;
}
.gwai-desk-orb span { position: absolute; inset: -8px; border-radius: 50%; border: 1px solid rgba(230, 200, 143, .35); animation: gwai-desk-ring 3.2s ease-out infinite; }
@keyframes gwai-desk-ping { to { box-shadow: 0 0 0 10px rgba(143, 216, 210, 0); } }
@keyframes gwai-desk-breathe { 50% { transform: scale(1.06); box-shadow: 0 0 40px rgba(230, 200, 143, .5); } }
@keyframes gwai-desk-ring { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
@media (max-width: 1040px) { .gwai-desk { grid-template-columns: 1fr; gap: 14px; } }  /* the contact column is narrow up to ~1040px (Fable 🟢9) */
@media (max-width: 560px) { .gwai-desk { padding: 20px; } .gwai-desk-orb { width: 52px; height: 52px; } }
@media (prefers-reduced-motion: reduce) { .gwai-desk-orb, .gwai-desk-orb span, .gwai-desk-pulse { animation: none; } }
