/* Coach notebook colour preview. */
.main-shell[data-page='client'] .private-note-panel {
  background: linear-gradient(
    120deg,
    var(--palette-102238, #102238),
    var(--palette-203c59, #203c59)
  );
  border-color: #3b5878;
  color: #edf4ff;
  box-shadow:
    0 6px 18px var(--palette-14283e20, #14283e20),
    inset 0 1px 0 #ffffff0b;
}
.main-shell[data-page='client'] .private-note-panel h2 {
  color: #edf4ff;
}
.main-shell[data-page='client'] .private-note-panel :is(.coach-note-preview, .fine-print) {
  color: #b6c9e0;
}
.main-shell[data-page='client'] .private-note-panel .tag-blue {
  background: var(--palette-294561, #294561);
  color: var(--palette-c9dff5, #c9dff5);
  border-color: #486786;
}
.main-shell[data-page='client'] .private-note-panel .btn-primary {
  background: var(--palette-31577c, #31577c);
  border-color: #6386aa;
  color: #fff;
  box-shadow: none;
}
.main-shell[data-page='client'] .private-note-panel .btn-secondary {
  background: var(--palette-20354e, #20354e);
  border-color: #4b6685;
  color: #dce9f8;
  box-shadow: none;
}
.main-shell[data-page='client']
  .private-note-panel
  .btn:hover:where(html:not([data-touch-input]) *) {
  background: var(--palette-3a6085, #3a6085);
}

.attention-client-list {
  display: grid;
  gap: 14px;
  padding: 16px;
}
.attention-client-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  background: var(--white);
}
.attention-client-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}
.attention-client-heading .client-identity {
  flex: 1;
  min-width: 0;
}
.attention-client-message {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  min-height: 36px;
}
.attention-client-message::after {
  content: '';
  position: absolute;
  inset: -5px;
}
.attention-client-card ul {
  padding: 0;
  margin: 10px 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.attention-client-card li {
  display: grid;
  gap: 3px;
  line-height: 1.4;
  font-size: 13px;
}
.attention-client-card li > span {
  color: var(--muted);
}
.attention-client-card .client-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}

.message-header .message-person {
  flex: 1 1 0;
  min-width: 0;
}
.message-person-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.message-person-actions .icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  background: transparent;
  color: inherit;
}
.message-person-actions .icon-btn:hover:where(html:not([data-touch-input]) *) {
  background: #80808014;
}
.message-person-actions .icon {
  width: 18px;
  height: 18px;
}

.screen-inline-controls .inbox-back {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: var(--ui-radius);
  gap: 8px;
}

.client-review-panel li > span {
  display: block;
  margin-top: 4px;
  line-height: 1.5;
}
.client-panel-body {
  padding: 16px;
}
.main-shell[data-page='client']
  .client-section
  :is(.upcoming-sessions, .nutrition-profile-summary, .client-review-panel)
  > .panel-heading {
  min-height: 62px;
  padding: 8px 16px;
  flex-wrap: nowrap;
}
.main-shell[data-page='client']
  .client-section
  :is(.upcoming-sessions, .nutrition-profile-summary, .client-review-panel)
  > .panel-heading
  > :is(div, h2) {
  flex: 1 1 0;
}
@media (max-width: 380px) {
  .main-shell[data-page='client'] .upcoming-sessions > .panel-heading > .text-link {
    width: 44px;
    justify-content: center;
  }
  .main-shell[data-page='client'] .upcoming-sessions > .panel-heading > .text-link > span {
    display: none;
  }
}
.client-section .upcoming-sessions {
  margin: 0;
}
.client-section .upcoming-sessions > .agenda-empty {
  padding: 16px;
  margin: 0;
}
.client-section .upcoming-sessions > .btn {
  margin: 0 16px 16px;
}
.client-review-panel {
  padding: 0;
}
.client-review-heading > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.client-review-heading h2 {
  margin: 0;
}
.client-review-heading > .icon-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  min-height: 32px;
}
.client-review-panel .client-alert-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.client-alert-list .client-alert-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 0;
  line-height: 20px;
  border-bottom: 1px solid var(--line);
}
.client-alert-list .client-alert-row + .client-alert-row {
  margin-top: 0;
}
.client-alert-row > .icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--muted);
}
.client-alert-row strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
}
.client-alert-row > div {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}
.client-alert-row > div > span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.client-alert-row > .icon-btn {
  flex-shrink: 0;
}
.client-review-panel .client-review-actions {
  gap: 8px;
  margin: 10px 0 0;
}
.client-review-panel .client-review-note {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.5;
}
.main-shell[data-page='client'] .client-review-panel .client-review-actions .btn {
  flex: 0 1 auto;
  padding-inline: 8px;
  gap: 5px;
}
@media (max-width: 360px) {
  .main-shell[data-page='client'] .client-review-panel .client-review-actions .btn {
    padding-inline: 6px;
  }
}
.client-alert-help {
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
}
.client-alert-help li + li {
  margin-top: 12px;
}
.client-alert-help li > span {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.screen-dock a {
  position: relative;
}
.screen-dock .dock-message-count {
  position: absolute;
  top: 3px;
  left: calc(50% + 5px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: var(--ui-radius);
  background: #d72c45;
  color: #fff;
  border: 1px solid var(--palette-102238, #080f1d);
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
}
.screen-dock .dock-message-count[hidden] {
  display: none;
}

/* Keep numeric badges independent of surrounding text and font metrics. */
:is(.sidebar .nav-count, .notification-badge, .unread-badge, .screen-dock .dock-message-count) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  padding-block: 0;
}
.sidebar .nav-count {
  min-height: 18px;
  min-width: 18px;
}
.unread-badge {
  min-height: 22px;
  min-width: 22px;
}
:is(
  .sidebar .nav-count,
  .notification-badge,
  .unread-badge,
  .screen-dock .dock-message-count
)[hidden] {
  display: none;
}

/* Daily client notes use the workspace typography, controls and colours. */
.main-shell[data-page='notepad'] .page-footer {
  display: none;
}
.personal-notepad {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: calc(100dvh - 140px);
  min-height: 420px;
  max-width: 1100px;
  margin: auto;
}
.personal-notepad .notepad-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-shrink: 0;
  padding: 0;
}
.personal-notepad .notepad-heading > div {
  min-width: 0;
}
.personal-notepad .notepad-heading .eyebrow {
  display: block;
  margin: 0 0 4px;
  font-size: 11px;
}
.personal-notepad .notepad-heading h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.main-shell[data-page='notepad'] .personal-notepad .notepad-heading h1 {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.personal-notepad .notepad-back,
.personal-notepad .notepad-toolbar .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  background: var(--white);
  color: inherit;
  text-decoration: none;
  font-size: 24px;
  flex-shrink: 0;
}
.personal-notepad :is(.notepad-back, .notepad-toolbar .icon-btn) > .icon {
  width: 18px;
  height: 18px;
}
.notepad-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.personal-notepad .notepad-toolbar input {
  width: 166px;
  min-width: 0;
  height: 36px;
  box-sizing: border-box;
  padding: 7px 10px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  font-family: inherit;
  font-size: 14px;
  background: var(--white);
  color: inherit;
}
.personal-notepad .notepad-toolbar .btn,
.personal-notepad .notepad-footer .btn {
  min-height: 40px;
  margin: 0;
  padding: 8px 12px;
  white-space: nowrap;
}
.main-shell[data-page='notepad'] .personal-notepad :is(textarea, .notepad-editor) {
  flex: 1;
  min-height: 150px;
  max-height: none;
  width: 100%;
  margin: 0;
  resize: none;
  box-sizing: border-box;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.55;
  background: var(--white);
  color: inherit;
}
.notepad-editor {
  position: relative;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  outline: none;
}
.notepad-editor:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--navy) 12%, transparent);
}
.notepad-editor[data-empty='true']::before {
  content: attr(data-placeholder);
  position: absolute;
  inset: 16px;
  pointer-events: none;
  color: var(--muted);
}
.notepad-editor > :is(div, p) {
  margin: 0;
  min-height: 1.55em;
}
.notepad-editor ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.notepad-editor li {
  position: relative;
  padding-left: 28px;
  min-height: 28px;
}
.notepad-editor ul[data-note-list='dash'] > li {
  padding-left: 20px;
  min-height: 1.55em;
}
.notepad-editor ul[data-note-list='dash'] > li::before {
  content: '-';
  position: absolute;
  left: 0;
  top: 0;
  color: inherit;
}
.notepad-editor ul[data-note-list='number'] {
  counter-reset: note-number;
}
.notepad-editor ul[data-note-list='number'] > li {
  counter-increment: note-number;
  padding-left: 34px;
  min-height: 1.55em;
}
.notepad-editor ul[data-note-list='number'] > li::before {
  content: counter(note-number) '.';
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  text-align: right;
  color: inherit;
}
.notepad-editor li[data-note-check='true'] {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.notepad-editor input[data-note-checkbox] {
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  min-height: 20px !important;
  margin: 0;
  padding: 0;
  accent-color: var(--navy);
  cursor: pointer;
}
.notepad-editor mark {
  padding: 0 1px;
  border-radius: 2px;
  color: #17243a;
}
.notepad-editor [data-note-color] {
  color: #17243a !important;
  border-radius: 2px;
}
:is(
  .notepad-editor [data-note-color='yellow'],
  .notepad-formatting [data-note-color-button='yellow'] > span
) {
  background-color: #ffe69a;
}
:is(
  .notepad-editor [data-note-color='green'],
  .notepad-formatting [data-note-color-button='green'] > span
) {
  background-color: #bce8be;
}
:is(
  .notepad-editor [data-note-color='blue'],
  .notepad-formatting [data-note-color-button='blue'] > span
) {
  background-color: #b9dcff;
}
:is(
  .notepad-editor [data-note-color='pink'],
  .notepad-formatting [data-note-color-button='pink'] > span
) {
  background-color: #f6c2dc;
}
:is(
  .notepad-editor [data-note-color='purple'],
  .notepad-formatting [data-note-color-button='purple'] > span
) {
  background-color: #d9c9fa;
}
.notepad-formatting,
.notepad-color-tools {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.notepad-color-tools {
  flex-direction: row-reverse;
  margin: 0;
  border-top: 0;
  border-radius: var(--ui-radius) 0 var(--ui-radius) var(--ui-radius);
}
#app .personal-notepad .notepad-formatting .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px !important;
  margin: 0;
  padding: 0 !important;
  border-radius: var(--ui-radius);
}
.notepad-formatting .icon {
  width: 17px;
  height: 17px;
}
.notepad-list-picker {
  display: flex;
  position: relative;
  flex-shrink: 0;
}
.notepad-list-options {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  position: absolute;
  z-index: 8;
  box-sizing: border-box;
  right: -3px;
  top: calc(100% - 1px);
  width: max-content;
  color: var(--ink);
  filter: drop-shadow(0 8px 12px #0a152724);
}
.notepad-list-options[hidden] {
  display: none;
}
.notepad-list-options :is(.notepad-list-types, .notepad-color-tools) {
  box-sizing: border-box;
  padding: 4px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: none;
}
.notepad-list-options .notepad-list-types {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 42px;
  border-bottom: 0;
  border-radius: var(--ui-radius) var(--ui-radius) 0 0;
}
.notepad-list-options .notepad-color-tools {
  border-top: 0;
}
#app .personal-notepad .notepad-formatting [data-note-list-toggle] {
  flex-basis: 36px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px !important;
}
#app .personal-notepad .notepad-formatting .notepad-list-options .btn {
  display: flex;
  flex: none;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0 !important;
  background: var(--white);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: none;
  transform: none;
}
.notepad-list-options .btn:disabled {
  opacity: 1;
  cursor: default;
}
.notepad-list-options .btn:disabled > span {
  opacity: 0.45;
}
.notepad-number-icon {
  width: 17px;
  text-align: center;
  flex-shrink: 0;
  font-size: 13px;
}
.notepad-formatting [data-note-color-button] > span {
  display: block;
  width: 16px;
  height: 16px;
  border: 1px solid #17243a40;
  border-radius: 4px;
}
.notepad-formatting [data-note-color-button='clear'] > span {
  background: #fff;
}
#app
  .personal-notepad
  .notepad-formatting
  .notepad-list-options
  .btn:is([aria-pressed='true'], [aria-checked='true']) {
  border-color: var(--navy);
  box-shadow: inset 0 0 0 1px var(--navy);
}
.notepad-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.notepad-status,
.notepad-help {
  font-size: 12px;
  color: var(--muted);
}
.notepad-status[hidden] {
  display: none;
}
.notepad-status[data-error='true'] {
  color: var(--danger, #b42336);
}
.notepad-help {
  min-width: 0;
}
.notepad-help summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.notepad-help summary .icon {
  width: 16px;
  height: 16px;
}
.notepad-help p {
  margin: 8px 0 0;
  line-height: 1.5;
  max-width: 640px;
}
.notepad-footer:has(details[open]) {
  align-items: flex-start;
}
.notepad-clients {
  display: grid;
  gap: 10px;
  padding: 16px;
}
@media (max-width: 800px) {
  .screen-app .main-shell[data-page='notepad'] main {
    padding: 12px;
  }
  .screen-app .main-shell[data-page='notepad'] .screen-stage {
    padding: 0;
    overflow: hidden;
    height: 100%;
  }
  .screen-app .personal-notepad {
    height: 100%;
    min-height: 0;
    gap: 10px;
  }
  .screen-app .personal-notepad :is(textarea, .notepad-editor) {
    min-height: 80px;
    padding: 12px;
    line-height: 1.45;
  }
  .screen-app .notepad-editor[data-empty='true']::before {
    inset: 12px;
  }
  .personal-notepad .notepad-heading h1 {
    font-size: 24px;
  }
  .personal-notepad .notepad-heading .eyebrow {
    font-size: 10px;
    margin-bottom: 2px;
  }
  .notepad-toolbar {
    gap: 6px;
  }
  .personal-notepad .notepad-toolbar input {
    flex: 1;
    width: 0;
  }
  .notepad-footer {
    gap: 8px;
  }
  .notepad-help {
    font-size: 11px;
  }
  .personal-notepad .notepad-footer .btn {
    font-size: 12px;
  }
}

.notepad-footer .notepad-help {
  width: 100%;
}
.notepad-footer .notepad-help [data-note-download] {
  margin-top: 10px;
}
.personal-notepad .notepad-heading > div:not(.notepad-formatting) {
  flex: 1;
}
.personal-notepad .notepad-options-toggle {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  background: var(--white);
  color: var(--ink);
  flex-shrink: 0;
}
.notepad-options-panel {
  flex: 0 1 auto;
  min-height: 0;
  box-sizing: border-box;
  width: 100%;
  max-height: 40dvh;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  background: var(--white);
  color: var(--ink);
}
.personal-notepad .notepad-toolbar .btn {
  height: 36px;
  min-height: 36px;
  padding: 7px 12px;
}
.personal-notepad > .notepad-footer {
  min-height: 0;
  max-height: 25dvh;
  overflow: auto;
  overscroll-behavior: contain;
}
.notepad-search-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
.notepad-search-panel[hidden] {
  display: none;
}
.notepad-search-field {
  display: block;
  margin: 0;
  flex-shrink: 0;
}
.notepad-search-field > span {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  line-height: 1.4;
}
.personal-notepad .notepad-search-field input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.notepad-search-feedback {
  flex-shrink: 0;
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}
.notepad-search-results {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.notepad-search-result {
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-sizing: border-box;
  width: 100%;
  padding: 9px 2px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.notepad-search-result strong {
  font-size: 12px;
  line-height: 1.4;
}
.notepad-search-result span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.notepad-search-result:hover:where(html:not([data-touch-input]) *),
.notepad-search-result:focus-visible {
  background: var(--paper);
}
.personal-notepad .notepad-date-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  flex: 1;
  min-width: 0;
  max-width: 180px;
  height: 36px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  background: var(--white);
  color: inherit;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.notepad-date-toggle > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notepad-date-toggle > .icon {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  transform: rotate(90deg);
}
.notepad-date-toggle[aria-expanded='true'] > .icon {
  transform: rotate(-90deg);
}
.notepad-days-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
.notepad-days-panel[hidden] {
  display: none;
}
.notepad-days-panel .notepad-month-label {
  margin: 12px 0 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
.notepad-days-panel section:first-child .notepad-month-label {
  margin-top: 0;
}
.notepad-days-panel [aria-current='true'] {
  background: var(--sky-soft);
}

/* Reuse the chat's visual-viewport editor, keeping the original note surface
   and controls rather than replacing the screen with a blank document. */
@media (max-width: 760px), (max-width: 960px) and (max-height: 500px) {
  body.screen-app.screen-notepad-open .main-shell {
    position: fixed;
    top: var(--screen-top, 0px);
    left: 0;
    width: 100%;
    height: var(--screen-height, 100dvh);
    grid-template-rows: minmax(0, 1fr) calc(56px + env(safe-area-inset-bottom));
  }
  body.screen-app.screen-notepad-open.screen-notepad-typing .main-shell {
    grid-template-rows: minmax(0, 1fr);
  }
  .screen-notepad-open:not(.screen-notepad-typing) .screen-dock {
    display: grid;
    grid-row: 2;
  }
  .screen-notepad-typing .screen-dock {
    display: none;
  }
  .screen-notepad-typing .personal-notepad > :is(.notepad-toolbar, .notepad-footer) {
    display: none;
  }
  .screen-notepad-open
    :is(.topbar, .workout-resume, #main-content > .page-heading, #main-content > .screen-controls) {
    display: none;
  }
  .screen-notepad-open .main-shell[data-page='notepad'] #main-content {
    padding: 0;
    gap: 0;
    grid-template-areas: 'content';
    grid-template-rows: minmax(0, 1fr);
  }
  .screen-notepad-open .personal-notepad {
    padding: max(6px, env(safe-area-inset-top)) 12px max(8px, env(safe-area-inset-bottom));
    gap: 6px;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
    margin: 0;
    max-width: none;
  }
  .screen-notepad-open .notepad-heading {
    gap: 8px;
  }
  .screen-notepad-open .notepad-heading .eyebrow {
    display: none;
  }
  .screen-notepad-open .notepad-heading h1 {
    font-size: 24px;
    line-height: 1.2;
  }
  .screen-notepad-open .personal-notepad .notepad-date-toggle {
    max-width: none;
  }

  .screen-notepad-open .main-shell[data-page='notepad'] .personal-notepad .notepad-editor {
    min-height: 0;
    padding: 12px;
  }
}
/* Keep touch scrolling inside the mobile workspace, including above a keyboard. */
@media (max-width: 760px), (max-width: 960px) and (max-height: 500px) {
  html:has(body.screen-app) {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }
  body.screen-app {
    position: fixed;
    inset: 0 0 auto;
    width: 100%;
    min-height: 0;
    overscroll-behavior: none;
  }
  .screen-app .personal-notepad textarea {
    overscroll-behavior-y: contain;
    touch-action: pan-y;
  }
}
.notepad-sync-conflict {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  background: var(--sky-soft);
  color: var(--ink);
}
.notepad-sync-conflict[hidden],
.notepad-sync-conflict [hidden] {
  display: none;
}
.notepad-sync-conflict p {
  margin: 0 0 8px;
  font-size: 12px;
}
.notepad-sync-conflict [data-note-versions] {
  display: grid;
  gap: 10px;
  margin: 10px 0;
}
.notepad-sync-conflict textarea {
  width: 100%;
  resize: vertical;
  font-size: 13px;
}
.notepad-sync-conflict > button {
  margin-right: 8px;
  font-size: 12px;
}

.notepad-import-picker {
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 1px dashed var(--line);
  border-radius: var(--ui-radius);
  padding: 16px;
  color: var(--ink);
}
.notepad-import-picker input {
  max-width: 100%;
}
.notepad-import-picker small {
  color: var(--muted);
  font-size: 12px;
}
.notepad-import-form .context-help {
  margin-top: 12px;
}
.notepad-import-form textarea {
  min-height: 220px;
  max-height: 45vh;
  font-size: 14px;
  line-height: 1.5;
}
.notepad-import-form .modal-actions .btn {
  min-height: 36px;
  padding: 8px 12px;
}
.notepad-import-unclear {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  background: var(--sky-soft);
  font-size: 12px;
}
.notepad-import-unclear ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.notepad-import-resume {
  margin-top: 12px;
}
@media (max-width: 760px) {
  .personal-notepad .notepad-heading {
    gap: 8px;
  }
}
