/* Side cards */
.card { top: 64px; height: var(--h, auto); max-height: calc(100% - 140px); overflow: hidden; display: flex; flex-direction: column; border-radius: var(--radius-lg); }
.card.is-sized { max-height: none; }
/* Thin scrollbars everywhere inside cards and dialogs */
.notes-body, #message-bar details, #import-text { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.notes-body::-webkit-scrollbar, #message-bar details::-webkit-scrollbar, #import-text::-webkit-scrollbar { width: 8px; height: 8px; }
.notes-body::-webkit-scrollbar-thumb, #message-bar details::-webkit-scrollbar-thumb, #import-text::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-pill); }
.card[hidden] { display: none; }
.notes-panel { left: 12px; width: var(--w, 340px); }
.code-panel { right: 12px; width: var(--w, 340px); }
.code-panel[hidden] { display: none; }
.notes-body { display: flex; flex-direction: column; gap: 10px; padding: 14px; flex: 1 1 auto; min-height: 0; overflow: auto; }
.notes-heading, .code-title { margin: 0; font-size: var(--fs-micro); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.notes-muted { margin: 0; font-size: var(--fs-small); color: var(--text-muted); }
.notes-text, #code-text {
  width: 100%;
  resize: vertical;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-small);
  transition: border-color 120ms, box-shadow 120ms;
}
.notes-text { min-height: 80px; }
.notes-text:disabled { opacity: 0.5; }
.notes-text::placeholder { color: var(--text-faint); }
.notes-overall { flex: 1 1 auto; min-height: 200px; }
.is-sized .notes-overall { min-height: 80px; resize: none; }
.notes-text:not(.notes-overall) { flex: 0 0 auto; }
.notes-text:focus-visible, #code-text:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 4px 14px; }
#code-actions { display: flex; gap: 2px; }
#code-actions button { height: 26px; padding: 0 8px; font-size: var(--fs-small); color: var(--text-muted); }
#code-actions button:hover { color: var(--text); }
.seg { display: flex; gap: 2px; margin: 4px 12px 8px; padding: 2px; background: var(--surface-2); border-radius: var(--radius-sm); }
.seg button { flex: 1; height: 24px; justify-content: center; font-size: var(--fs-small); color: var(--text-muted); border-radius: 6px; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
#code-text {
  flex: 1 1 auto;
  min-height: 200px;
  resize: none;
  margin: 0 12px 12px;
  width: calc(100% - 24px);
  font-family: var(--mono);
  font-size: var(--fs-small); /* same token as the notes text */
  white-space: pre;
}
