/* Soft blue defaults for selected controls and primary workspace actions. */
.funify-notes-page {
  --notes-selection-accent: #6c9bc2;
  --notes-selection-background: #d4e9f8;
  --notes-selection-hover: #bfdcf2;
  --notes-selection-text: #244864;
}

.funify-notes-page .notes-btn.primary,
.funify-notes-page .notes-btn.active {
  border-color: var(--notes-selection-accent);
  background: var(--notes-selection-background);
  color: var(--notes-selection-text);
}

.funify-notes-page .notes-btn.primary:hover,
.funify-notes-page .notes-btn.active:hover {
  background: var(--notes-selection-hover);
}

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../../fonts/nunito/nunito-variable.ttf') format('truetype');
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../../fonts/plus-jakarta-sans/plus-jakarta-sans-variable.ttf') format('truetype');
}

/* The authenticated dashboard shares the editor's controls and theme tokens. */
.funify-notes-page[data-notes-theme='light'] {
  --color-text: #0c123e;
  --color-muted: #485c91;
  --color-background: #f6f7ff;
  --color-border: #dfe5fa;
  --notes-workspace-soft: #e8eeff;
  background: radial-gradient(ellipse at 65% 0%, #e1edff 0, #f7f8ff 60%, #eeecff 100%);
}

.funify-notes-page .site-header {
  background: linear-gradient(110deg, #0065e8, #005bdd 65%, #0345a7);
  color: #fff;
}

.funify-notes-page .site-header .brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

.notes-workspace-header-search {
  display: flex;
  flex: 0 1 520px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 38px;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 12px;
  background: rgb(255 255 255 / 17%);
  color: #fff;
}

.notes-workspace-header-search input {
  width: 100%;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 12px;
}

.notes-workspace-header-search input::placeholder {
  color: #e9f2ff;
  opacity: 1;
}

.notes-workspace-header-search:focus-within {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.notes-workspace-header-search svg {
  flex: 0 0 19px;
}

.notes-workspace-header-search kbd {
  flex-shrink: 0;
  padding: 3px 5px;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 5px;
  color: #edf4ff;
  font: inherit;
  font-size: 10px;
}

.funify-notes-page .site-header .notes-workspace-header-button,
.funify-notes-page .site-header .menu {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #fff;
}

.funify-notes-page .site-header .notes-workspace-header-button:hover,
.funify-notes-page .site-header .menu:hover {
  background-color: rgb(255 255 255 / 15%);
}

.funify-notes-page .site-header .menu {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linejoin='round'%3E%3Cpath d='m9 3-1 3-3 1 1 3-3 2 3 2-1 3 3 1 1 3 3-1 3 1 1-3 3-1-1-3 3-2-3-2 1-3-3-1-1-3-3 1Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 25px;
}

.funify-notes-page .site-header .menu::before,
.funify-notes-page .site-header .menu::after,
.funify-notes-page .site-header .menu > span,
.funify-notes-page .site-header .site-account-copy {
  display: none;
}

.funify-notes-page .site-header .site-account {
  margin-left: 0;
}

.funify-notes-page .site-header .site-account-trigger {
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.funify-notes-page .site-header .site-account-avatar {
  flex-basis: 36px;
  width: 36px;
  height: 36px;
  background: #fff;
  color: #0065ff;
  font-size: 20px;
  font-weight: 700;
}

.notes-workspace-notifications {
  position: absolute;
  z-index: 100;
  top: calc(100% + 8px);
  right: 24px;
  width: min(320px, calc(100vw - 32px));
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 8px 32px rgb(18 43 111 / 14%);
}

.notes-workspace-notifications h2 {
  margin: 0 0 10px;
  font-size: 17px;
}

.notes-workspace-notifications p {
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.6;
}

.notes-workspace-drive {
  flex: 0 0 auto;
  padding: 10px 8px;
  border: 0;
  background: transparent;
}

.notes-workspace-drive-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
}

.notes-workspace-drive-heading img {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
}

.notes-workspace-drive-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: 11px;
  line-height: 1.3;
}

.notes-workspace-drive-usage {
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 600;
}

.notes-workspace-drive-meter {
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, #075cff 14%, var(--color-surface));
}

.notes-workspace-drive-meter[hidden] {
  display: none;
}

.notes-workspace-drive-meter-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #075cff;
}
.funify-notes-page .notes-hero .notes-hero-mark,
.funify-notes-page .notes-hero .notes-feature-strip {
  display: none;
}

.funify-notes-page .notes-hero-copy {
  position: relative;
  z-index: 1;
  padding-left: 0;
  border: 0;
  font-family: 'Nunito', sans-serif;
}

.funify-notes-page[data-notes-theme='light'] .notes-hero-copy {
  --notes-hero-heading: #102d5a;
  --notes-hero-description: #365b9e;
}

.notes-workspace-greeting {
  margin: 0 0 5px;
  color: var(--notes-hero-description, var(--color-muted));
  font-size: 15px;
  font-weight: 600;
}

.funify-notes-page .notes-page-title[data-page-title-part='title'] {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  font-size: clamp(38px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
}

.funify-notes-page .notes-hero .repo-subtitle[data-page-title-part='description'] {
  max-width: 65%;
  margin-top: 9px;
  color: var(--notes-hero-description, var(--color-muted));
  font-family: 'Nunito', sans-serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.2px;
  line-height: 1.55;
}

.notes-workspace-utilities {
  display: none;
  min-width: 0;
}

.notes-workspace-reserved-panel {
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: color-mix(in srgb, var(--color-surface) 90%, transparent);
  box-shadow: var(--notes-workspace-shadow);
}

.notes-workspace-quick {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.notes-workspace-quick .notes-create-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.notes-workspace-quick .notes-create-actions .notes-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  border-radius: 15px;
  background: var(--notes-quick-note-background, #e3eeff);
  color: var(--notes-quick-text, #0c123e);
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

.notes-workspace-quick .notes-btn svg {
  width: 27px;
  height: 27px;
  color: var(--notes-quick-note-icon, #006bff);
}

.notes-workspace-quick .notes-create-actions .notes-workspace-upload {
  background: var(--notes-quick-upload-background, #e1f6ef);
}

.notes-workspace-quick .notes-workspace-upload svg {
  color: var(--notes-quick-upload-icon, #00bd7d);
}

.notes-workspace-quick .notes-btn:hover:not(:disabled) {
  filter: brightness(0.97);
  transform: translateY(-1px);
}

.notes-workspace-quick .notes-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.notes-workspace-quick .notes-create-actions .notes-workspace-download {
  background: var(--notes-quick-download-background, #f0e8ff);
}

.notes-workspace-quick .notes-workspace-download svg {
  color: var(--notes-quick-download-icon, #9570dd);
}

.funify-notes-page[data-notes-theme='dark'] .notes-workspace-quick {
  --notes-quick-text: var(--color-text);
  --notes-quick-note-background: color-mix(in srgb, #6aa4ff 16%, var(--color-surface));
  --notes-quick-upload-background: color-mix(in srgb, #5ed9b1 14%, var(--color-surface));
  --notes-quick-download-background: color-mix(in srgb, #bc9aff 16%, var(--color-surface));
  --notes-quick-note-icon: #8db8ff;
  --notes-quick-upload-icon: #71dfbb;
  --notes-quick-download-icon: #c5acff;
}

.notes-workspace-reserved-action {
  min-height: 76px;
  border-radius: 15px;
  background: color-mix(in srgb, #aa86ff 13%, var(--color-surface));
}

.notes-workspace-reserved-panel {
  height: 164px;
}

.notes-workspace-heading-group h2 {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.8px;
}

.notes-workspace-count {
  flex-shrink: 0;
  min-width: 34px;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--notes-workspace-soft);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.funify-notes-page .notes-workspace-sort {
  box-sizing: border-box;
  min-width: 100px;
  height: 30px;
  min-height: 30px;
  padding: 4px 28px 4px 10px;
  border-color: var(--color-border);
  border-radius: 8px;
  appearance: none;
  background-color: color-mix(in srgb, var(--color-surface) 75%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237486af' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  font-size: 12px;
  line-height: normal;
  box-shadow: none;
}

.notes-workspace-controls .notes-workspace-icon-button {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.notes-workspace-layout .notes-workspace-icon-button[aria-pressed='true'] {
  background: var(--notes-selection-background);
  color: var(--notes-selection-text);
}

.notes-workspace-note-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--color-surface);
}

/* One compact atlas contains nine center-cropped template covers. */
.notes-workspace-card-cover {
  height: clamp(70px, 6.1vw, 100px);
  margin: 5px 5px 0;
  border-radius: 16px;
  background-image: url('/resources/pic/home/workspace-note-covers_v2.001.jpg');
  background-repeat: no-repeat;
  background-position: center 0%;
  background-size: 100% 900%;
}

.notes-workspace-card-cover[data-handwriting-cover='true'] {
  background: #ffffff;
}

.notes-workspace-handwriting-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Adapt previews without changing the document's images or saved handwriting. */
.funify-notes-page[data-notes-theme='dark']
  .notes-workspace-card-cover:not([data-handwriting-cover='true']) {
  filter: brightness(0.72) saturate(0.9);
}

.funify-notes-page[data-notes-theme='dark']
  .notes-workspace-card-cover[data-handwriting-cover='true'] {
  background: var(--color-surface);
}

.funify-notes-page[data-notes-theme='dark'] .notes-workspace-handwriting-cover {
  filter: invert(0.9) hue-rotate(180deg);
}

.notes-workspace-card-cover[data-cover='1'] {
  background-position-y: 12.5%;
}

.notes-workspace-card-cover[data-cover='2'] {
  background-position-y: 25%;
}

.notes-workspace-card-cover[data-cover='3'] {
  background-position-y: 37.5%;
}

.notes-workspace-card-cover[data-cover='4'] {
  background-position-y: 50%;
  /* Trim the blended atlas boundary above and below the code illustration. */
  background-size: 100% 960%;
}

.notes-workspace-card-cover[data-cover='5'] {
  background-position-y: 62.5%;
}

.notes-workspace-card-cover[data-cover='6'] {
  background-position-y: 75%;
}

.notes-workspace-card-cover[data-cover='7'] {
  background-position-y: 87.5%;
}

.notes-workspace-card-cover[data-cover='8'] {
  background-position-y: 100%;
}

.notes-workspace-note-card .notes-workspace-card-open {
  gap: 9px;
  padding: 10px 14px 0;
}

.notes-workspace-note-card .notes-workspace-card-name {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.3px;
}

.notes-workspace-note-card .notes-workspace-preview {
  min-height: 34px;
  margin: 2px 14px 7px 50px;
  font-size: 12px;
  line-height: 1.45;
}

.notes-workspace-note-card .notes-workspace-card-footer {
  gap: 2px;
  padding: 0 9px 6px 14px;
}

.notes-workspace-note-card .notes-workspace-card-menu {
  position: absolute;
  top: 3px;
  right: 10px;
  flex-shrink: 0;
}

.funify-notes-page .notes-workspace-card-menu svg {
  stroke-width: 3;
}

.notes-workspace-note-card .notes-workspace-date {
  gap: 5px;
  min-width: 0;
  font-size: 10px;
  white-space: nowrap;
}

.funify-notes-page .notes-workspace-icon-button.notes-workspace-trash-restore {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-left: auto;
  border-radius: 8px;
  border-color: transparent;
  background: color-mix(in srgb, var(--notes-selection-accent) 10%, var(--color-surface));
  color: color-mix(in srgb, var(--notes-selection-accent) 70%, var(--color-text));
}

.notes-workspace-trash-restore:disabled {
  cursor: wait;
  opacity: 0.5;
}

.notes-workspace-note-card[data-trash-page] .notes-workspace-card-footer {
  gap: 8px;
}

.notes-workspace-note-card .notes-workspace-card-statuses {
  gap: 0;
}

.notes-workspace-note-card .notes-workspace-card-status {
  flex-basis: 21px;
  width: 21px;
}

.notes-workspace-dashboard[data-layout='list'] .notes-workspace-card-cover {
  display: none;
}

.notes-workspace-dashboard[data-layout='list'] .notes-workspace-note-card {
  overflow: visible;
  padding-right: 0;
  border-radius: 12px;
}

.notes-workspace-dashboard[data-layout='list'] .notes-workspace-preview {
  margin: 8px;
}

@media screen and (min-width: 1025px) {
  .funify-notes-page > .notes-entry-workspace > .wrap,
  .funify-notes-page > .wrap {
    min-height: 100dvh;
  }

  .funify-notes-page .site-header {
    gap: 14px;
    border: 0;
    background: linear-gradient(110deg, #0065e8, #005bdd 65%, #0345a7);
  }

  .notes-workspace-rail {
    padding: 25px 13px 6px;
    background: color-mix(in srgb, var(--color-surface) 45%, transparent);
  }

  .notes-workspace-nav-button {
    min-height: 32px;
    padding-block: 5px;
    font-size: 13px;
  }

  .notes-workspace-rail-heading {
    color: var(--color-text);
    font-size: 12px;
    font-weight: 700;
  }

  .notes-workspace-folder-link {
    min-height: 30px;
    font-size: 12px;
  }

  .funify-notes-page .repo-hero.notes-hero {
    margin: 24px 20px 0;
    border-radius: 24px;
    background: linear-gradient(100deg, #eaf0ff, #dceaff);
  }

  .funify-notes-page .notes-hero-inner {
    display: flex;
    min-height: 192px;
    padding: 23px 24px;
  }

  .funify-notes-page .notes-main {
    margin: 17px 20px 24px;
  }

  .funify-notes-page .notes-workspace-dashboard {
    padding: 0;
  }

  .notes-workspace-note-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .notes-workspace-folder-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .notes-workspace-toolbar {
    margin-bottom: 17px;
  }

  .notes-workspace-utilities {
    display: grid;
    grid-column: 2;
    grid-row: 4;
    gap: 16px;
    margin: 0 20px 24px;
  }

  .notes-workspace-utilities .notes-create-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .notes-workspace-reserved-panel {
    display: none;
  }

  .funify-notes-page[data-notes-workspace-view='document'] .notes-workspace-utilities {
    display: none;
  }

  .funify-notes-page > .notes-entry-workspace > funify-site-footer,
  .funify-notes-page > funify-site-footer {
    display: none;
  }
}

@media screen and (min-width: 1200px) {
  .funify-notes-page > .notes-entry-workspace > .wrap,
  .funify-notes-page > .wrap {
    grid-template-columns:
      var(--notes-workspace-rail-width, 212px) minmax(0, 1fr)
      clamp(250px, 20.5vw, 340px);
    grid-template-rows: 60px auto 1fr;
  }

  .notes-workspace-utilities {
    display: flex;
    grid-column: 3;
    grid-row: 2 / 4;
    flex-direction: column;
    gap: 16px;
    margin: 24px 20px 24px 0;
  }

  .notes-workspace-utilities .notes-create-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notes-workspace-reserved-panel {
    display: block;
  }

  .funify-notes-page[data-notes-workspace-view='document'] .notes-main {
    grid-column: 2 / -1;
  }
}

@media screen and (min-width: 1025px) and (max-height: 740px) {
  .funify-notes-page .notes-hero-inner {
    min-height: 154px;
    padding-block: 18px;
  }

  .notes-workspace-card-cover {
    height: 68px;
  }

  .notes-workspace-reserved-panel {
    height: 130px;
  }
}

@media screen and (max-width: 1024px) {
  .funify-notes-page .site-header {
    position: sticky;
    z-index: 50;
    top: 0;
    flex-wrap: wrap;
    gap: 9px;
    padding: 10px 16px;
    border: 0;
  }

  .funify-notes-page .site-header .brand {
    margin-right: auto;
  }

  .notes-workspace-header-search {
    order: 10;
    flex-basis: 100%;
    margin: 0;
  }

  .funify-notes-page .notes-hero-inner {
    min-height: 150px;
    padding: 22px;
  }

  .funify-notes-page .notes-hero .repo-subtitle[data-page-title-part='description'] {
    max-width: 100%;
  }

  .notes-workspace-utilities {
    display: block;
    margin: 0 16px 22px;
  }

  .notes-workspace-reserved-panel,
  .notes-workspace-reserved-action {
    display: none;
  }

  .notes-workspace-quick .notes-create-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notes-workspace-drive {
    display: none;
  }

  .notes-workspace-note-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .funify-notes-page[data-notes-workspace-view='document'] .notes-workspace-utilities,
  .funify-notes-page[data-notes-workspace-view='document'] .notes-hero {
    display: none;
  }
}

@media screen and (max-width: 599px) {
  .funify-notes-page .site-header .notes-workspace-header-button,
  .funify-notes-page .site-header .menu {
    flex-basis: 30px;
    width: 30px;
  }

  .funify-notes-page .site-header .site-account-avatar {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
  }

  .notes-workspace-header-search kbd {
    display: none;
  }

  .notes-workspace-note-grid {
    grid-template-columns: 1fr;
  }

  .notes-workspace-card-cover {
    height: 100px;
  }

  .notes-workspace-note-card .notes-workspace-preview {
    font-size: 13px;
  }

  .notes-workspace-note-card .notes-workspace-date {
    font-size: 11px;
  }

  .notes-workspace-note-card .notes-workspace-card-status {
    flex-basis: 28px;
    width: 28px;
  }
}

.funify-notes-page[data-notes-theme='dark'] .repo-hero.notes-hero {
  background: linear-gradient(110deg, #17284b, #243859);
}

@media print {
  .notes-workspace-utilities,
  .notes-workspace-notifications {
    display: none !important;
  }
}

html:not([data-notes-access='unlocked']):not([data-notes-preserve-view='true'])
  :is(.notes-workspace-utilities, .notes-workspace-notifications) {
  display: none;
}

@media screen and (max-width: 1024px) {
  .notes-workspace-notifications .notes-workspace-drive {
    display: block;
    border: 0;
    padding: 0;
    box-shadow: none;
  }

  .notes-workspace-notifications:has(.notes-workspace-drive) > p,
  .notes-workspace-notifications:has(.notes-workspace-drive) > h2 {
    display: none;
  }
}

:root body.funify-notes-page #notesHeroTitle {
  color: var(--notes-hero-heading, var(--color-text));
  font-family: 'Nunito', sans-serif;
  font-size: clamp(38px, 5vw, 52px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -1.5px;
}

.funify-notes-page .notes-workspace-header-search svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.notes-workspace-note-card .notes-workspace-local-only,
.notes-workspace-note-card :is(.notes-workspace-remote-only, .notes-workspace-drive-availability),
.notes-workspace-note-card .notes-workspace-manual-upload {
  position: absolute;
  z-index: 1;
  top: 11px;
  left: 11px;
  max-width: calc(100% - 22px);
  overflow: hidden;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgb(255 255 255 / 90%);
  color: #485c91;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.notes-workspace-dashboard[data-transfer-selection='true']
  .notes-workspace-note-card
  :is(
    .notes-workspace-local-only,
    .notes-workspace-remote-only,
    .notes-workspace-drive-availability,
    .notes-workspace-manual-upload
  ) {
  left: 38px;
  max-width: calc(100% - 49px);
}

.notes-workspace-dashboard[data-layout='list'] .notes-workspace-local-only,
.notes-workspace-dashboard[data-layout='list']
  :is(.notes-workspace-remote-only, .notes-workspace-drive-availability),
.notes-workspace-dashboard[data-layout='list'] .notes-workspace-manual-upload {
  display: none;
}

.notes-workspace-quick .notes-create-actions {
  padding: 0;
  border: 0;
  background: transparent;
}

@media screen and (min-width: 1025px) and (max-height: 740px) {
  .funify-notes-page .repo-hero.notes-hero {
    margin-top: 18px;
  }

  .funify-notes-page .notes-hero-inner {
    min-height: 128px;
    padding: 14px 24px;
  }

  .funify-notes-page .notes-hero .repo-subtitle[data-page-title-part='description'] {
    margin-top: 6px;
  }

  .funify-notes-page .notes-main {
    margin-top: 12px;
  }

  .notes-workspace-toolbar {
    margin-bottom: 12px;
  }

  .notes-workspace-card-cover {
    height: 58px;
  }

  .notes-workspace-note-card .notes-workspace-card-open {
    padding-top: 7px;
  }

  .notes-workspace-note-card .notes-workspace-preview {
    min-height: 29px;
    margin-bottom: 4px;
    font-size: 11px;
    line-height: 1.3;
  }

  .notes-workspace-note-card .notes-workspace-card-footer {
    padding-bottom: 4px;
  }

  .notes-workspace-utilities {
    margin-top: 18px;
  }
}

@media screen and (max-width: 1024px) {
  .funify-notes-page > .notes-entry-workspace > .wrap,
  .funify-notes-page > .wrap {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .funify-notes-page .site-header {
    width: 100%;
    height: auto;
    min-height: 104px;
    margin: 0;
    border-radius: 0;
  }
}

@media screen and (max-width: 767px) {
  .funify-notes-page[data-notes-screen='browse'] .site-header {
    position: sticky;
    z-index: 50;
    width: 100%;
    height: auto;
    min-height: 104px;
    margin: 0;
    padding: 10px 16px;
  }
}

.funify-notes-page .site-header .notes-workspace-home {
  text-decoration: none;
}

.funify-notes-page .site-header .notes-workspace-home svg {
  width: 27px;
  height: 27px;
}

.funify-notes-page .site-header .notes-workspace-home-badge {
  fill: #0752c4;
  stroke: none;
}

.funify-notes-page .site-header .notes-workspace-home[aria-disabled='true'] {
  opacity: 0.45;
  cursor: default;
}

@media screen and (max-width: 420px) {
  .funify-notes-page[data-notes-screen='browse'] .site-header {
    column-gap: 6px;
    padding-inline: 12px;
  }
}

.notes-workspace-note-card {
  position: relative;
}

.notes-workspace-note-card[data-transfer-selected='true'] {
  outline: 2px solid var(--notes-selection-accent);
  outline-offset: 2px;
  background: color-mix(in srgb, var(--notes-selection-accent) 10%, var(--color-surface));
}

.notes-workspace-select {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--notes-selection-accent);
}

.notes-workspace-selection-box {
  position: fixed;
  z-index: 10000;
  border: 1px solid var(--notes-selection-accent);
  background: color-mix(in srgb, var(--notes-selection-accent) 16%, transparent);
  pointer-events: none;
}

.notes-workspace-selection-status {
  color: var(--color-text-secondary, #667085);
  font-size: 12px;
}

.notes-workspace-note-grid {
  padding: 6px;
  margin: -6px;
}

.notes-workspace-dashboard[data-layout='list'] .notes-workspace-note-card {
  padding-left: 36px;
}

#notesTransferSelectBtn[aria-pressed='true'] {
  background: var(--notes-selection-background);
  color: var(--notes-selection-text);
}

.notes-workspace-dashboard[data-transfer-selection='true'] .notes-workspace-note-grid {
  touch-action: none;
  user-select: none;
}

.notes-workspace-dashboard[data-transfer-selection='true'] .notes-workspace-note-card {
  cursor: crosshair;
}

.notes-workspace-select[hidden] {
  display: none;
}

#driveUploadBtn[aria-busy='true'],
#driveDownloadBtn[aria-busy='true'] {
  color: var(--notes-selection-text);
  opacity: 1;
}

#driveUploadBtn[aria-busy='true'] svg,
#driveDownloadBtn[aria-busy='true'] svg {
  color: inherit;
  stroke: currentColor;
}
#driveUploadBtn[aria-busy='true'] .notes-workspace-transfer-arrow {
  animation: notes-transfer-up 0.9s ease-in-out infinite;
}

#driveDownloadBtn[aria-busy='true'] .notes-workspace-transfer-arrow {
  animation: notes-transfer-down 0.9s ease-in-out infinite;
}

@keyframes notes-transfer-up {
  0%,
  100% {
    transform: translateY(1.5px);
  }

  50% {
    transform: translateY(-1.5px);
  }
}

@keyframes notes-transfer-down {
  0%,
  100% {
    transform: translateY(-1.5px);
  }

  50% {
    transform: translateY(1.5px);
  }
}

/* Shared scale for the functional controls and personal settings. */
.funify-notes-page .site-header .notes-workspace-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.funify-notes-page .site-header .notes-workspace-header-actions > :is(button, a),
.funify-notes-page .site-header .notes-workspace-header-actions .site-account-trigger {
  display: inline-flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0;
}

.funify-notes-page .site-header .notes-workspace-header-actions > :is(button, a) svg {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.funify-notes-page .site-header .notes-workspace-header-actions .site-account {
  flex: 0 0 40px;
  margin: 0;
}

.funify-notes-page .site-header .notes-workspace-header-actions .site-account-avatar {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--notes-header-hover, rgb(255 255 255 / 45%));
}

.notes-workspace-header-divider {
  flex: 0 0 1px;
  width: 1px;
  height: 22px;
  background: var(--notes-header-line, rgb(36 52 78 / 18%));
}

#notesToolsBtn {
  cursor: default;
}

@media screen and (max-width: 599px) {
  .funify-notes-page .site-header .notes-workspace-header-actions {
    order: 2;
    flex-basis: 100%;
    justify-content: center;
  }
}

@media screen and (max-width: 359px) {
  .funify-notes-page .site-header .notes-workspace-header-actions .site-account {
    position: absolute;
    top: 10px;
    right: 12px;
  }
}

:is(.notes-workspace-floating-create, .notes-workspace-floating-activity) {
  position: fixed;
  right: 24px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--notes-selection-accent);
  border-radius: 50%;
  background: var(--notes-selection-background);
  color: var(--notes-selection-text);
  box-shadow: 0 4px 16px rgb(20 35 68 / 18%);
  cursor: pointer;
}

:is(.notes-workspace-floating-create, .notes-workspace-floating-activity):hover:not(:disabled) {
  background: var(--notes-selection-hover);
}

:is(.notes-workspace-floating-create, .notes-workspace-floating-activity):focus-visible {
  outline: 2px solid var(--notes-selection-accent);
  outline-offset: 3px;
}

:is(.notes-workspace-floating-create, .notes-workspace-floating-activity):disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media print {
  :is(.notes-workspace-floating-create, .notes-workspace-floating-activity) {
    display: none;
  }
}

@media screen and (max-width: 767px) {
  .funify-notes-page .notes-workspace-count {
    padding: 3px 6px;
    font-size: clamp(10px, 2.8vw, 12px);
  }

  .funify-notes-page .notes-workspace-heading-group {
    gap: 8px;
  }

  .notes-workspace-selection-status:empty {
    display: none;
  }
}

.notes-workspace-transfer-icons {
  display: flex;
  align-items: center;
  gap: inherit;
}

.notes-workspace-transfer-icons:empty {
  display: none;
}

@media (max-width: 767px) {
  .funify-notes-page .notes-workspace-quick {
    display: none;
  }

  .funify-notes-page .notes-workspace-controls {
    gap: 4px;
  }

  .funify-notes-page .notes-workspace-sort {
    min-width: 88px;
    max-width: 100px;
    padding-left: 6px;
    padding-right: 22px;
    background-position: right 6px center;
  }

  .notes-workspace-transfer-icons button:disabled {
    opacity: 0.45;
    cursor: default;
  }
}

@media (max-width: 767px) {
  .notes-workspace-dashboard[data-layout='grid']
    .notes-workspace-note-card
    .notes-workspace-card-menu {
    top: -1px;
  }
}

.notes-workspace-dashboard[data-layout='grid'] .notes-workspace-card-statuses > * {
  flex: 0 0 28px;
  width: 28px;
}

@media (max-width: 767px) {
  .funify-notes-page[data-notes-workspace-view='browse'] {
    --notes-mobile-section-gap: 16px;
  }

  .funify-notes-page[data-notes-workspace-view='browse'] .notes-workspace-utilities {
    display: flex;
    flex-direction: column;
    gap: var(--notes-mobile-section-gap);
    margin: var(--notes-mobile-section-gap) 16px 0;
  }

  .funify-notes-page[data-notes-workspace-view='browse']
    .notes-workspace-utilities:has(> #notesWidgetList:empty):has(
      > .notes-widget-status[data-empty='true']
    ) {
    display: none;
  }

  .funify-notes-page[data-notes-workspace-view='browse'] .notes-widget-list {
    gap: var(--notes-mobile-section-gap);
  }

  .funify-notes-page[data-notes-workspace-view='browse'] .notes-main {
    margin-top: var(--notes-mobile-section-gap);
  }

  .funify-notes-page[data-notes-workspace-view='browse'] .notes-workspace-dashboard {
    padding-top: 0;
  }

  .funify-notes-page[data-notes-workspace-view='browse'] .notes-workspace-breadcrumbs {
    margin: 0 0 var(--notes-mobile-section-gap);
  }

  .funify-notes-page[data-notes-workspace-view='browse'] .notes-workspace-toolbar {
    gap: var(--notes-mobile-section-gap);
    margin-bottom: var(--notes-mobile-section-gap);
  }

  .funify-notes-page[data-notes-workspace-view='browse'] .notes-workspace-folder-grid {
    margin-bottom: var(--notes-mobile-section-gap);
  }
}

/* Keep workspace actions together, with an icon-only sort trigger on phones. */
.funify-notes-page .notes-workspace-controls {
  gap: 4px;
}

.notes-workspace-sort-control {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  height: 32px;
  margin-left: 4px;
  border-radius: 10px;
}

.notes-workspace-sort-icon {
  display: none;
}

.funify-notes-page .notes-workspace-sort {
  flex: 0 0 auto;
  width: 108px;
  min-width: 108px;
  max-width: 108px;
  height: 32px;
  min-height: 32px;
  padding: 4px 20px 4px 4px;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--notes-workspace-soft);
  color: var(--color-muted);
  font-size: 13px;
  cursor: pointer;
}

.notes-workspace-controls .notes-workspace-icon-button {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.notes-workspace-controls .notes-workspace-icon-button:not([aria-pressed='true']) {
  background: var(--notes-workspace-soft);
}

.notes-workspace-controls
  .notes-workspace-icon-button:not([aria-pressed='true']):hover:not(:disabled) {
  background: var(--notes-selection-hover);
}

.notes-workspace-controls .notes-workspace-layout,
.notes-workspace-transfer-icons {
  gap: 4px;
}

.notes-workspace-transfer-icons button:disabled {
  opacity: 0.45;
  cursor: default;
}

.funify-notes-page .notes-workspace-dashboard .notes-workspace-sort:focus {
  outline: none;
  box-shadow: none;
}

@media (max-width: 767px) {
  .notes-workspace-sort-control {
    width: 32px;
    color: var(--color-muted);
  }

  .notes-workspace-sort-icon {
    display: block;
    width: 18px;
    height: 18px;
    margin: auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
  }

  .funify-notes-page .notes-workspace-sort {
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    padding: 0;
  }

  .notes-workspace-sort-label,
  .notes-workspace-sort-chevron {
    display: none;
  }
}

.notes-workspace-controls
  .notes-workspace-layout
  .notes-workspace-icon-button[aria-pressed='true'] {
  background: var(--notes-selection-background);
  color: var(--notes-selection-text);
}

.notes-workspace-sort-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notes-workspace-sort-chevron {
  display: block;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notes-workspace-sort-menu {
  position: fixed;
  z-index: 1200;
  box-sizing: border-box;
  width: max-content;
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 3px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-family-title, system-ui, sans-serif);
  box-shadow:
    0 8px 24px rgba(29, 43, 74, 0.16),
    0 2px 4px rgba(29, 43, 74, 0.08);
}

.notes-workspace-sort-menu[hidden] {
  display: none;
}

.notes-workspace-sort-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  padding: 0 4px;
  color: var(--color-muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.notes-workspace-sort-header .notes-workspace-icon-button {
  width: 20px;
  height: 20px;
  border-radius: 6px;
}

.notes-workspace-sort-menu svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notes-workspace-sort-options {
  display: grid;
  gap: 2px;
}

.notes-workspace-sort-option {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 40px;
  padding: 4px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--color-muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.notes-workspace-sort-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.notes-workspace-sort-copy > span {
  color: var(--color-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
}

.notes-workspace-sort-copy small {
  color: var(--color-muted);
  font-size: 10px;
  line-height: 1.3;
}

.notes-workspace-sort-option .notes-workspace-sort-check {
  visibility: hidden;
  width: 13px;
  height: 13px;
}

.notes-workspace-sort-option[aria-checked='true'] {
  background: var(--notes-selection-background);
  color: var(--notes-selection-text);
}

.notes-workspace-sort-option[aria-checked='true'] .notes-workspace-sort-copy > span,
.notes-workspace-sort-option[aria-checked='true'] .notes-workspace-sort-copy small {
  color: var(--notes-selection-text);
}

.notes-workspace-sort-option[aria-checked='true'] .notes-workspace-sort-check {
  visibility: visible;
}

.notes-workspace-sort-option:hover {
  background: var(--notes-selection-hover);
}

.notes-workspace-sort-option:focus-visible,
.notes-workspace-sort-header button:focus-visible {
  outline: 2px solid var(--notes-selection-accent);
  outline-offset: -2px;
}

@media (max-width: 767px) {
  .notes-workspace-sort-chevron {
    display: none;
  }
}

.notes-workspace-original-path {
  min-width: 0;
  margin: 0 14px 8px 50px;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 10px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notes-workspace-drive-heading .notes-workspace-drive-copy {
  flex: 1 1 auto;
}

.notes-workspace-drive-usage {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.funify-notes-page .notes-workspace-icon-button.notes-workspace-drive-refresh {
  flex: 0 0 24px;
  width: 24px;
  height: 26px;
  border: 0;
  background: transparent;
  color: var(--color-muted);
}

.notes-workspace-drive-refresh:disabled {
  cursor: default;
  opacity: 0.45;
}
