/* Ibrahim's AI companion: bot + chat panel + contact form.
   The site has a single dark theme (no light mode), so this follows it and
   reuses its tokens: --room / --panel navy, --steel, --frost, --current (orange), --arc (cyan). */

.ibc {
  --ibc-room: var(--room, #060B14);
  --ibc-panel: var(--panel, #0C1420);
  --ibc-steel: var(--steel, #93A6BA);
  --ibc-frost: var(--frost, #EAF2F8);
  --ibc-orange: var(--current, #FF8A1E);
  --ibc-cyan: var(--arc, #38BDF8);
  --ibc-alarm: var(--alarm, #FF3B30);
  --ibc-line: rgba(147, 166, 186, .22);
  --ibc-bot-h: 176px;
  --ibc-bot-w: calc(var(--ibc-bot-h) * .725);   /* pose canvas is 261x360 */
  --ibc-edge-r: max(16px, calc(env(safe-area-inset-right, 0px) + 12px));
  --ibc-edge-b: max(14px, calc(env(safe-area-inset-bottom, 0px) + 10px));
  --ibc-edge-t: max(12px, calc(env(safe-area-inset-top, 0px) + 8px));
  --ibc-vvh: 100vh;
  --ibc-kb: 0px;
  font: 400 15px/1.5 var(--sans, 'Archivo', system-ui, sans-serif);
  color: var(--ibc-frost);
}
@media (max-width: 720px) { .ibc { --ibc-bot-h: 100px; } }

.ibc [hidden] { display: none !important; }
.ibc button { font: inherit; color: inherit; }
.ibc .ibc-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ibc :focus-visible { outline: 2px solid var(--ibc-cyan); outline-offset: 2px; }

/* ───────── Shared lighting ─────────
   One light rig drives the bot AND every agent icon (header avatar, minimized bar,
   show pill), so they always look lit the same way. --ibc-key is the cool rim light,
   --ibc-fill the warm bounce from the scene; both shift with the pose (data-light). */
@property --ibc-key  { syntax: '<color>'; inherits: true; initial-value: rgb(56 189 248); }
@property --ibc-fill { syntax: '<color>'; inherits: true; initial-value: rgb(255 138 30); }
@property --ibc-glow { syntax: '<number>'; inherits: true; initial-value: 1; }
.ibc {
  --ibc-key: rgb(56 189 248);
  --ibc-fill: rgb(255 138 30);
  --ibc-glow: 1;
  transition: --ibc-key .5s ease, --ibc-fill .5s ease, --ibc-glow .5s ease;
}
.ibc[data-light="think"]     { --ibc-key: rgb(80 205 255); --ibc-fill: rgb(56 189 248); --ibc-glow: 1.25; }
.ibc[data-light="happy"]     { --ibc-key: rgb(56 189 248); --ibc-fill: rgb(255 158 60); --ibc-glow: 1.2; }
.ibc[data-light="celebrate"] { --ibc-key: rgb(255 176 90); --ibc-fill: rgb(255 138 30); --ibc-glow: 1.45; }
.ibc[data-light="calm"]      { --ibc-key: rgb(147 166 186); --ibc-fill: rgb(255 138 30); --ibc-glow: .7; }

/* Keep the site's own bottom-right control clear of the bot */
body.has-ibc .skip-film { right: calc(var(--ibc-edge-r, 16px) + var(--ibc-bot-w, 128px) + 18px); }
@media (min-width: 721px) {
  body.has-ibc .contact .term { max-width: min(780px, calc(100vw - 2 * var(--gutter) - 150px)); }
}
@media (max-width: 720px) {
  body.has-ibc .skip-film { right: calc(16px + 72px + 14px); }
  body.has-ibc .beat--hero { padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px)); }
  /* Last screen: lift the terminal and footer above the bot so they stay usable */
  body.has-ibc .contact { padding-bottom: calc(100px + 34px + env(safe-area-inset-bottom, 0px)); }
}

/* ───────── Dock + bot ───────── */
.ibc-dock {
  position: fixed; z-index: 40;
  right: var(--ibc-edge-r); bottom: var(--ibc-edge-b);
  width: var(--ibc-bot-w); height: var(--ibc-bot-h);
  pointer-events: none;          /* only the bot itself is clickable */
}
.ibc-bot {
  position: absolute; inset: 0; padding: 0; margin: 0; border: 0; background: none; cursor: pointer;
  pointer-events: auto; -webkit-tap-highlight-color: transparent; border-radius: 40% 40% 18% 18%;
}
.ibc-bot:focus-visible { outline-offset: 4px; }
.ibc-enter, .ibc-lean, .ibc-bob, .ibc-react, .ibc-sprite { position: absolute; inset: 0; display: block; }
.ibc-enter { opacity: 0; }
.ibc.is-in .ibc-enter { opacity: 1; }
.ibc-lean { transform-origin: 50% 100%; transform: rotate(var(--ibc-lean, 0deg)); transition: transform .45s cubic-bezier(.2,.7,.2,1); will-change: transform; }
.ibc-bob { transform-origin: 50% 100%; animation: ibc-bob 3.4s ease-in-out infinite; }
.ibc-react { transform-origin: 50% 100%; }
@keyframes ibc-bob {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50%      { transform: translateY(-3px) scaleY(1.006); }
}
.ibc.is-scrolling .ibc-bob { animation-play-state: paused; }

/* Rim light + glow matched to the scene: cool key from behind-left, warm bounce from the right */
.ibc-sprite {
  filter:
    drop-shadow(0 0 1px color-mix(in srgb, var(--ibc-key) 60%, transparent))
    drop-shadow(-3px -2px 6px color-mix(in srgb, var(--ibc-key) calc(22% * var(--ibc-glow)), transparent))
    drop-shadow(3px 2px 8px color-mix(in srgb, var(--ibc-fill) calc(18% * var(--ibc-glow)), transparent));
}
/* Soft light behind the figure; pulses only while thinking (opacity only, cheap) */
.ibc-halo {
  position: absolute; left: 6%; right: 6%; top: 8%; bottom: 10%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--ibc-key) 22%, transparent), color-mix(in srgb, var(--ibc-fill) 8%, transparent) 60%, transparent);
  opacity: calc(.55 * var(--ibc-glow)); filter: blur(6px);
}
.ibc[data-light="think"] .ibc-halo, .ibc[data-light="think"] .ibc-ico::after { animation: ibc-pulse 1.6s ease-in-out infinite; }
@keyframes ibc-pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.ibc-pose {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%;
  opacity: 0; transform: translateY(3px) scale(.985); transform-origin: 50% 100%;
  transition: opacity .32s ease, transform .38s cubic-bezier(.2,.7,.2,1);
  user-select: none; -webkit-user-drag: none; pointer-events: none;
}
.ibc-pose.is-on { opacity: 1; transform: none; }
.ibc-floor {
  position: absolute; left: 12%; right: 12%; bottom: -5px; height: 12px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
  box-shadow: 0 0 18px 2px color-mix(in srgb, var(--ibc-key) calc(10% * var(--ibc-glow)), transparent);
  pointer-events: none;
}
.ibc-floor::after {
  content: ''; position: absolute; left: 20%; right: 20%; top: 40%; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ibc-key) 45%, transparent), transparent);
  opacity: .7;
}
.ibc-badge {
  position: absolute; top: 4%; right: 6%; width: 12px; height: 12px; border-radius: 50%;
  background: var(--ibc-orange); box-shadow: 0 0 0 2px var(--ibc-room), 0 0 10px rgba(255, 138, 30, .9);
}

