/* All normal pages follow the space that is actually available beside the
   navigation rail. Focus mode intentionally retains its narrower reading line. */
.app-shell:not(.focus-mode) .main,
.app-shell:not(.focus-mode) .main:has(.reading-aside) {
  min-width: 0;
  max-width: none;
  width: auto;
  transition: margin-left .2s ease;
}
.app-shell:not(.focus-mode) #content { min-width: 0; width: 100%; }

/* Keep the native time picker beside the reminder switch. Native iOS inputs
   otherwise use an intrinsic width that can escape a narrow dialog. */
#reminder-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 10px 16px;
  min-width: 0;
}
#reminder-form > * { grid-column: 1 / -1; min-width: 0; }
#reminder-form > .reminder-enabled {
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: end;
  gap: 7px;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  width: 100%;
  box-sizing: border-box;
  padding: 7px 8px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-raised);
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
}
#reminder-form .reminder-enabled input { flex: 0 0 18px; margin: 0; }
#reminder-form .reminder-enabled:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent-muted);
  color: var(--accent);
}
#reminder-form .reminder-enabled:has(input:focus-visible) {
  outline: 3px solid var(--accent-muted);
  outline-offset: 2px;
}
#reminder-form > .reminder-time {
  grid-column: 2;
  gap: 4px;
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
}
#dialog #reminder-form input[type='time'] {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  appearance: none;
  -webkit-appearance: none;
  padding: 7px 8px;
  font-size: 16px;
  line-height: normal;
  margin: 0;
  text-align: center;
}
#reminder-form input[type='time']::-webkit-date-and-time-value { text-align: center; min-width: 0; margin: 0; padding: 0; }
#reminder-form input[type='time']::-webkit-datetime-edit { padding: 0; }
#reminder-form > .reminder-days { margin: 3px 0 0; }
#reminder-form > .text-btn { justify-self: start; }
#reminder-form > .reminder-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
}
#reminder-form .reminder-actions > .button {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 8px 6px;
  gap: 5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
#reminder-form .reminder-label-compact { display: none; }
#reminder-form .reminder-actions svg { flex: 0 0 auto; }
#reminder-form > .reminder-help { margin: 0; }

@media (max-width: 600px) {
  #reminder-form { column-gap: 10px; }
  #reminder-form > .reminder-enabled { font-size: 12px; gap: 5px; padding-inline: 5px; }
  #reminder-form > .reminder-time { font-size: 10px; }
  #reminder-form .reminder-label-full { display: none; }
  #reminder-form .reminder-label-compact { display: inline; }
  #reminder-form .reminder-actions > .button { font-size: 12px; padding-inline: 4px; gap: 4px; }
}
@media (max-width: 430px) {
  #reminder-form .reminder-actions svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell:not(.focus-mode) .main,
  .app-shell:not(.focus-mode) .main:has(.reading-aside) { transition: none; }
}

/* The day picker belongs to the plan summary, leaving the passage quote the
   full available line. These controls wrap as a group on a narrow screen. */
.daily-reading-header .reading-title-block { flex: 1; width: 100%; min-width: 0; }
.reading-summary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 14px;
  margin-bottom: 8px;
}
.reading-summary-row > .eyebrow { margin: 0; min-width: 0; font-size: var(--reading-label-size); }
.reading-summary-row > .reading-day-controls {
  flex: 0 0 auto;
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 2px;
  min-height: 38px;
  padding: 2px 4px;
  font-size: 12px;
}
.reading-day-controls > button { min-width: 30px; min-height: 32px; padding: 4px 7px; font-size: inherit; }
@media (max-width: 700px) {
  .reading-summary-row { gap: 7px 10px; }
  .reading-summary-row > .eyebrow { letter-spacing: .055em; }
}
