/* A note keeps a real duration; compact notes retain a readable minimum. */
.feature-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  margin: 24px 0;
  background: #ece9f5;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.feature-tabs a {
  padding: 11px 18px;
  border-radius: 9px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 44px;
}
.feature-tabs a:hover {
  color: #5943d6;
  background: #ffffff80;
}
.feature-tabs a[aria-selected="true"] {
  color: #4932bc;
  background: #fff;
  box-shadow: 0 2px 5px #29213c12;
}
[data-tab-panel]:focus-visible {
  outline: 3px solid #5943d6;
  outline-offset: 4px;
}
[data-tab-panel] {
  scroll-margin-top: 180px;
}
.admin-password-form {
  max-width: 520px;
}
@media (max-width: 650px) {
  .feature-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 18px 0;
  }
  .feature-tabs a {
    flex-shrink: 0;
    padding: 11px 14px;
  }
}
.nav-toggle,
.mobile-week-hint {
  display: none;
}
.planner-intro {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.planner-intro .eyebrow {
  margin: 0;
}
.planner-info {
  position: relative;
  display: inline-flex;
}
.help-trigger {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--purple, #5943d6);
  font-weight: 700;
}
:is(#planner-tooltip, .help-popover) {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  width: min(420px, 80vw);
  padding: 18px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 35px #29213c22;
  font-size: 0.85rem;
  line-height: 1.6;
}
:is(#planner-tooltip, .help-popover) > span {
  display: block;
}
:is(#planner-tooltip, .help-popover) > span + span {
  margin-top: 12px;
}
.page-heading h1::first-letter {
  text-transform: uppercase;
}
@media (max-width: 650px) {
  .topbar {
    min-height: 70px;
    align-items: center;
  }
  .js-enabled .nav-toggle {
    display: inline-flex;
  }
  .js-enabled .topbar nav {
    display: none;
  }
  .js-enabled .topbar.nav-open nav {
    display: flex;
  }
  .app-body .workspace {
    padding-top: 20px;
  }
  .app-body .page-heading .eyebrow {
    display: inline;
    font-size: 0.6rem;
  }
  :is(#planner-tooltip, .help-popover) {
    left: 0;
    right: auto;
    width: min(330px, 85vw);
  }
  .planner-intro {
    position: relative;
  }
  .planner-info {
    position: static;
  }
  .app-body .page-heading h1 {
    font-size: 1.9rem;
    margin-bottom: 8px;
  }
  .app-body .page-heading {
    gap: 12px;
    margin-bottom: 14px;
  }
  .planner-toolbar {
    gap: 8px;
    padding-top: 14px;
  }
  .planner-toolbar .actions {
    gap: 6px;
  }
  .planner-toolbar .icon-button {
    min-width: 40px;
    min-height: 40px;
  }
  .planner-toolbar .button.small {
    padding: 8px 9px;
    font-size: 0.75rem;
    min-height: 40px;
  }
  .planner-toolbar .segmented > a {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  .planner-toolbar .legend {
    font-size: 0.7rem;
  }
  .mobile-week-hint {
    display: block;
    font-size: 0.73rem;
    color: var(--muted);
    margin: 0 0 10px;
  }
  .day-header {
    padding-top: 12px;
    padding-bottom: 12px;
  }
}
[hidden] {
  display: none !important;
}
.task-block {
  position: relative;
  border-radius: 2px 2px 15px 2px;
  border: 0;
  box-shadow:
    1px 3px 6px #29213c17,
    inset 0 22px 30px #ffffff30;
  padding: 15px 12px 13px;
  isolation: isolate;
}
.task-block::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 15px;
  height: 15px;
  background: linear-gradient(135deg, #0000000a, #00000018 49%, #efedf5 50%);
  border-radius: 2px 0 0 0;
  pointer-events: none;
}
.task-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 5px;
  background: #ffffff28;
  pointer-events: none;
}
.task-block.priority-2 {
  background: #ffdbc9;
  color: #73301c;
}
.task-block.priority-1 {
  background: #ffedab;
  color: #624a06;
}
.task-block.priority-0 {
  background: #d9ebd5;
  color: #244e31;
}
.task-block.done {
  background: #e4e3e9;
  color: #555163;
}
.task-block .block-meta {
  margin-bottom: 12px;
}
.task-block .task-title > span {
  font-weight: 650;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.task-block .task-title form {
  position: absolute;
  left: 8px;
  bottom: 7px;
  margin: 0;
}
.task-block .complete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 8px;
}
.task-block {
  min-height: 112px;
  padding: 8px 10px 38px;
}
.task-block .block-meta {
  margin-bottom: 4px;
  min-height: 16px;
}
.task-block .task-description { margin: 2px 0 0; }
.task-description summary { display: block; min-height: 20px; line-height: 20px; font-size: .72rem; font-weight: 400; color: inherit; list-style: none; }
.task-description summary::-webkit-details-marker { display: none; }
.task-description summary > span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.task-description summary:hover { color: var(--purple-dark); }
.task-description[open] summary > span { display: none; }
.task-description[open] summary::after { content: 'Réduire le détail ↑'; font-weight: 600; }
.task-description .rich-content { overflow-wrap: anywhere; }
.task-block:has(.task-description[open]) { height: auto !important; min-height: var(--task-height,112px); }
.single-day .task-block { padding: 8px 10px 38px; }
.task-duration-kind {
  display: block;
  font-size: 0.66rem;
  font-weight: 650;
  margin-bottom: 6px;
}
#manual-duration input {
  max-width: 220px;
}
#duration-hint {
  margin: 8px 0 18px;
  font-size: 0.8rem;
}
.move-open {
  position: absolute;
  right: 8px;
  bottom: 7px;
  min-height: 32px;
  border: 1px solid var(--line);
  background: #ffffff80;
  color: inherit;
  font-size: 0.68rem;
  text-decoration: none;
}
.task-block .move-open, .task-block .task-edit-icon {
  position: absolute;
  bottom: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff80;
  color: inherit;
  text-decoration: none;
  box-sizing: border-box;
}
.task-block .task-edit-icon { right: 46px; }
.task-action-controls {
  position: absolute;
  right: 8px;
  bottom: 7px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}