/* Tooltip */
.ibc-tip {
  position: absolute; right: calc(100% - 14px); bottom: 64%; width: max-content; max-width: 220px;
  padding: 8px 12px; border-radius: 10px 10px 2px 10px;
  background: rgba(12, 20, 32, .96); border: 1px solid rgba(56, 189, 248, .35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 18px rgba(56, 189, 248, .10);
  font-size: 13px; line-height: 1.35; color: var(--ibc-frost);
  opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; pointer-events: none;
}
.ibc-tip small { display: block; color: var(--ibc-steel); font-size: 11.5px; margin-top: 2px; }
.ibc-dock:hover .ibc-tip, .ibc-bot:focus-visible ~ .ibc-tip { opacity: 1; transform: none; }
.ibc.is-open .ibc-tip { display: none; }
@media (hover: none) { .ibc-tip { display: none; } }

/* Hide control */
.ibc-hide {
  position: absolute; top: 2px; left: -8px; width: 28px; height: 28px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; pointer-events: auto; cursor: pointer;
  background: rgba(12, 20, 32, .92); border: 1px solid var(--ibc-line); color: var(--ibc-steel);
  opacity: 0; transition: opacity .2s, color .2s, border-color .2s;
}
.ibc-hide svg { width: 14px; height: 14px; }
.ibc-dock:hover .ibc-hide, .ibc-hide:focus-visible, .ibc-dock:focus-within .ibc-hide { opacity: 1; }
.ibc-hide:hover { color: var(--ibc-frost); border-color: var(--ibc-cyan); }
@media (hover: none) { .ibc-hide { opacity: .8; width: 32px; height: 32px; top: -6px; left: -14px; } }

.ibc-show {
  position: fixed; z-index: 40; right: var(--ibc-edge-r); bottom: var(--ibc-edge-b);
  display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; min-height: 40px; cursor: pointer;
  border-radius: 99px; background: rgba(12, 20, 32, .92); border: 1px solid var(--ibc-line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4); font-size: 13px; color: var(--ibc-frost);
}
.ibc-show:hover { border-color: var(--ibc-key); }

/* ───────── Panel ───────── */
.ibc-panel {
  position: fixed; z-index: 45;
  right: calc(var(--ibc-edge-r) + var(--ibc-bot-w) + 10px); bottom: var(--ibc-edge-b);
  width: min(390px, calc(100vw - var(--ibc-bot-w) - 48px));
  height: min(600px, calc(100vh - 96px));
  display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, rgba(14, 23, 36, .98), rgba(8, 13, 22, .98));
  border: 1px solid rgba(147, 166, 186, .24); border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6), 0 0 0 1px rgba(0, 0, 0, .4), 0 0 40px rgba(56, 189, 248, .07);
  transform-origin: 100% 100%;
}
.ibc-panel::before { /* thin current line, like the site's experience log */
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--ibc-orange), var(--ibc-cyan) 70%, transparent);
}
.ibc-panel.is-anim { animation: ibc-pop .26s cubic-bezier(.2,.8,.2,1); }
@keyframes ibc-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

