html.egq-is-open { overflow: hidden; }

dialog.egq {
  --egq-ink: #102840;
  --egq-primary: #1858bf;
  --egq-line: #cbd3d5;
  --egq-paper: #f8f7f3;
  --egq-ice: #edf3f9;
  --egq-slate: #486175;
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: min(100% - 2rem, 39rem);
  height: max-content;
  max-width: none;
  max-height: min(90vh, 48rem);
  max-height: min(90dvh, 48rem);
  margin: auto;
  padding: 0;
  border: 1px solid #d9dedb;
  border-radius: 22px;
  color: var(--egq-ink);
  background: #fff;
  box-shadow: 0 24px 72px rgba(23, 39, 53, .18);
  font: 400 16px/1.5 Inter, Arial, sans-serif;
  text-align: left;
  overflow: auto;
  overscroll-behavior: contain;
  color-scheme: light;
}
.egq:not([open]), .egq [hidden] { display: none !important; }
.egq::backdrop { background: rgba(35, 47, 55, .32); }
.egq *, .egq *::before, .egq *::after { box-sizing: border-box; }
.egq .egq-shell { padding: 0; }
.egq .egq-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 11px 32px;
  background: #fff;
}
.egq .egq-label {
  margin: 0;
  color: var(--egq-ink);
  flex: 1;
  font: 650 19px/1.35 Barlow, Arial, sans-serif;
  letter-spacing: -.015em;
}
.egq #egq-count { color: var(--egq-slate); font-size: 16px; }
.egq button, .egq input, .egq select, .egq textarea {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
}
.egq button { cursor: pointer; }
.egq button:focus-visible, .egq :is(input, select, textarea):focus-visible {
  outline: 3px solid #1858bf;
  outline-offset: 3px;
}
.egq .egq-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--egq-paper);
  border: 1px solid #e3e4df;
  border-radius: 50%;
  color: var(--egq-ink);
}
.egq .egq-close:hover { background: #ebeeeb; }
.egq .egq-close svg { display: block; width: 21px; height: 21px; }
.egq .egq-body { padding: 0 32px 30px; }
.egq .egq-bars { display: flex; gap: 5px; }
.egq .egq-bars i { flex: 1; display: block; height: 3px; border-radius: 3px; background: #e1e4e1; }
.egq .egq-bars i.egq-active { background: var(--egq-primary); }
.egq h2 {
  margin: 25px 0 22px;
  color: var(--egq-ink);
  font: 650 clamp(29px, 5vw, 39px)/1.1 Barlow, Arial, sans-serif;
  letter-spacing: -.035em;
  text-transform: none;
}
.egq h2:focus { outline: 0; }
.egq .egq-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.egq .egq-choices, .egq .egq-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.egq .egq-choices label {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) 17px;
  align-items: center;
  gap: 10px;
  min-height: 65px;
  margin: 0;
  padding: 12px 13px;
  border: 1px solid var(--egq-line);
  border-radius: 11px;
  background: var(--egq-paper);
  font-weight: 600;
  cursor: pointer;
}
.egq .egq-choices label:hover { border-color: var(--egq-primary); }
.egq .egq-choices label:has(input:checked) { border-color: var(--egq-primary); box-shadow: inset 0 0 0 1px var(--egq-primary); background: #f0f5ff; }
.egq .egq-pane-icon { grid-column: 1; grid-row: 1; width: 31px; height: 30px; fill: none; stroke: var(--egq-slate); stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.egq .egq-choices label:has(input:checked) .egq-pane-icon { stroke: var(--egq-primary); }
.egq .egq-choices label span { grid-column: 2; grid-row: 1; }
.egq .egq-choices input {
  grid-column: 3;
  grid-row: 1;
  appearance: auto;
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--egq-primary);
}
.egq .egq-field { display: grid; gap: 6px; min-width: 0; margin: 0; font-weight: 600; }
.egq #egq-detail-wrap, .egq #egq-manual-wrap { margin-top: 18px; }
.egq .egq-damage-field { margin-top: 14px; }
.egq .egq-damage-field label { margin: 0; font: inherit; }
.egq .egq-damage-field textarea { resize: vertical; }
.egq #egq-damage-hint { font-size: 16px; font-weight: 400; color: var(--egq-slate); }
.egq #egq-view-damage { white-space: pre-wrap; }
.egq .egq-field :is(input, select, textarea) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #849aaf;
  border-radius: 9px;
  background: #fff;
  font-weight: 400;
  color: var(--egq-ink);
}
.egq :is(input, textarea)::placeholder { color: #5d7183; opacity: 1; }
.egq .egq-field select { appearance: auto; }
.egq .egq-contact { min-width: 0; margin: 14px 0 0; padding: 0; border: 0; }
.egq .egq-contact legend { margin-bottom: 10px; padding: 0; font-weight: 650; }
.egq .egq-disclosure { margin: 12px 0 0; color: var(--egq-slate); font-size: 16px; }
.egq button:disabled { cursor: wait; opacity: .65; }
.egq [aria-invalid="true"] { border-color: #a22a24; }
.egq .egq-error { margin: 16px 0 0; color: #942620; font-size: 16px; }
.egq .egq-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.egq .egq-primary, .egq .egq-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  margin: 0;
  padding: 10px 18px;
  border: 1px solid var(--egq-primary);
  border-radius: 9px;
  background: var(--egq-primary);
  color: white;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.3;
}
.egq .egq-primary:hover { background: #124896; border-color: #124896; }
.egq .egq-secondary { color: var(--egq-ink); border-color: var(--egq-line); background: #fff; }
.egq .egq-secondary:hover { border-color: var(--egq-slate); background: var(--egq-ice); }
.egq .egq-note { margin: -5px 0 15px; color: var(--egq-slate); font-size: 16px; line-height: 1.5; }
.egq .egq-summary { margin: 0; padding: 3px 17px; border: 1px solid #dcdfd9; background: var(--egq-paper); border-radius: 12px; }
.egq .egq-summary div { display: grid; grid-template-columns: 96px minmax(0,1fr); align-items: start; gap: 10px; padding: 11px 0; }
.egq .egq-summary div + div { border-top: 1px solid #dbded8; }
.egq .egq-summary dt, .egq .egq-summary dd { margin: 0; font-size: 16px; line-height: 1.45; }
.egq .egq-summary dt { color: var(--egq-slate); }
.egq .egq-summary dd { font-weight: 600; overflow-wrap: anywhere; }
.egq .egq-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 18px; margin-top: 6px; }
.egq .egq-edit button, .egq .egq-restart {
  min-height: 44px;
  padding: 3px 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--egq-primary);
  font-size: 16px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.egq .egq-save-row { flex-wrap: wrap; justify-content: flex-start; margin-top: 10px; }
.egq .egq-status { margin: 10px 0 0; color: var(--egq-slate); font-size: 16px; }
.egq .egq-status:empty { margin: 0; }
.egq .egq-restart { display: block; margin-top: 9px; color: var(--egq-slate); }
@media (max-width: 480px) {
  dialog.egq { width: calc(100% - 20px); max-height: 92vh; max-height: 92dvh; border-radius: 17px; }
  .egq .egq-head { padding: 10px 14px 10px 18px; }
  .egq .egq-body { padding: 0 18px 20px; }
  .egq .egq-choices, .egq .egq-fields { gap: 9px; }
  .egq .egq-choices label { grid-template-columns: minmax(0, 1fr) 17px; grid-template-rows: 24px auto; gap: 6px; min-height: 76px; padding: 11px; }
  .egq .egq-pane-icon { width: 26px; height: 24px; }
  .egq .egq-choices label span { grid-column: 1 / -1; grid-row: 2; }
  .egq .egq-choices input { grid-column: 2; }
  .egq h2 { margin-top: 18px; }
  .egq #egq-nav .egq-primary { flex: 1; }
}
@media (max-width: 360px) {
  .egq .egq-fields { grid-template-columns: minmax(0, 1fr); }
  .egq .egq-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  dialog.egq, .egq *, .egq *::before, .egq *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
