.funify-notes-page .repo-hero.notes-hero[hidden] {
  display: none;
}

.funify-notes-page .repo-hero.notes-hero[data-personalized-hero='true'] {
  position: relative;
  background: var(--notes-hero-background);
}

.funify-notes-page .notes-hero[data-personalized-hero='true'] .notes-hero-inner {
  display: block;
}

.funify-notes-page .notes-hero[data-personalized-hero='true'] .notes-hero-copy {
  width: 100%;
  max-width: 70%;
  min-width: 0;
  font-family: var(--notes-hero-font, 'Nunito', sans-serif);
}

:root body.funify-notes-page .notes-hero[data-personalized-hero='true'] #notesHeroTitle {
  font-family: var(--notes-hero-font, 'Nunito', sans-serif);
  overflow-wrap: anywhere;
}

.funify-notes-page .notes-hero[data-personalized-hero='true'] .repo-subtitle {
  max-width: 100%;
  font-family: var(--notes-hero-font, 'Nunito', sans-serif);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.notes-hero-eyebrow {
  margin: 0 0 8px;
  color: var(--notes-hero-description, var(--color-muted));
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  line-height: 1.4;
  text-transform: uppercase;
}

.notes-hero-customize {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgb(255 255 255 / 45%);
  color: var(--notes-hero-heading);
  cursor: pointer;
}

.notes-hero-customize:hover {
  border-color: currentColor;
  background: rgb(255 255 255 / 65%);
}

.notes-hero-customize:focus-visible,
.notes-hero-dialog :is(button, input, textarea):focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.notes-hero-customize svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notes-hero-dialog {
  box-sizing: border-box;
  width: min(680px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 24px 80px rgb(15 30 60 / 24%);
  font-family: 'Nunito', sans-serif;
}

.notes-hero-dialog::backdrop {
  background: rgb(10 22 45 / 45%);
  backdrop-filter: blur(4px);
}

.notes-hero-dialog form {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100dvh - 66px);
  margin: 0;
  padding: 18px;
  overflow: hidden;
}

.notes-hero-settings {
  display: grid;
  gap: 14px;
  min-height: 0;
  padding: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.notes-hero-settings::-webkit-scrollbar {
  width: 6px;
}

.notes-hero-settings::-webkit-scrollbar-track {
  background: transparent;
}

.notes-hero-settings::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--color-border);
}

.notes-hero-dialog-heading {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.notes-hero-dialog h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
}

.notes-hero-status {
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.5;
}

.notes-hero-preview {
  flex-shrink: 0;
  box-sizing: border-box;
  min-width: 0;
  max-height: 40dvh;
  overflow-y: auto;
  padding: 18px;
  border-radius: 18px;
  background: var(--notes-hero-background);
  color: var(--notes-hero-description);
  font-family: var(--notes-hero-font);
  overflow-wrap: anywhere;
}

.notes-hero-preview h3 {
  margin: 8px 0;
  color: var(--notes-hero-heading);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.2;
}

.notes-hero-preview > p:last-child {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
  white-space: pre-line;
}

.notes-hero-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
}

.notes-hero-field :is(input, textarea) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-background);
  color: var(--color-text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.notes-hero-field textarea {
  resize: vertical;
}

.notes-hero-options {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.notes-hero-options legend {
  margin-bottom: 9px;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
}

.notes-hero-backgrounds {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.notes-hero-background-option {
  position: relative;
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-size: 10px;
  text-align: center;
}

.notes-hero-background-option input {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--color-primary);
}

.notes-hero-swatch {
  display: block;
  height: 42px;
  border: 1px solid rgb(36 52 78 / 8%);
  border-radius: 8px;
}

.notes-hero-background-option:has(input:checked),
.notes-hero-font-option:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--notes-workspace-soft);
}

.notes-hero-fonts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.notes-hero-font-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
}

.notes-hero-font-option input,
.notes-hero-welcome-toggle input {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--color-primary);
}

.notes-hero-welcome-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  font-size: 13px;
  white-space: nowrap;
}

.notes-hero-dialog-actions {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.notes-hero-status {
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.5;
}

.notes-hero-status:empty,
.notes-hero-dialog [hidden],
.notes-hero[data-personalized-hero='true'] [hidden] {
  display: none !important;
}

body[data-notes-theme='dark'] .notes-hero-customize {
  background: rgb(255 255 255 / 8%);
}

body[data-notes-theme='dark'] .notes-hero-customize:hover {
  background: rgb(255 255 255 / 15%);
}

@media screen and (max-width: 1024px) {
  .funify-notes-page .notes-hero[data-personalized-hero='true'] .notes-hero-copy {
    max-width: 100%;
    padding-right: 30px;
  }
}

@media screen and (max-width: 480px) {
  .notes-hero-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
    padding: 6px;
    border-radius: 12px;
  }

  .notes-hero-dialog form {
    max-height: calc(100dvh - 34px);
    padding: 12px;
  }

  .notes-hero-dialog h2 {
    font-size: 21px;
  }

  .notes-hero-preview {
    padding: 18px;
  }

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

  .notes-hero-fonts {
    grid-template-columns: 1fr;
  }
}

.funify-notes-page .repo-hero.notes-hero[data-hero-image='true'],
.notes-hero-preview[data-hero-image='true'] {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.funify-notes-page .repo-hero.notes-hero[data-hero-image='true']::before,
.funify-notes-page .repo-hero.notes-hero[data-hero-image='true']::after,
.funify-notes-page .notes-hero[data-hero-image='true'] .notes-mobile-waves {
  display: none;
}

.notes-hero-image-row {
  display: grid;
  grid-template-columns: auto minmax(24px, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.notes-hero-image-divider {
  justify-self: center;
  width: 1px;
  height: 34px;
  background: var(--color-border);
}

.notes-hero-image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notes-hero-image-actions .notes-btn:disabled {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
}

@media screen and (max-width: 600px) {
  .notes-hero-image-row {
    display: flex;
    flex-wrap: wrap;
  }

  .notes-hero-image-divider {
    display: none;
  }

  .notes-hero-image-row .notes-hero-welcome-toggle {
    width: 100%;
    min-height: 0;
    margin-left: 0;
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px solid var(--color-border);
    border-left: 0;
  }
}

@media screen and (max-width: 767px) {
  .funify-notes-page .repo-hero.notes-hero {
    display: none;
  }
}

/* The finished banner image supplies its own composition without decorative overlays. */
.funify-notes-page .repo-hero.notes-hero[data-personalized-hero='true']::before,
.funify-notes-page .repo-hero.notes-hero[data-personalized-hero='true']::after,
.funify-notes-page .notes-hero[data-personalized-hero='true'] .notes-mobile-waves {
  display: none;
}

.funify-notes-page .repo-hero.notes-hero[data-hero-default-image='true'],
.notes-hero-preview[data-hero-default-image='true'] {
  background-position: right center;
}

.funify-notes-page .notes-hero[data-hero-default-image='true'] .notes-hero-copy {
  max-width: 40%;
}