.ibc-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px; border-bottom: 1px solid var(--ibc-line); flex: none; }
/* Agent icon: the bot's face, lit by the same rig */
.ibc-ico {
  position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 22%, color-mix(in srgb, var(--ibc-key) 26%, transparent), transparent 55%),
    radial-gradient(circle at 78% 85%, color-mix(in srgb, var(--ibc-fill) 22%, transparent), transparent 60%),
    radial-gradient(circle at 50% 40%, #16263a, #070d16 75%);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--ibc-key) 55%, transparent),
    inset -2px -3px 6px color-mix(in srgb, var(--ibc-fill) calc(14% * var(--ibc-glow)), transparent),
    0 0 10px color-mix(in srgb, var(--ibc-key) calc(20% * var(--ibc-glow)), transparent);
}
.ibc-ico::after { /* outer glow ring: pulses with the bot's halo while thinking */
  content: ''; position: absolute; inset: -2px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ibc-key) 30%, transparent), 0 0 12px color-mix(in srgb, var(--ibc-key) calc(28% * var(--ibc-glow)), transparent);
  opacity: .8;
}
.ibc-ico img {
  position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  filter:
    drop-shadow(0 0 .5px color-mix(in srgb, var(--ibc-key) 60%, transparent))
    drop-shadow(-1px -1px 2px color-mix(in srgb, var(--ibc-key) calc(25% * var(--ibc-glow)), transparent))
    drop-shadow(1px 1px 2px color-mix(in srgb, var(--ibc-fill) calc(20% * var(--ibc-glow)), transparent));
}
.ibc-ico--sm { width: 28px; height: 28px; }
.ibc-head__text { flex: 1; min-width: 0; }
.ibc-head h2 { margin: 0; font-size: 15px; font-weight: 700; font-stretch: 112%; line-height: 1.2; letter-spacing: -.005em; }
.ibc-head p { margin: 1px 0 0; font-size: 12px; color: var(--ibc-steel); display: flex; align-items: center; gap: 6px; }
.ibc-head p i { width: 7px; height: 7px; border-radius: 50%; background: var(--ibc-key); box-shadow: 0 0 8px color-mix(in srgb, var(--ibc-key) 75%, transparent); flex: none; }
.ibc-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; padding: 0; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--ibc-steel); cursor: pointer; }
.ibc-icon:hover { color: var(--ibc-frost); background: rgba(147, 166, 186, .1); }
.ibc-icon svg { width: 16px; height: 16px; }

