/* Make the editor section fill the viewport height */
.editor-wrapper {
  display: flex;
  flex-direction: column;
  /* subtract your header/nav height; tweak 120px if your header is taller/shorter */
  min-height: calc(100dvh - 120px);
}

/* Let CodeMirror grow to fill remaining space */
.editor-wrapper .CodeMirror {
  flex: 1 1 auto;
  height: auto; /* important: let flex define height */
  border: 1px solid var(--bs-border-color);
  border-radius: .5rem;
}

/* Read-only shared page follows the same sizing */
textarea.editor.readonly {
  width: 100%;
  /* match the height budget from above */
  height: calc(100dvh - 160px);
  white-space: pre;
  border: 1px solid var(--bs-border-color);
  border-radius: .5rem;
  padding: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  line-height: 1.4;
}

/* Thick divider above footer */
.app-footer {
  border-top: 6px solid var(--bs-border-color);
  color: var(--bs-secondary-color);
}

.save-hint { opacity: 0; transition: opacity .18s ease-in; }
.save-hint.show { opacity: 1; }

.wrap-btn.active {
  box-shadow: inset 0 0 0 1px var(--bs-success);
}


/* (keep your existing editor sizing rules) */