.task-action-controls .task-edit-icon,
.task-action-controls .move-open {
  position: static;
  flex: 0 0 32px;
  background: #fff;
  border-color: #00000030;
  color: #3d374c;
  visibility: visible;
  opacity: 1;
}
.day-breathing {
  margin: 5px 0 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: .75rem;
  font-style: italic;
  text-align: center;
}
.task-block .move-open svg, .task-block .task-edit-icon svg { width: 17px; height: 17px; pointer-events: none; }
.task-block :is(.move-open, .task-edit-icon):is(:hover, :focus-visible) { background: #eeebfa; color: var(--purple-dark); text-decoration: none; }
dialog {
  max-width: min(450px, 94vw);
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 30px 100px #29213c44;
}
dialog::backdrop {
  background: #25233866;
}
dialog h2 {
  font-size: 1.5rem;
}
#move-title {
  overflow-wrap: anywhere;
}
.demo-task {
  border-radius: 2px 2px 15px 2px;
  box-shadow: 1px 3px 5px #29213c10;
  position: relative;
}
.demo-task::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #00000012 49%, white 50%);
}
.demo-task.urgent {
  background: #ffdbc9;
  color: #73301c;
}
.demo-task.medium {
  background: #ffedab;
  color: #624a06;
}
.demo-task.low {
  background: #d9ebd5;
  color: #244e31;
}
.medium-dot {
  background: #8c6b06;
}
.priority-1 .complete {
  color: #624a06;
}
#task-form {
  background: #fff2bf;
  box-shadow: 2px 7px 20px #30225612;
  border-radius: 2px 2px 22px 2px;
  position: relative;
}
#task-form::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #e5d7a5 49%, var(--paper) 50%);
  pointer-events: none;
}