.ibc-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* Messages */
.ibc-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; scrollbar-color: #26364a transparent; }
.ibc-msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; white-space: normal; }
.ibc-msg--bot { align-self: flex-start; background: #111C2B; border: 1px solid #1C2A3C; border-bottom-left-radius: 3px; color: #DCE6EF; }
.ibc-msg--user { align-self: flex-end; background: linear-gradient(180deg, #16314A, #122739); border: 1px solid rgba(56, 189, 248, .28); border-bottom-right-radius: 3px; white-space: pre-wrap; }
.ibc-msg--user.is-failed { border-color: rgba(255, 138, 30, .55); }
.ibc-msg--note { align-self: center; max-width: 100%; padding: 4px 10px; border-radius: 99px; font-size: 12.5px; color: #9FE2B5; background: rgba(74, 222, 128, .08); border: 1px solid rgba(74, 222, 128, .25); }
.ibc-msg p { margin: 0; }
.ibc-msg p + p, .ibc-msg p + ul, .ibc-msg ul + p, .ibc-msg p + ol, .ibc-msg ol + p { margin-top: .55em; }
.ibc-msg ul, .ibc-msg ol { margin: 0; padding-left: 1.2em; }
.ibc-msg ul { list-style: disc; }
.ibc-msg ol { list-style: decimal; }
.ibc-msg li + li { margin-top: .2em; }
.ibc-msg li::marker { color: var(--ibc-orange); }
.ibc-msg strong { color: var(--ibc-frost); font-weight: 700; }
.ibc-msg code { font: 400 .88em var(--mono, ui-monospace, monospace); background: rgba(147, 166, 186, .12); padding: 1px 5px; border-radius: 4px; }
.ibc-msg a { color: var(--ibc-cyan); text-underline-offset: 3px; }
.ibc-msg__label { display: block; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ibc-steel); margin-bottom: 3px; }
.ibc-fail { align-self: flex-end; max-width: 92%; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 10px; margin-top: -4px; font-size: 12.5px; color: #FFB877; text-align: right; }
.ibc-fail button { border: 1px solid rgba(255, 138, 30, .5); background: rgba(255, 138, 30, .08); color: var(--ibc-frost); border-radius: 99px; padding: 3px 12px; cursor: pointer; font-size: 12.5px; }
.ibc-fail button:hover { background: rgba(255, 138, 30, .18); }

.ibc-typing { align-self: flex-start; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; border-bottom-left-radius: 3px; background: #111C2B; border: 1px solid #1C2A3C; font-size: 13px; color: var(--ibc-steel); }
.ibc-typing span { display: inline-flex; gap: 4px; }
.ibc-typing b { width: 6px; height: 6px; border-radius: 50%; background: var(--ibc-cyan); opacity: .35; animation: ibc-dot 1.1s infinite ease-in-out; }
.ibc-typing b:nth-child(2) { animation-delay: .15s; }
.ibc-typing b:nth-child(3) { animation-delay: .3s; }
@keyframes ibc-dot { 0%, 80%, 100% { opacity: .3; transform: none; } 40% { opacity: 1; transform: translateY(-2px); } }

.ibc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.ibc-chip { border: 1px solid rgba(56, 189, 248, .3); background: rgba(56, 189, 248, .06); color: #CFE6F5; border-radius: 99px; padding: 6px 11px; font-size: 13px; line-height: 1.25; cursor: pointer; text-align: left; }
.ibc-chip:hover { background: rgba(56, 189, 248, .14); border-color: rgba(56, 189, 248, .55); }
.ibc-chip:disabled { opacity: .5; cursor: default; }

/* Composer */
.ibc-compose { flex: none; padding: 8px 12px 10px; border-top: 1px solid var(--ibc-line); }
.ibc-compose__row { display: flex; align-items: flex-end; gap: 8px; background: #070D16; border: 1px solid #1F2C3B; border-radius: 12px; padding: 6px 6px 6px 12px; transition: border-color .2s; }
.ibc-compose__row:focus-within { border-color: var(--ibc-cyan); }
.ibc-compose textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: none; color: var(--ibc-frost); font: inherit; font-size: 16px; /* 16px stops iOS zoom */ line-height: 1.45; max-height: 7.5em; padding: 5px 0; caret-color: var(--ibc-orange); }
.ibc-compose textarea:focus-visible { outline: none; }
.ibc-compose textarea::placeholder { color: #6E8195; }
.ibc-send { flex: none; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; background: var(--ibc-orange); color: #160A00; cursor: pointer; transition: filter .2s, opacity .2s; }
.ibc-send:hover { filter: brightness(1.08); }
.ibc-send:disabled { opacity: .4; cursor: default; filter: none; }
.ibc-send svg { width: 17px; height: 17px; }
.ibc-compose__meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 11.5px; color: #7D90A4; }
.ibc-count.is-near { color: #FFB877; }
.ibc-count.is-max { color: #FF8A80; }
.ibc-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.ibc-contact-btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(255, 138, 30, .55); background: rgba(255, 138, 30, .08); color: var(--ibc-frost); border-radius: 99px; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.ibc-contact-btn:hover { background: rgba(255, 138, 30, .18); }
.ibc-contact-btn svg { width: 14px; height: 14px; color: var(--ibc-orange); }
.ibc-disclaimer { font-size: 11px; color: #6E8195; text-align: right; }

/* Contact form */
.ibc-form { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ibc-form h3 { margin: 0; font-size: 16px; font-weight: 700; font-stretch: 112%; }
.ibc-form__note { margin: 0; font-size: 13px; color: #AFC0D0; }
.ibc-field { display: flex; flex-direction: column; gap: 4px; }
.ibc-field label { font-size: 13px; font-weight: 600; color: #DCE6EF; }
.ibc-field input, .ibc-field textarea { width: 100%; background: #070D16; border: 1px solid #1F2C3B; border-radius: 9px; padding: 9px 11px; color: var(--ibc-frost); font: inherit; font-size: 16px; outline: none; transition: border-color .2s; }
.ibc-field textarea { min-height: 110px; resize: vertical; }
.ibc-field input:focus, .ibc-field textarea:focus { border-color: var(--ibc-cyan); }
.ibc-field [aria-invalid="true"] { border-color: #FF8A80; }
.ibc-field__err { font-size: 12.5px; color: #FF9F96; min-height: 0; }
.ibc-field__meta { display: flex; justify-content: space-between; font-size: 11.5px; color: #7D90A4; }
.ibc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.ibc-form__err { margin: 0; padding: 9px 12px; border-radius: 9px; font-size: 13px; background: rgba(255, 59, 48, .08); border: 1px solid rgba(255, 59, 48, .35); color: #FFC9C4; }
.ibc-form__row { display: flex; gap: 8px; justify-content: space-between; align-items: center; margin-top: 2px; }
.ibc-btn { border-radius: 99px; padding: 9px 18px; font-size: 14px; cursor: pointer; border: 1px solid var(--ibc-line); background: none; }
.ibc-btn:hover { border-color: var(--ibc-steel); }
.ibc-btn--primary { background: var(--ibc-orange); border-color: var(--ibc-orange); color: #160A00 !important; font-weight: 700; }
.ibc-btn--primary:hover { filter: brightness(1.08); }
.ibc-btn:disabled { opacity: .55; cursor: default; filter: none; }
.ibc-done { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 24px; }
.ibc-done h3 { margin: 0; font-size: 18px; }
.ibc-done p { margin: 0; color: #AFC0D0; font-size: 14px; max-width: 30ch; }
.ibc-done__icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(74, 222, 128, .1); border: 1px solid rgba(74, 222, 128, .4); color: #4ADE80; }

/* Minimized bar */
.ibc-mini {
  position: fixed; z-index: 41; right: calc(var(--ibc-edge-r) + var(--ibc-bot-w) + 10px); bottom: calc(var(--ibc-edge-b) + 8px);
  display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 99px; cursor: pointer;
  background: rgba(12, 20, 32, .96); border: 1px solid color-mix(in srgb, var(--ibc-key) 35%, transparent); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); font-size: 13px;
}
.ibc-mini em { font-style: normal; color: var(--ibc-orange); }

/* ───────── Phones: the panel becomes a sheet and the bot steps aside ───────── */
@media (max-width: 720px) {
  .ibc-panel {
    left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px));
    bottom: calc(var(--ibc-kb) + max(8px, env(safe-area-inset-bottom, 0px)));
    width: auto;
    height: min(640px, calc(var(--ibc-vvh) - var(--ibc-edge-t) - max(8px, env(safe-area-inset-bottom, 0px)) - 8px));
    border-radius: 14px;
  }
  .ibc.is-open .ibc-dock { opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; }
  .ibc-mini { right: calc(var(--ibc-edge-r) + var(--ibc-bot-w) + 8px); bottom: calc(var(--ibc-edge-b) + 20px); max-width: calc(100vw - var(--ibc-bot-w) - 44px); }
  .ibc-disclaimer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ibc-bob { animation: none; }
  .ibc-lean { transition: none; transform: none; }
  .ibc-pose { transform: none; transition: opacity .16s linear; }
  .ibc-panel.is-anim { animation: none; }
  .ibc-typing b { animation: none; opacity: .7; }
  .ibc, .ibc-halo, .ibc-ico::after { transition: none; animation: none !important; }
  .ibc-tip { transition: none; }
}
