dialog {
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  padding: 0;
  width: min(620px, calc(100vw - 26px));
  max-height: 90dvh;
  background: linear-gradient(180deg, #fdeaf2 0%, #fff 38%);
  color: var(--ink);
  box-shadow: var(--shadow-float);
}
dialog::backdrop {
  background: rgba(78, 32, 58, 0.38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
#sheetBody {
  padding: 26px;
}
.sheethead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 15px;
}
.sheethead h2 {
  font-size: 25px;
}
.iconbtn {
  display: grid;
  place-items: center;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  background: var(--surface-solid);
  color: var(--rose-600);
  box-shadow: var(--shadow-card);
}
.sheethead .iconbtn {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-raised);
}
.listen {
  text-align: center;
  padding: 24px 0;
}
.micdisc {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  margin: 0 auto 18px;
  color: #fff;
  background: var(--grad-orb);
  box-shadow: 0 0 0 10px var(--sky-100), 0 14px 30px -8px rgba(59, 130, 246, 0.6);
  animation: orb 2.4s ease-in-out infinite;
}
@keyframes orb {
  50% {
    box-shadow: 0 0 0 16px rgba(230, 240, 255, 0.7), 0 14px 30px -8px rgba(59, 130, 246, 0.6);
  }
}
.micdisc svg {
  width: 34px;
  height: 34px;
}
.meter {
  height: 6px;
  background: var(--rose-100);
  overflow: hidden;
  border-radius: var(--r-pill);
  margin: 15px auto;
  width: 160px;
}
.meter i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--sky-400), var(--rose-500));
  width: 0;
}
.fieldgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.fieldgrid label,
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}
.fieldgrid input,
.fieldgrid select {
  width: 100%;
  font-size: 15px;
}
.fieldgrid .wide {
  grid-column: 1/-1;
}
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  padding: 6px 12px 6px 9px;
  border-radius: var(--r-pill);
}
.checks label:has(input:checked) {
  border-color: var(--rose-400);
  background: var(--rose-50);
  color: var(--rose-700);
}
.transcript {
  font-size: 14px;
  line-height: 1.55;
  margin: 10px 0;
  color: #52465a;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sky-400);
  padding: 10px 14px;
  border-radius: var(--r-sm);
}
.field b {
  color: var(--ink);
  font-size: 17px;
  font-weight: 580;
}
.field {
  padding: 8px 0;
}
.error {
  color: var(--review);
  font-weight: 600;
  font-size: 14px;
  margin: 8px 0;
}
.snapshot {
  background: var(--surface-sunk);
  padding: 16px;
  border-radius: var(--r-md);
}
.help-list {
  line-height: 1.7;
  padding-left: 0;
  list-style: none;
}
.help-list li {
  position: relative;
  padding-left: 28px;
}
.help-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 13px;
  height: 7px;
  border-left: 2.5px solid var(--rose-500);
  border-bottom: 2.5px solid var(--rose-500);
  transform: rotate(-45deg);
}
.draftbox {
  width: 100%;
  min-height: 76px;
  margin-top: 8px;
}
.rightpanel .date {
  margin-bottom: 10px;
}

/* ---------- Toast ---------- */
#toast {
  position: fixed;
  z-index: 20;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: var(--r-pill);
  background: var(--ink);
  color: white;
  padding: 12px 20px;
  max-width: 90%;
  box-shadow: var(--shadow-float);
}
#toast:empty {
  display: none;
}
.rowlink:hover,
.textbtn:hover {
  text-decoration: underline;
}

/* ---------- Responsive ---------- */
.alert-message {
  white-space: pre-wrap;
  font: inherit;
  margin: 0 0 12px;
}
