.support {
  --chat-ink: #382c2d;
  --chat-paper: #f9f2e6;
  --chat-edge: max(1rem, env(safe-area-inset-right));
  --chat-bottom: max(1rem, env(safe-area-inset-bottom));
  color-scheme: light;
  font-family: Studio, Arial, sans-serif;
}
.support button {cursor:pointer;font:inherit}
.support-launch {
  position:fixed;z-index:7;right:var(--chat-edge);bottom:var(--chat-bottom);
  display:flex;align-items:center;gap:.45rem;min-width:56px;height:56px;padding:0 .85rem 0 .5rem;border-radius:21px;
  background:#35282d;border:1px solid #dec5a6;color:#f0d7ae;
  box-shadow:0 5px 22px #21131750,inset 0 0 0 3px #49383c;
}
.support-launch span {font-size:.8rem;white-space:nowrap}
.support-launch .support-face {flex:none}
.support-launch:hover .support-face {transform:rotate(-5deg)}
.support dialog {
  position:fixed;inset:auto var(--chat-edge) var(--chat-bottom) auto;margin:0;
  width:min(24rem,calc(100vw - 2rem));max-width:none;max-height:none;
  padding:0;border:1px solid #c5b59c;border-radius:20px;overflow:hidden;
  background:var(--chat-paper);color:var(--chat-ink);box-shadow:0 20px 65px #13201840;
}
.support dialog::backdrop {background:#15211938}
.support-layout {height:min(31rem,calc(100dvh - 2rem));display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.support-head {display:flex;align-items:center;gap:.7rem;padding:.85rem 1rem;background:#412d32;color:#f7efdf}
.support-head strong,.support-head small {display:block}
.support-head strong {font:italic 1.5rem/1.2 Editorial,Georgia,serif}
.support-head small {font-size:.61rem;letter-spacing:.14em;color:#e0c8a9;margin-top:.3rem}
.support-close {margin-left:auto;color:inherit;border:0;background:transparent;min-width:44px;min-height:44px}
.support .support-close {font-size:1.65rem}
.support-body {overflow:auto;overscroll-behavior:contain;padding:1.1rem}
.support-welcome {margin:.35rem 0 1rem;font:1.5rem/1.15 Georgia,serif;letter-spacing:-.035em}
.support-prompts {display:flex;flex-wrap:wrap;gap:.4rem}
.support-prompts button {background:transparent;color:inherit;border:1px solid #b4b29f;padding:.55rem .75rem;border-radius:18px;font-size:.82rem;min-height:44px}
.support-log {display:grid;gap:.65rem}
.support-log:not(:empty){margin-top:1rem}
.support-log>div {padding:.7rem .85rem;max-width:92%;font-size:.9rem;line-height:1.5;overflow-wrap:anywhere}
.support-log p {white-space:pre-line;margin:0}
.support-visitor {justify-self:end;background:#543940;color:#faf3e7;border-radius:14px 14px 3px 14px}
.support-answer {justify-self:start;background:#e8e2d5;border-radius:14px 14px 14px 3px}
.support-answer a {display:inline-block;margin-top:.5rem;color:inherit;text-underline-offset:.2em}
.support-compose {padding:.8rem 1rem 1rem;border-top:1px solid #d7cdbb}
.support-compose label {display:block;font-size:.72rem;line-height:1.4;margin-bottom:.55rem}
.support-compose>div {display:flex;gap:.45rem}
.support-compose input {min-width:0;flex:1;border:1px solid #b7b39f;border-radius:10px;background:#fffaf0;color:inherit;font-size:1rem;padding:.6rem}
.support-compose button {border:0;background:#412d32;color:#faf3e7;border-radius:10px;padding:.6rem .85rem;min-height:44px}
.support :focus-visible {outline:2px solid #9a6535;outline-offset:2px}
.support-head :focus-visible {outline-color:#f3d2a7}
@media(prefers-reduced-motion:no-preference){
  .support-face {transition:transform .2s ease}
  .support dialog[open] {animation:support-open .22s ease-out;transform-origin:bottom right}
  @keyframes support-open {from{opacity:0;transform:translateY(6px) scale(.985)}}
}

.support-prompts button:is(:hover,:focus-visible) { background:#e7dbcd; }
.support-compose button:hover { background:#5c3e45; }
@media(max-width:430px) {
  .support {
    position:absolute;
    inset:0;
    pointer-events:none;
  }
  .support-launch,
  .support dialog { pointer-events:auto; }
  .support-launch {
    position:absolute;
    right:max(.75rem,env(safe-area-inset-right));
    bottom:max(.75rem,env(safe-area-inset-bottom));
    min-width:52px;
    width:52px;
    height:52px;
    padding:5px;
    border-radius:18px;
  }
  .support-launch span {
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
    border:0;
  }
  .support dialog {
    right:max(.5rem,env(safe-area-inset-right));
    bottom:max(.5rem,env(safe-area-inset-bottom));
    width:calc(100vw - max(1rem,env(safe-area-inset-left) + env(safe-area-inset-right)));
    overscroll-behavior:contain;
  }
  .support-layout { height:min(22rem,calc(100dvh - 1rem - env(safe-area-inset-bottom))); }
  .support-head { padding-block:.55rem; }
  .support-body { padding:.85rem 1rem; }
  .support-compose { padding-block:.65rem; }
}
