/* Tempo interactions: keep the palette, typography and calendar geometry. */
.tempo-heading-actions > .create-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 3px; }
.create-menu { position: fixed; z-index: 90; width: min(310px, calc(100vw - 24px)); border: 1px solid var(--border); border-radius: 14px; padding: 7px; background: var(--surface); box-shadow: 0 14px 40px #0005; }
.create-menu button { display: flex; align-items: center; gap: 13px; width: 100%; border: 0; border-radius: 9px; background: transparent; padding: 12px; text-align: left; }
.create-menu button:hover, .create-menu button:focus-visible { background: var(--tempo-selection); }
.create-menu-icon { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 10px; color: var(--green); background: var(--tempo-tint); font-size: 21px; }
.create-menu strong, .create-menu small { display: block; }
.create-menu strong { font-size: 13px; font-weight: 550; }
.create-menu small { margin-top: 3px; font-size: 11px; color: var(--muted); line-height: 1.5; }
.sidebar-action small { display: none; }
.sidebar-group-body .sidebar-action { min-height: 38px; padding-block: 8px; }
.status-line { min-height: 30px; padding-block: 8px; }
.status-line:not(.error)::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--green); margin-right: 7px; vertical-align: middle; }
.planning-help { border-bottom: 1px solid var(--border); padding: 9px 14px; color: var(--muted); font-size: 11px; }
.planning-help summary { cursor: pointer; width: fit-content; }
.planning-help ul { margin: 10px 0 3px; padding-left: 18px; line-height: 1.8; }
.timeline-feedback:empty, #project-feedback:empty, #task-feedback:empty, .task-deadline-warning:empty, .field-help:empty { display: none; }
.event-chip .automatic-badge { display: none; }
.notifications-dialog .notification-settings, #notifications-dialog .notification-settings { border: 0; padding: 0; margin: 0; }
.form-section { border: 1px solid var(--border); border-radius: 11px; margin: 0 0 12px; background: var(--surface); }
.form-section > summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 10px; row-gap: 4px; cursor: pointer; padding: 12px 13px; font-size: 13px; font-weight: 550; list-style: none; }
.form-section > summary::-webkit-details-marker { display: none; }
.form-section > summary::after { content: '⌄'; color: var(--muted); font-size: 17px; line-height: 1; }
.form-section[open] > summary::after { transform: rotate(180deg); }
.form-section > summary > small { margin-left: auto; max-width: 70%; color: var(--muted); font-size: 11px; font-weight: 400; overflow-wrap: anywhere; }
.form-section[open] > summary { border-bottom: 1px solid var(--border); }
.form-section-body { padding: 14px 13px 0; }
.form-section-body > label, .form-section-body > fieldset > label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 550; margin-bottom: 16px; }
.form-section-body .checkbox-label { flex-direction: row; align-items: center; }
.form-section-body > .project-days > label { flex-direction: row; align-items: center; margin: 0; gap: 6px; min-height: 32px; cursor: pointer; }
.project-days input, .recurrence-days input { width: 17px; height: 17px; flex: 0 0 17px; cursor: pointer; }
.project-day-window > .checkbox-label { cursor: pointer; min-height: 36px; }
.session-activity { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 13px; margin: 0 0 16px; border: 1px solid var(--border); border-radius: 11px; }
.session-activity > div { display: grid; gap: 3px; min-width: 0; }
.session-activity strong { font-size: 13px; overflow-wrap: anywhere; }
.field-caption { font-size: 11px; color: var(--muted); }
.form-section-body > fieldset { margin: 0 0 14px; }
.form-section-body .reminder-fields, .form-section-body .task-planning-fields, .form-section-body .task-subtasks-fields { border: 0; padding: 0; }
.form-section-body .reminder-fields > legend, .form-section-body .task-planning-fields > legend, .form-section-body .task-subtasks-fields > legend { display: none; }
.form-section-title { font-size: 13px; font-weight: 550; color: var(--green); margin: 23px 0 15px; padding-top: 18px; border-top: 1px solid var(--border); }
.form-help-panel { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 16px 0; }
.form-help-panel > summary { cursor: pointer; width: fit-content; }
.form-help-panel p { font-size: 12px; font-weight: 400; background: none; padding: 0; margin: 10px 0; }
#event-form .recurrence-fields, #task-form .recurrence-fields { border: 0; padding: 0; background: none; margin: 0 0 15px; }
#event-form .recurrence-fields > legend, #task-form .recurrence-fields > legend { display: none; }
#event-form .recurrence-fields > label, #task-form .recurrence-fields > label { margin-bottom: 10px; }
#event-form .dialog-actions, #project-form .dialog-actions, #task-form .dialog-actions { position: sticky; bottom: -27px; z-index: 4; margin: 20px -27px -27px; padding: 16px 27px 20px; background: var(--surface); box-shadow: 0 -8px 16px -12px #0008; }
dialog form { scroll-margin-bottom: 90px; }
dialog input, dialog select, dialog textarea { scroll-margin-block: 28px 100px; }
.save-feedback { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100vw - 32px); padding: 10px 10px 10px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--raised); color: var(--ink); box-shadow: 0 8px 24px #0004; font-size: 13px; }
.save-feedback > span:first-child { color: var(--green); font-size: 18px; }
.save-feedback .icon-button { font-size: 20px; flex: 0 0 30px; width: 30px; height: 30px; }
form[aria-busy="true"] button[type="submit"]::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 7px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; }
button, summary, .sidebar-item, .event-card, .task-row, .time-day-heading { transition: background-color 130ms ease, border-color 130ms ease, box-shadow 130ms ease, color 130ms ease; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline-color: var(--green); }
.create-trigger[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--tempo-selection); }
@media (prefers-reduced-motion: no-preference) {
  dialog[open] { animation: tempo-dialog-in 160ms ease-out; }
  dialog[open]::backdrop { animation: tempo-backdrop-in 160ms ease-out; }
  .create-menu:not([hidden]), .item-menu:not([hidden]) { animation: tempo-menu-in 120ms ease-out; }
  .save-feedback:not([hidden]) { animation: tempo-feedback-in 160ms ease-out; }
  .form-section[open] > .form-section-body { animation: tempo-content-in 130ms ease-out; }
  form[aria-busy="true"] button[type="submit"]::before { animation: tempo-spin 700ms linear infinite; }
  button.primary:not(:disabled):active, .outline-button:not(:disabled):active { transform: scale(.985); }
}
@keyframes tempo-dialog-in { from { opacity: .2; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes tempo-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes tempo-menu-in { from { opacity: .2; translate: 0 -4px; } to { opacity: 1; translate: 0 0; } }
@keyframes tempo-feedback-in { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@keyframes tempo-content-in { from { opacity: .4; } to { opacity: 1; } }
@keyframes tempo-spin { to { transform: rotate(360deg); } }
@media (max-width: 740px) {
  .tempo-heading-actions > .create-trigger { min-height: 44px; }
  .form-section > summary { padding: 13px 11px; }
  .form-section-body { padding-inline: 11px; }
  #event-form .dialog-actions, #project-form .dialog-actions, #task-form .dialog-actions { bottom: -22px; margin-inline: -18px; margin-bottom: -22px; padding: 14px 18px 18px; gap: 8px; }
  .save-feedback { bottom: 16px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