#task-dialog {
  max-width: min(720px, 94vw);
  max-height: 90dvh;
  overflow-y: auto;
}
.task-dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.task-dialog-heading h2 {
  margin: 0;
}
#task-dialog #task-form {
  margin: 0;
}
#task-dialog .wysiwyg {
  min-height: 100px;
}
.rule-row {
  display: grid;
  grid-template-columns: 115px repeat(2, minmax(90px, 1fr)) 76px repeat(2, minmax(90px, 1fr)) auto;
  align-items: center;
}
.rule-row input[type="time"] {
  width: 100%;
}
.rule-row > label:first-child {
  width: auto;
}
.rule-row .pause-toggle {
  justify-content: flex-start;
}
@media (max-width: 1000px) {
  .rule-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rule-row > label:first-child,
  .rule-row .pause-toggle,
  .rule-row > button {
    grid-column: 1 / -1;
  }
}
@media (max-width: 650px) {
  #task-dialog {
    padding: 18px;
  }
  #task-dialog #task-form {
    padding: 18px;
  }
}

/* The navigation floats over the page instead of forming a full-width band. */
.topbar {
  position: sticky;
  top: 12px;
  z-index: 50;
  width: fit-content;
  max-width: calc(100% - 40px);
  min-height: 54px;
  margin: 12px auto 0;
  padding: 5px 8px 5px 18px;
  gap: 22px;
  align-items: center;
  flex-wrap: nowrap;
  border: 1px solid #ffffffd9;
  border-radius: 999px;
  background: #ffffffdf;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 4px 24px #3022560d, 0 0 0 1px #30225608;
}
.topbar .brand {
  font-size: 1.55rem;
  line-height: 1;
}
.topbar .brand-dot {
  margin-left: 5px;
  font-size: 0.4rem;
}
.topbar nav {
  width: auto;
  gap: 3px;
  flex-wrap: nowrap;
  font-size: 0.79rem;
}
.topbar nav > a:not(.button),
.topbar nav .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.79rem;
  text-decoration: none;
  white-space: nowrap;
  color: var(--muted);
}
.topbar nav > a:hover,
.topbar nav .text-button:hover {
  background: #5943d60b;
  color: var(--purple);
  text-decoration: none;
}
.topbar nav > a[aria-current="page"] {
  background: #5943d610;
  color: #4932bc;
  font-weight: 650;
}
.topbar nav .button {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.79rem;
  border-radius: 999px;
}
.topbar nav .install {
  width: 40px;
  padding: 8px;
  font-size: 0;
}
.topbar nav .install::before {
  content: "↓";
  font-size: 1.1rem;
  line-height: 1;
}
.topbar + .content,
.topbar + .narrow {
  margin-top: 32px;
}
.topbar .skip:focus {
  top: 60px;
  border-radius: 10px;
}
@media (max-width: 900px) {
  .topbar {
    width: calc(100% - 24px);
    max-width: 460px;
    top: 10px;
    min-height: 54px;
    margin-top: 10px;
    padding: 5px 7px 5px 18px;
    flex-wrap: wrap;
  }
  .js-enabled .topbar {
    flex-wrap: nowrap;
  }
  .topbar nav {
    width: 100%;
    flex-wrap: wrap;
  }
  .js-enabled .nav-toggle {
    display: inline-flex;
    min-height: 40px;
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.78rem;
    background: #5943d60b;
  }
  .js-enabled .topbar nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(300px, calc(100vw - 24px));
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fffffffa;
    box-shadow: 0 14px 44px #3022561a;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
  }
  .js-enabled .topbar.nav-open nav {
    display: flex;
  }
  .topbar nav > a:not(.button),
  .topbar nav .text-button {
    min-height: 44px;
    justify-content: flex-start;
    border-radius: 11px;
    width: 100%;
  }
  .topbar nav form {
    margin-left: 0;
  }
  .topbar nav .install {
    width: 100%;
    font-size: 0.79rem;
    gap: 10px;
  }
}
@media print {
  .topbar {
    display: none;
  }
}

