.survey-dialog {
  box-sizing: border-box;
  width: min(52rem, calc(100% - 2rem));
  height: min(58rem, calc(100% - 3rem));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #fbf5ea;
  color: #2b1219;
  font: 500 1rem/1.35 WilderOutfit, Outfit, system-ui, sans-serif;
}
.survey-dialog[open] { display: flex; flex-direction: column; }
.survey-dialog::backdrop { background: rgb(43 18 25 / 68%); }
html:has(.survey-dialog[open]) { overflow: hidden; }
.survey-dialog-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0 1.25rem;
  padding: .6rem 1rem;
  border-bottom: 1px solid #d9c6a6;
}
.survey-dialog-bar h2 { margin: 0; font-size: 1.3rem; line-height: 1.2; }
.survey-dialog-bar a, .survey-dialog-bar button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  box-sizing: border-box;
  font: inherit;
}
.survey-direct { color: #75203e; text-underline-offset: .18em; }
.survey-close {
  padding: .45rem .95rem;
  border: 1px solid #704f47;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.survey-dialog :focus-visible { outline: 3px solid #98224a; outline-offset: 2px; }
.survey-frame-box { flex: 1; min-height: 0; position: relative; }
.survey-frame-box iframe { display: block; width: 100%; height: 100%; border: 0; background: white; }
.survey-frame-box [hidden] { display: none; }
.survey-loading {
  position: absolute;
  top: 0; left: 0; right: 0;
  margin: 0;
  padding: 1rem;
  text-align: center;
  pointer-events: none;
}
.feedback-entry { margin-top: 12px; }
.feedback-trigger {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 .6em;
  min-height: 44px; margin: 0; padding: 0; border: 0; background: transparent;
  color: #385445; font: 600 14px/1.35 WilderOutfit, Outfit, sans-serif; cursor: pointer;
}
.feedback-trigger strong { padding: .36em .75em; border: 1px solid #8a9b8a; border-radius: 100px; font-weight: 600; }
.feedback-trigger span { color: #62534b; font-weight: 450; }
.feedback-entry-button { display: flex; width: fit-content; margin-top: 12px; }
.feedback-trigger::-webkit-details-marker { display: none; }
.feedback-trigger:hover strong { background: #e4e9dc; }
.feedback-dialog.survey-dialog {
  width: min(27rem, calc(100% - 2rem)); height: fit-content; max-height: calc(100dvh - 2rem);
  overflow: auto; border-radius: 18px; padding: 0;
}
.feedback-dialog .survey-dialog-bar { grid-template-columns: 1fr auto; padding: .65rem 1rem; }
.feedback-dialog .survey-close { grid-row: 1; }
.survey-dialog [hidden] { display: none; }
.feedback-form { display: grid; gap: .85rem; padding: 1.15rem; color: #34202a; }
.feedback-entry .feedback-form { max-width: 24rem; border: 1px solid #d9c6a6; border-radius: 14px; background: #fbf5ea; }
.feedback-form label { font-size: 1rem; line-height: 1.4; font-weight: 550; }
.feedback-form textarea {
  display: block; box-sizing: border-box; width: 100%; min-height: 6rem; padding: .72rem;
  border: 1px solid #9c8979; border-radius: 10px; background: #fffaf3; color: inherit;
  font: 450 16px/1.4 WilderOutfit, Outfit, system-ui, sans-serif; resize: vertical;
}
.feedback-send button {
  display: inline-flex; align-items: center; gap: .75rem; min-height: 44px; padding: .55rem 1rem;
  border: 0; border-radius: 40px; background: #34202a; color: #fffaf3; font: inherit; font-weight: 600; cursor: pointer;
}
.feedback-send button:hover { background: #5b2b40; }
.feedback-send button:disabled { opacity: .7; cursor: wait; }
.feedback-status { margin: 0; color: #385445; font-size: .94rem; }
.feedback-status:empty { display: none; }
.feedback-email { color: #75203e; font-size: .9rem; text-underline-offset: .2em; }
@media (max-width: 600px) {
  .survey-dialog {
    width: 100%;
    height: 100%;
    height: 100dvh;
    border-radius: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .survey-dialog-bar {
    grid-template-columns: 1fr auto;
    gap: 0 .4rem;
    padding: calc(.4rem + env(safe-area-inset-top)) 1rem .1rem;
  }
  .survey-direct { grid-row: 2; justify-self: start; font-size: .9rem; }
  .survey-close { grid-row: 1 / 3; grid-column: 2; }
}
