.question-heading {
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.question-heading > div:first-child {
  flex: 1;
  min-width: 180px;
}
.rest-preference {
  display: flex;
  align-items: center;
  margin: 0 auto;
  padding: 0 12px;
}
.rest-preference label {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 13px;
  color: var(--muted);
}
.rest-preference select {
  width: auto;
  margin: 0;
  min-height: 44px;
  color: var(--ink);
}
.question-navigation {
  margin-left: auto;
}
@media (max-width: 900px) {
  .rest-preference {
    margin: 0;
    padding: 0;
  }
  .question-heading > div:first-child {
    flex-basis: 100%;
  }
}
.rest-dialog {
  width: min(460px, calc(100% - 32px));
  max-height: 85dvh;
  overflow: auto;
  border: 1px solid #7896a4;
  border-radius: 6px;
  padding: 32px;
  background: var(--paper);
  color: var(--ink);
  box-shadow:
    5px 5px 0 #f1ebdd,
    0 24px 80px #244c6733;
}
.rest-dialog::backdrop {
  background: #19374770;
}
.rest-kicker {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--red);
  margin-bottom: 14px;
}
.rest-dialog h2 {
  font-size: 26px;
  margin-bottom: 16px;
}
.rest-dialog p {
  line-height: 1.9;
}
.rest-dialog .rest-jp {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}
.rest-actions {
  display: flex;
  gap: 12px;
  margin-top: 26px;
}
.rest-actions button {
  flex: 1;
  min-height: 44px;
}
.rest-actions #rest-stay {
  background: var(--ink);
  color: var(--paper);
}
.rest-dialog[open] {
  animation: rest-arrive 0.22s ease-out;
}
@keyframes rest-arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 600px) {
  .rest-preference {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .rest-dialog {
    padding: 24px;
  }
  .rest-dialog h2 {
    font-size: 23px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rest-dialog[open] {
    animation: none;
  }
}
