.fortune-dream {
  padding: clamp(12px, 2.5vw, 28px);
  border: 1px solid #cfe3d7;
  border-radius: 16px;
  background: #fbfffd;
}

.fortune-dream #experience,
.dream-reading {
  max-width: 60rem;
  margin-inline: auto;
}

.dream-fields,
.dream-evidence {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dream-fields label {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  font-weight: 650;
}

.dream-fields select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #a2bcae;
  border-radius: 8px;
  color: #213b31;
  background: #fff;
  font: inherit;
  font-weight: 400;
}

.dream-fields select:disabled {
  color: #4e6b5c;
  background: #ecf4ef;
}

.dream-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 14px;
  margin-top: 14px;
}

.dream-toolbar #action,
.dream-audio summary {
  min-height: 44px;
}

.dream-audio {
  max-width: 100%;
}

.dream-audio summary {
  cursor: pointer;
  align-content: center;
}

.dream-audio > div {
  display: grid;
  grid-template-columns: auto minmax(4rem, 7rem);
  gap: 4px 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid #cfe3d7;
  border-radius: 8px;
}

.dream-audio input[type="range"] {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.dream-audio label:last-of-type,
.dream-audio #fortune-audio-notice {
  grid-column: 1 / -1;
}

.fortune-dream :is(#dream-error, #journal-note, #fortune-audio-notice):empty {
  display: none;
}

.fortune-dream #dream-error {
  color: #932e28;
}

.dream-progress {
  margin: 10px 0 0;
  color: #456456;
}

.dream-reading {
  overflow-wrap: anywhere;
}

.dream-reading :is(h3, h4, p) {
  margin: 0 0 8px;
}

.dream-summary {
  line-height: 1.65;
}

.dream-basis {
  margin-block: 14px;
}

.dream-evidence {
  margin: 0;
}

.dream-evidence-item {
  padding: 10px;
  border: 1px solid #cfe3d7;
  border-radius: 9px;
  background: #f3faf5;
}

.dream-evidence dt {
  color: #426052;
  font-size: .875rem;
}

.dream-choice {
  box-sizing: border-box;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  color: #273e32;
  background: #e0efe5;
  font-size: 1rem;
}

.dream-evidence dd {
  margin: 6px 0 0;
  line-height: 1.55;
}

.dream-reading .dream-source {
  margin: 14px 0 0;
  color: #426052;
  font-size: .875rem;
}

.fortune-frame[data-dream-reading] {
  height: auto !important;
  min-height: 0;
  overflow: visible;
}

.fortune-frame[data-dream-reading] :is(#fortune-canvas, #canvas-access, #fortune-state) {
  display: none;
}

.dream-journal-detail {
  min-width: 0;
  padding: clamp(2px, 1vw, 10px);
}

@media (max-width: 640px) {
  .dream-fields,
  .dream-evidence {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .fortune-dream .dream-reading {
    animation: dream-appear 200ms ease-out both;
  }
}

@keyframes dream-appear {
  from { opacity: .3; }
  to { opacity: 1; }
}