/* Settings use one clear heading and a right-aligned action per saved block. */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 18px;
}
.section-heading > h2,
.section-heading > h3 {
  margin: 0;
  flex: 1 1 180px;
}
.section-heading > .button,
.section-heading > button,
.section-heading > .actions {
  margin-left: auto;
  flex-shrink: 0;
}
.section-heading .actions {
  justify-content: flex-end;
}
.settings-block {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 22px;
}
.content:has([data-tabs]) > h1 {
  font-size: clamp(2rem, 3.4vw, 2.8rem);
}
.content:has([data-tabs]) > .eyebrow {
  margin-bottom: 12px;
}
.content:has([data-tabs]) .feature-tabs {
  margin: 18px 0;
}
#capacity-form .rule-row {
  grid-template-columns: 115px repeat(2, minmax(90px, 1fr)) 76px repeat(2, minmax(90px, 1fr));
  padding: 10px 0;
}
#capacity-form .rule-row:last-child {
  border-bottom: 0;
}
.calendar-row > button {
  margin-left: auto;
}
.admin-user-form {
  min-width: 290px;
}
.admin-user-form .section-heading {
  margin-bottom: 8px;
}
.admin-user-form h3 {
  font-size: 0.85rem;
}
.admin-user-form .inline-form > select {
  flex: 1;
}
.admin-user-form .inline-form > input {
  width: 90px;
}
.request .section-heading h3 {
  overflow-wrap: anywhere;
}

/* A task has the same priority colour while writing and in the week. */
#task-form {
  --note-colour: #ffedab;
  --note-fold: #e2ca75;
  background: var(--note-colour);
}
#task-form[data-priority="2"] {
  --note-colour: #ffdbc9;
  --note-fold: #e6b69a;
}
#task-form[data-priority="0"] {
  --note-colour: #d9ebd5;
  --note-fold: #b4cfae;
}
#task-form::after {
  background: linear-gradient(135deg, var(--note-fold) 49%, var(--paper) 50%);
}
.task-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.task-fields:has(#manual-duration[hidden]) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#task-form input,
#task-form select {
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 0.88rem;
}
#task-form label {
  font-size: 0.8rem;
  margin-bottom: 4px;
}
#manual-duration input {
  max-width: none;
}
#duration-hint {
  font-size: 0.74rem;
  line-height: 1.5;
  margin: 4px 0 10px;
}
.task-editor-help {
  display: none;
}
#task-form .editor-toolbar {
  padding: 4px;
  gap: 4px;
}
#task-form .editor-toolbar button {
  min-width: 36px;
  min-height: 36px;
}
#task-form .wysiwyg {
  min-height: 80px;
  max-height: none;
  overflow: visible;
  overflow-wrap: anywhere;
  padding: 10px;
  font-size: 0.88rem;
  margin-bottom: 12px;
}
#task-form .wysiwyg p {
  margin-bottom: 6px;
}
.task-form-actions {
  justify-content: space-between;
  flex-wrap: nowrap;
}
.task-form-actions .button {
  min-height: 42px;
  padding: 9px 14px;
  font-size: 0.82rem;
}
#task-dialog {
  max-width: min(780px, 96vw);
  max-height: calc(100dvh - 24px);
  padding: 16px;
}
#task-dialog #task-form {
  padding: 18px;
}
#task-dialog .task-dialog-heading {
  margin-bottom: 10px;
}
#task-dialog .task-dialog-heading h2 {
  font-size: 1.25rem;
}
#task-dialog .wysiwyg {
  min-height: 80px;
}
@media (max-width: 1000px) {
  #capacity-form .rule-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #capacity-form .rule-row > .check {
    grid-column: 1 / -1;
  }
}
@media (max-width: 650px) {
  .section-heading > h2,
  .section-heading > h3 {
    flex-basis: 130px;
  }
  .section-heading > .button {
    padding: 9px 12px;
    font-size: 0.8rem;
  }
  .task-fields,
  .task-fields:has(#manual-duration[hidden]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .task-fields:has(#manual-duration[hidden]) .duration-mode-field {
    grid-column: 1 / -1;
  }
  #task-dialog {
    padding: 12px;
  }
  #task-dialog #task-form {
    padding: 14px;
  }
  #task-form .editor-toolbar button {
    min-height: 40px;
  }
}
@media (max-height: 650px) {
  #task-dialog {
    padding: 10px;
  }
  #task-dialog #task-form {
    padding: 12px;
  }
  #task-dialog input,
  #task-dialog select {
    min-height: 36px;
    padding: 6px 8px;
    margin-bottom: 6px;
  }
  #task-dialog .wysiwyg {
    min-height: 56px;
    padding: 8px;
  }
  #task-dialog .editor-toolbar button {
    min-height: 36px;
  }
  #task-dialog .task-form-actions .button {
    min-height: 38px;
    padding: 7px 12px;
  }
}

