
.sleep-layout { align-items: start; }
.sleep-controls, .sleep-result {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.sleep-time-pair, .sleep-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}
.sleep-layout .zt-field { min-width: 0; }
.sleep-layout input, .sleep-layout select { min-height: 44px; font-size: 1rem; }
.sleep-layout input[type=time] { min-width: 0; color: var(--ws-ink); }
#sleep-now { margin-top: calc(1.2em + 10px); min-height: 44px; }
.sleep-result { background: var(--ws-2); }
.sleep-result h2 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.05;
}
.sleep-rows { display: grid; }
.sleep-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px 10px;
  border-top: 1px solid var(--ws-line-strong);
  padding: 8px 0;
}
.sleep-row:last-child { border-bottom: 1px solid var(--ws-line-strong); }
.sleep-reading, .sleep-length { display: grid; gap: 2px; min-width: 0; }
.sleep-reading time {
  font-size: clamp(1.25rem, 4vw, 2rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.sleep-length { text-align: right; white-space: nowrap; }
.sleep-reading small, .sleep-length span { font-size: .8125rem; color: var(--ws-dim); }
.sleep-result p { margin: 0; }
.sleep-actions { display: flex; flex-wrap: wrap; gap: 0 16px; font-size: .875rem; }
.sleep-actions a, .sleep-actions button, .sleep-reset {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  justify-self: start;
  text-align: left;
}
.sleep-actions a { color: inherit; font-weight: 600; }
.sleep-scope { margin: 16px 0 0; max-width: 78ch; }
.sleep-layout [aria-invalid="true"] { border-color: var(--err); }
@media (max-width: 560px) {
  .sleep-result { padding: 12px; }
}

.sleep-recommended { order: -1; border-color: var(--ws-line-strong); }
.sleep-row-note:not([hidden]) { grid-column: 1 / -1; font-size: .8125rem; color: var(--ws-dim); }

#sleep-now { white-space: nowrap; padding-inline: 12px; }
