.time-entry { display: block; position: relative; min-width: 0; }
.dialog-body .time-entry #note-clock {
  height: 100%; min-height: 44px; padding-inline: 12px 44px;
  line-height: 1.25;
}
.time-trigger {
  position: absolute; inset-block: 0; inset-inline-end: 0; display: grid; place-items: center;
  min-width: 44px; min-height: 44px; border-radius: 9px; color: var(--sub);
}
.time-trigger svg { width: 18px; height: 18px; }
.time-trigger:hover, .time-trigger[aria-expanded=true] { color: var(--blue); background: var(--tint); }
.time-entry [aria-invalid=true] { outline: 2px solid var(--signal); outline-offset: -2px; }
.time-entry-error { grid-column: 1 / -1; color: var(--signal); font-size: .875rem; line-height: 1.4; font-weight: 500; }
.time-panel {
  --clock-row: max(36px, 2.25rem);
  --clock-pad-ideal: calc(2 * var(--clock-row));
  /* Always reserve the column labels, the confirmation and the panel edges. */
  --clock-chrome: calc(2px + 24px + 1.25rem + 4px + 12px + max(44px, 2.75rem));
  --clock-pad: clamp(0px, (var(--picker-room, 100dvh) - var(--clock-chrome) - var(--clock-row)) / 2, var(--clock-pad-ideal));
  width: min(17rem, calc(100vw - 16px)); padding: 12px;
}
.time-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.time-column { min-width: 0; }
.time-column-title {
  display: block; margin: 0 0 4px; color: var(--sub); text-align: center;
  font-size: .8125rem; font-weight: 550; line-height: 1.25rem;
}
.time-wheel-frame {
  position: relative; overflow: hidden; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--line); background: var(--soft);
}
.time-wheel-frame::before {
  content: ""; pointer-events: none; position: absolute; inset-inline: 1px; top: var(--clock-pad);
  height: var(--clock-row); background: var(--tint);
}
.time-wheel {
  position: relative; height: calc(var(--clock-row) + 2 * var(--clock-pad));
  padding-block: var(--clock-pad); overflow-y: auto; overflow-anchor: none; overscroll-behavior: contain;
  scroll-snap-type: y mandatory; scrollbar-width: none; touch-action: pan-y; border-radius: inherit;
}
.time-wheel::-webkit-scrollbar { display: none; }
.time-wheel-option {
  display: block; width: 100%; height: var(--clock-row); padding: 0 8px; scroll-snap-align: center;
  color: var(--sub); user-select: none; font-size: 1rem; line-height: 1.2; text-align: center;
}
.time-wheel-option[aria-selected=true] { color: var(--blue-deep); font-weight: 650; }
.time-confirm { width: 100%; min-height: max(44px, 2.75rem); margin-top: 12px; }
.time-trigger:focus-visible { outline-offset: -3px; }
@media (max-width:750px), (pointer:coarse) {
  .time-panel { --clock-row: max(44px, 2.75rem); }
}
@media (max-height:559px) {
  .time-panel { --clock-pad-ideal: var(--clock-row); }
}
@container (max-width: 19rem) {
  .dialog-body .datetime-picker { grid-template-columns: minmax(0,1fr); }
}