/* Primary and secondary actions share the same height and padding. */
.section-heading .button,
.calendar-row > .button {
  min-height: 48px;
  padding: 11px 20px;
  font-size: 0.94rem;
}
.task-form-actions .button {
  flex: 0 1 auto;
  min-width: 0;
}
.topbar .button,
.planner-toolbar .button,
.button.small {
  min-width: 0;
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.login-actions .button {
  flex-shrink: 0;
}
.login-actions > a {
  font-size: 0.9rem;
  text-align: right;
}
@media (max-width: 380px) {
  .login-actions .button {
    min-width: 120px;
    padding-inline: 12px;
  }
}
.password-hint {
  display: block;
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.context-help { position: relative; display: inline-flex; flex: 0 0 auto; }
.section-heading > h2, .section-heading > h3 { flex: 0 1 auto; }
.section-heading > .context-help { margin-right: auto; }
.help-popover p { margin: 0; }
.help-popover { text-align: left; font-weight: 400; letter-spacing: normal; }
.help-heading { justify-content: flex-start; gap: 10px; }
.help-heading h1 { margin: 0; }
#task-form .help-popover { width: min(420px, 78vw); left: auto; right: 0; }
@media (max-width: 650px) {
 .context-help { position: static; }
 .section-heading { position: relative; }
 .context-help .help-popover { left: 0; right: auto; max-width: 100%; }
}

.help-popover p + p { margin-top: 12px; }
.task-dialog-heading { position: relative; gap: 10px; }
.task-dialog-heading h2 { margin-right: auto; }
.task-dialog-heading .help-popover { left: auto; right: 0; }

/* Equal heights within the action group; widths follow each label. */
.page-heading > .actions {
  display: flex;
  align-items: stretch;
}
.page-heading > .actions > form {
  display: flex;
  min-width: 0;
}
.page-heading > .actions .button {
  box-sizing: border-box;
  appearance: none;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  padding-block: 0;
  margin-block: 0;
  align-self: center;
  border-width: 1px;
  line-height: 1.25;
  text-align: center;
}
/* Flash confirmations stay clear of the floating navigation and anchored sections. */
.app-toast {
  position: fixed;
  z-index: 70;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: min(520px, calc(100vw - 32px));
  margin: 0;
  padding: 12px 12px 12px 18px;
  box-shadow: 0 8px 32px #25233824;
}
.app-toast > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.app-toast[hidden] { display: none; }
.day-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 24px 28px 6px 80px 32px 76px;
  align-items: center;
  gap: 6px;
}
.day-header > a:first-child, .day-header > p { margin: 0; white-space: nowrap; }
.day-header .meter { margin: 0; width: 100%; }
.day-summary { display: grid; grid-template-rows: repeat(4, 20px); margin: 0; font-size: .75rem; font-variant-numeric: tabular-nums; }
.day-summary > div { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.day-summary dt, .day-summary dd { margin: 0; white-space: nowrap; }
.day-summary dd { font-weight: 700; }
.day-overlap { line-height: 16px; margin: 0; }
.carry-remaining { margin: 0; width: 100%; align-self: start; }
.carry-remaining .button { width: 100%; white-space: normal; padding: 8px; line-height: 1.3; }
.carry-remaining .button:disabled { opacity: .5; cursor: default; }
.carry-remaining small { display: block; margin-top: 4px; line-height: 16px; min-height: 16px; }
.mobile-action-icon { display: none; }
.topbar nav .install::before { content: none; }
@media (max-width: 650px) {
  .mobile-icon-action .mobile-action-label { display: none; }
  .mobile-icon-action .mobile-action-icon { display: block; width: 22px; height: 22px; flex: none; }
  body .mobile-icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    padding: 0 !important;
    gap: 0;
    flex: none;
    box-sizing: border-box;
  }
  .app-body .page-heading {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
  }
  .app-body .page-heading > div:first-child { flex: 1 1 auto; min-width: 0; }
  .app-body .page-heading > .actions {
    flex: 0 0 auto;
    width: auto;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    margin-left: auto;
  }
  .app-body .page-heading > .actions > form { width: auto; flex: none; margin: 0; }
  .topbar nav .mobile-action-icon { display: none; }
  .topbar nav .mobile-action-label { display: inline; }
  body .topbar nav .mobile-icon-action {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 12px 14px !important;
    justify-content: flex-start;
  }
}
.app-toast.error {
  color: #8c2020;
  background: #fff0f0;
  border-color: #d89090;
}
.app-toast.warning {
  color: #79531b;
  background: #fff5e5;
  border-color: #e8cd9e;
}
.toast-close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 1.5rem;
}
.toast-close:hover { background: #28553e12; }
.password-field {
  position: relative;
  margin-bottom: 18px;
}
.password-field input:not([type="checkbox"]) {
  margin-bottom: 0;
  padding-right: 56px;
}
.password-field input::-ms-reveal { display: none; }
.password-toggle {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}
.password-toggle:hover { background: #5943d60d; color: var(--purple); }
.password-toggle svg { display: block; width: 24px; height: 24px; pointer-events: none; }

a.button:hover, a.button:focus-visible,
a.icon-button:hover, a.icon-button:focus-visible,
.segmented > a:hover, .segmented > a:focus-visible,
.feature-tabs a:hover, .feature-tabs a:focus-visible {
  text-decoration: none;
}

/* One outer height for every control in the planning toolbar. */
.planner-toolbar .icon-button,
.planner-toolbar .button {
  box-sizing: border-box;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding-block: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.planner-toolbar .icon-button { width: 40px; min-width: 40px; max-width: 40px; padding: 0; }
@media (max-width: 650px) {
.planner-toolbar .mobile-icon-action {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
}
}
.planner-toolbar .segmented {
  box-sizing: border-box;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  align-items: stretch;
}
.planner-toolbar .segmented > a {
  box-sizing: border-box;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-block: 0;
}

/* Shared feedback for pointer and keyboard use, including icon actions. */
.compact-day-header { display: grid; grid-template-rows: none; grid-auto-rows: auto; gap: 7px; padding: 6px 13px; }
.day-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
.day-title-row > a { font-size: .88rem; font-weight: 700; text-transform: capitalize; color: var(--ink); text-decoration: none; }
.day-title-row .carry-remaining { width: auto; margin: 0; }
.day-title-row .carry-icon { width: 32px; height: 32px; min-width: 32px; min-height: 32px; padding: 0; }
.carry-icon svg { width: 18px; height: 18px; }
.compact-day-header .day-capacity { margin: 0; }
.day-history-slot { display: flow-root; min-height: 29px; }
.day-history { font-size: .72rem; margin: 9px 0 0; }
.day-history summary { cursor: pointer; color: var(--muted); min-height: 20px; line-height: 20px; margin: 0; padding: 0; }
.day-history .day-summary { grid-template-rows: repeat(3,20px); margin-top: 8px; font-size: .7rem; }
.single-day .day-title-row > a { font-size: 1.15rem; }
.planner-priority-legend {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 16px;
  text-align: center;
}
.planner-priority-legend .dot:first-child { margin-left: 0; }
:where(button, a.button, a.icon-button, .segmented > a, .feature-tabs a) {
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
:where(button, a.button, a.icon-button, .segmented > a, .feature-tabs a):not(:disabled):not([aria-disabled="true"]):is(:hover, :focus-visible) {
  background-color: #eeebfa;
  color: var(--purple-dark);
  border-color: #b5a7ee;
  text-decoration: none;
}
.button:not(.secondary):not(:disabled):not([aria-disabled="true"]):is(:hover, :focus-visible) {
  background-color: var(--purple-dark);
  color: #fff;
  border-color: var(--purple-dark);
}
@media (prefers-reduced-motion: reduce) {
  :where(button, a.button, a.icon-button, .segmented > a, .feature-tabs a) { transition: none; }
}

.export-button { gap: 7px; }
.export-button svg { width: 22px; height: 22px; flex-shrink: 0; }
.button.export-excel { background: #28774d; border-color: #28774d; color: white; }
.button.export-excel:hover { background: #1b5938; border-color: #1b5938; }
@media(max-width:650px) { .export-button span { display: none; } .export-button { width: 48px; padding: 0; justify-content: center; } }

