* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  font: 15px/1.5 system-ui, sans-serif;
  color: #202124;
  background: #fff;
}
#fabric-tools {
  position: fixed;
  z-index: 3;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
}
[data-do="menu"] {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #e5e5e5;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 10px #0001;
}
.menu-icon {
  flex: none;
  width: 16px;
  height: 16px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  padding: 5px 8px;
  cursor: pointer;
}
button:hover,
button:focus-visible {
  background: #f2f2f2;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
#menu {
  position: absolute;
  right: 0;
  bottom: 48px;
  width: max-content;
  min-width: 174px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 80px);
  overflow: auto;
  padding: 5px;
  border: 1px solid #e8e8e8;
  box-shadow: 0 6px 24px #0002;
  border-radius: 11px;
  background: #fff;
}
#menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
}
main iframe {
  display: block;
  width: 100%;
  height: 100dvh;
  border: none;
  background: white;
}
.landing {
  width: min(100% - 40px, 680px);
  margin: clamp(64px, 13vh, 148px) auto 84px;
}
.landing h1 {
  font: 650 clamp(42px, 9vw, 84px)/.98 Georgia, serif;
  letter-spacing: -.06em;
  margin: 0 0 25px;
}
.landing .intro {
  font: 23px/1.46 Georgia, serif;
  max-width: 580px;
}
.landing section {
  margin: 48px 0;
}
.landing h2 {
  font-size: 22px;
  margin: 0 0 14px;
}
.landing dl {
  display: grid;
  gap: 16px;
  margin: 0;
}
.landing dt {
  font-weight: 650;
}
.landing dd {
  margin: 2px 0 0;
  color: #50545a;
}
.landing button,
#submit,
#agent-send {
  background: #24272a;
  color: white;
  padding: 8px 13px;
}
dialog {
  border: 1px solid #deded5;
  border-radius: 12px;
  width: min(500px, 94vw);
  max-height: 90dvh;
  color: inherit;
  padding: 20px;
}
dialog::backdrop {
  background: #2227;
}
dialog h2 {
  margin: 0 0 12px;
  font-size: 20px;
}
label {
  display: grid;
  gap: 3px;
  margin: 10px 0;
}
input,
select,
textarea {
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 7px;
  min-width: 0;
}
textarea {
  min-height: 100px;
}
textarea.code {
  width: 100%;
  height: 40vh;
  font: 13px monospace;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 15px;
}
#status:not(:empty) {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: #20251fee;
  color: white;
  padding: 7px 12px;
  border-radius: 6px;
  pointer-events: none;
}
#error {
  color: #8e2020;
}
#fields img {
  display: block;
  max-width: 100%;
  max-height: 140px;
}
#fields small {
  display: block;
  color: #62625b;
}
dialog {
  background: #fff;
  box-shadow: 0 12px 50px #0002;
}
dialog:has(input[type="email"]) { width: min(390px, 94vw); }
#agent-panel {
  position: fixed;
  z-index: 4;
  inset: 0 0 0 auto;
  width: min(410px, 100vw);
  display: flex;
  flex-direction: column;
  border-left: 1px solid #e4e4e4;
  box-shadow: -8px 0 28px #0001;
  background: white;
}
#agent-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}
#agent-panel h2 { margin: 0; font-size: 17px; }
#agent-close { font-size: 22px; line-height: 1; }
#agent-thread {
  flex: 1;
  overflow-y: auto;
  padding: 8px 18px 22px;
}
#agent-thread article { margin: 0 0 22px; }
#agent-thread p { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#agent-thread small { color: #555; }
#agent-form {
  padding: 14px;
  border-top: 1px solid #ececec;
}
#agent-message {
  display: block;
  width: 100%;
  resize: vertical;
  border: 0;
  padding: 8px 4px;
}
#agent-drop {
  border: 1px dashed #c6c6c6;
  border-radius: 6px;
  padding: 6px;
  color: #525252;
  font-size: 13px;
  margin: 4px 0 8px;
}
#agent-drop[data-active] { background: #f2f5ff; }
#agent-attachments { display: flex; flex-wrap: wrap; gap: 6px; }
.attachment { display: flex; align-items: start; gap: 3px; }
.attachment span { max-width: 160px; overflow-wrap: anywhere; padding: 6px; }
.attachment img { width: 88px; height: 62px; object-fit: cover; border: 1px solid #eee; border-radius: 4px; }
.attachment button { padding: 1px 5px; }
#agent-error { color: #8e2020; margin: 6px 0; }
#agent-error:empty { display: none; }
