/* 补录时间选择器：沿用纸色与鼠尾草绿，只作用于这个组件。 */
.note-date-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  background: none;
  color: var(--ink);
  font: 16px var(--serif);
  cursor: pointer;
}
.note-date-trigger svg {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: var(--sage);
  stroke-width: 1.5;
  stroke-linecap: round;
}
.note-date-dialog {
  width: min(360px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  margin: auto;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--hairline);
  border-radius: 28px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 70px rgba(44, 53, 46, 0.16);
}
.note-date-dialog::backdrop {
  background: rgba(44, 53, 46, 0.22);
  backdrop-filter: blur(4px);
}
.note-date-dialog button {
  font-family: var(--serif);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.note-date-dialog input {
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}
.note-date-dialog input::-webkit-inner-spin-button,
.note-date-dialog input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.note-date-dialog :is(button, input):focus-visible,
.note-date-trigger:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
}
.ndp-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.ndp-eyebrow {
  color: var(--ochre);
  font-size: 11px;
  letter-spacing: 0.16em;
}
.ndp-heading h4 {
  font-size: 22px;
  font-weight: 400;
  margin-top: 4px;
}
.ndp-close,
.ndp-arrow {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--paper-tint);
  color: var(--sage-dark);
  font-size: 23px;
  line-height: 1;
}
.ndp-close { color: var(--ink-muted); }
.ndp-monthbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.ndp-month-title {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 15px;
  white-space: nowrap;
}
#note-date-year {
  width: 56px;
  padding: 4px 0;
  border: 0;
  border-radius: 8px;
  background: var(--paper-tint);
  font: 16px var(--serif);
}
#note-date-month { min-width: 36px; text-align: center; }
.ndp-weekdays,
.ndp-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  text-align: center;
}
.ndp-weekdays {
  color: var(--ink-muted);
  font-size: 11px;
  margin-bottom: 8px;
}
.ndp-day {
  width: min(100%, 36px);
  justify-self: center;
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  font-size: 14px;
}
.ndp-day.outside { color: var(--sage-soft); }
.ndp-day.today { border-color: var(--sage-soft); }
.ndp-day:hover { background: var(--paper-tint); }
.ndp-day.selected,
.ndp-day.selected:hover {
  background: var(--sage);
  color: var(--paper);
  border-color: var(--sage);
  box-shadow: 0 0 0 3px var(--paper-tint);
}
.note-date-dialog button:disabled { opacity: 0.3; cursor: default; }
.ndp-selection {
  margin: 10px 0;
  color: var(--sage-dark);
  font-size: 12px;
  text-align: center;
}
.ndp-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px;
  border-radius: 20px;
  background: var(--paper-tint);
}
.ndp-time-field { display: flex; align-items: center; gap: 6px; }
.ndp-time-field label { font-size: 11px; color: var(--ink-muted); }
.ndp-time-field input {
  width: 44px;
  padding: 6px 0;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--paper);
  font: 21px var(--serif);
  color: var(--sage-dark);
}
.ndp-colon { color: var(--sage); }
.ndp-now {
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--sage-dark);
  font-size: 12px;
}
.ndp-actions { display: flex; gap: 10px; margin-top: 16px; }
.ndp-actions button {
  flex: 1;
  padding: 11px 12px;
  border: 0;
  border-radius: 18px;
  font-size: 14px;
}
.ndp-cancel { color: var(--ink-muted); background: var(--paper-tint); }
.ndp-confirm { color: var(--paper); background: var(--sage); }
.ndp-confirm:hover { background: var(--sage-dark); }
@media (max-width: 360px) {
  .note-date-dialog { padding: 18px; }
  .ndp-clock { gap: 8px; }
}
@media (max-height: 650px) {
  .note-date-dialog { padding: 16px; }
  .ndp-heading { margin-bottom: 10px; }
  .ndp-monthbar { margin-bottom: 8px; }
  .ndp-selection { margin-block: 8px; }
  .ndp-clock { padding: 8px; }
  .ndp-actions { margin-top: 12px; }
}
