#palm-layla-chat {
  --plc-accent: #f7941d;
  --plc-ink: #000;
  --plc-bottom: 20px;
  --plc-gap: max(16px, env(safe-area-inset-right, 0px));
  --plc-offset: calc(var(--plc-bottom) + env(safe-area-inset-bottom, 0px) + var(--plc-keyboard, 0px));
  --plc-view-height: 100dvh;
  position: fixed;
  right: var(--plc-gap);
  bottom: var(--plc-offset);
  z-index: 999990;
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  color: #142536;
}
#palm-layla-chat *, #palm-layla-chat *::before, #palm-layla-chat *::after { box-sizing: border-box; }
#palm-layla-chat [hidden] { display: none !important; }
#palm-layla-chat[data-position="left"] { left: max(16px, env(safe-area-inset-left, 0px)); right: auto; }
#palm-layla-chat button, #palm-layla-chat a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
#palm-layla-chat .plc-launcher {
  display: flex; align-items: center; justify-content: center; gap: 11px;
  min-height: 58px; max-width: calc(100vw - 32px); padding: 14px 22px;
  margin: 0; border: 1px solid #00000012; border-radius: 999px;
  background: var(--plc-accent); color: var(--plc-ink);
  font: 700 15px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: none; letter-spacing: normal; cursor: pointer;
  box-shadow: 0 8px 26px #03152130, 0 2px 5px #03152116;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
#palm-layla-chat .plc-launcher:hover { transform: translateY(-2px); box-shadow: 0 10px 30px #03152140; }
#palm-layla-chat svg { display: block; width: 23px; height: 23px; flex: 0 0 auto; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#palm-layla-chat .plc-panel {
  display: flex; flex-direction: column; overflow: hidden;
  position: absolute; bottom: 74px; right: 0;
  width: min(420px, calc(var(--plc-view-width, 100vw) - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  height: min(650px, calc(var(--plc-view-height) - var(--plc-bottom) - 100px - env(safe-area-inset-bottom, 0px)));
  margin: 0; padding: 0; border: 1px solid #dbe2e7; border-radius: 20px;
  background: #f4f2ed; box-shadow: 0 24px 80px #03152135, 0 3px 16px #03152114;
  animation: plc-open 180ms ease-out;
}
#palm-layla-chat[data-position="left"] .plc-panel { left: 0; right: auto; }
#palm-layla-chat .plc-toolbar {
  display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto;
  min-height: 65px; gap: 10px; padding: 10px 12px 10px 20px;
  background: #031521; color: #fff; border: 0; margin: 0;
}
#palm-layla-chat .plc-toolbar strong { display: block; font: 700 17px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #fff; }
#palm-layla-chat .plc-toolbar span { display: block; font: 400 12px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #d1dce3; }
#palm-layla-chat .plc-actions { display: flex; align-items: center; gap: 3px; }
#palm-layla-chat .plc-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; margin: 0; border: 0; border-radius: 10px; background: transparent; color: #fff; text-decoration: none; cursor: pointer; box-shadow: none; }
#palm-layla-chat .plc-icon:hover { background: #ffffff20; color: #fff; }
#palm-layla-chat .plc-content { position: relative; flex: 1 1 auto; min-height: 0; }
#palm-layla-chat .plc-frame { display: block; width: 100%; height: 100%; max-width: none; padding: 0; margin: 0; border: 0; background: #fff; }
#palm-layla-chat .plc-loading { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 15px; background: #f4f2ed; color: #142536; font-size: 15px; }
#palm-layla-chat .plc-loading-link { color: #234b6a; font-size: 13px; text-decoration: underline; }
#palm-layla-chat .plc-spinner { width: 28px; height: 28px; border: 3px solid #d5dce0; border-top-color: #234b6a; border-radius: 50%; animation: plc-spin 900ms linear infinite; }
#palm-layla-chat :is(button,a):focus-visible { outline: 3px solid #4285f4; outline-offset: 3px; }
#palm-layla-chat .plc-icon:focus-visible { outline-color: #f7941d; outline-offset: -3px; }
@keyframes plc-spin { to { transform: rotate(360deg); } }
@keyframes plc-open { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 480px) {
  #palm-layla-chat { --plc-bottom: 12px !important; --plc-gap: max(12px, env(safe-area-inset-right, 0px)); }
  #palm-layla-chat[data-position="left"] { left: max(12px, env(safe-area-inset-left, 0px)); }
  #palm-layla-chat .plc-panel { width: calc(var(--plc-view-width, 100vw) - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); bottom: 68px; border-radius: 16px; height: min(680px, calc(var(--plc-view-height) - 96px - env(safe-area-inset-bottom, 0px))); }
  #palm-layla-chat .plc-launcher { min-height: 54px; padding: 13px 18px; }
}
@media (max-height: 480px) {
  #palm-layla-chat.plc-is-open .plc-launcher { display: none; }
  #palm-layla-chat .plc-panel { bottom: 0; height: calc(var(--plc-view-height) - 24px - env(safe-area-inset-bottom, 0px)); }
  #palm-layla-chat.plc-is-open { --plc-bottom: 12px !important; }
}
@media (prefers-reduced-motion: reduce) {
  #palm-layla-chat *, #palm-layla-chat *::before, #palm-layla-chat *::after { animation: none !important; transition: none !important; }
}
@media print { #palm-layla-chat { display: none !important; } }
