/* Local private-note prototype; deliberately independent of poetry styling. */
#note-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
#note-trigger svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linejoin: round;
}
#note-trigger[aria-expanded='true'] {
  color: #f4e8cc;
}
.note-panel {
  position: fixed;
  z-index: 45;
  right: 4.3vw;
  bottom: 102px;
  width: 350px;
  max-width: calc(100vw - 32px);
  max-height: calc(100svh - 136px);
  overflow: auto;
  box-sizing: border-box;
  padding: 29px;
  color: var(--panel-text);
  background: var(--panel-surface);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(18px);
  animation: note-arrive 0.28s ease-out;
  font-family: var(--panel-font);
}
.note-panel[hidden],
.note-panel [hidden] {
  display: none !important;
}
.note-panel * {
  box-sizing: border-box;
}
.note-panel #note-close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: none;
  color: #acc5bb;
  font: 23px var(--panel-font);
  border: 0;
  border-radius: 50%;
}
.note-panel #note-close:hover {
  background: #d2e7d50b;
  color: #fff;
}
.note-eyebrow {
  font:
    8px/1.8 Inter,
    sans-serif;
  letter-spacing: 2px;
  color: #b3c3b9;
  margin: 0 28px 12px 0;
}
.note-panel h2 {
  font-size: 23px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 2px;
  color: var(--panel-heading);
  margin: 0 0 9px;
}
.note-panel #note-private {
  font-size: 13px;
  line-height: 1.7;
  color: #b3c7bd;
  margin: 0 0 25px;
}
.note-panel label {
  display: block;
  font-size: 12px;
  line-height: 1.8;
  color: #d2e5d3;
  margin-top: 17px;
}
.note-panel input,
.note-panel textarea {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #c9d1bc60;
  border-radius: 0;
  background: transparent;
  color: #e0ebdf;
  padding: 9px 0;
  font: 13px/1.9 var(--panel-font);
  outline: none;
  box-shadow: none;
}
.note-panel textarea {
  resize: vertical;
  min-height: 100px;
  max-height: 220px;
}
.note-panel textarea::placeholder {
  color: #7e9d92;
}
.note-panel input:focus,
.note-panel textarea:focus {
  border-bottom-color: #e5dec5;
}
.note-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  font:
    10px/1.6 Inter,
    sans-serif;
  color: var(--panel-muted);
}
.note-panel #note-send {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  margin-top: 18px;
  padding: 12px 16px;
  border: 1px solid #c2dbcc29;
  border-radius: 8px;
  background: #d2e7d51a;
  color: #d2e5d3;
  font: 13px var(--panel-font);
}
.note-panel #note-send:hover {
  background: #d2e7d52b;
}
.note-panel #note-demo {
  text-align: center;
  font:
    10px/1.8 Inter,
    sans-serif;
  color: var(--panel-muted);
  margin: 17px 0 0;
}
.note-panel #note-error {
  font:
    12px/1.7 Inter,
    sans-serif;
  color: #f1c8b2;
  margin: 8px 0 0;
}
.note-panel #note-error:empty {
  display: none;
}
.note-panel #note-success {
  text-align: center;
  padding: 20px 0 12px;
}
.note-success-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #ccd4bb70;
  border-radius: 50%;
  color: #d9e2cc;
  font-size: 22px;
}
.note-panel h3 {
  font-size: 23px;
  font-weight: 400;
  line-height: 1.5;
  margin: 18px 0 12px;
}
.note-panel #note-confirmation {
  color: #b3c7bd;
  font-size: 13px;
  line-height: 1.8;
}
.note-panel #note-again {
  font: 12px var(--panel-font);
  background: none;
  color: #d2e5d3;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid #c9d1bc60;
  border-radius: 0;
}
.note-panel button:focus-visible,
#note-trigger:focus-visible {
  outline: 2px solid #e6dec4;
  outline-offset: 4px;
}
@keyframes note-arrive {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 700px) {
  .home-footer-actions {
    gap: 13px;
  }
  #note-trigger {
    gap: 6px;
  }
  #note-trigger svg {
    width: 17px;
    height: 17px;
  }
  .note-panel {
    right: 16px;
    bottom: 116px;
    padding: 24px;
    width: 350px;
    max-height: calc(100svh - 145px);
  }
  .note-panel h2 {
    font-size: 23px;
  }
  .note-panel input,
  .note-panel textarea {
    font-size: 16px;
  }
}
@media (max-width: 390px) {
  .home-footer-actions {
    gap: 10px;
  }
  #note-trigger span {
    max-width: 70px;
    white-space: normal;
    line-height: 1.5;
  }
  .home-footer-actions #home-scenes {
    max-width: 75px;
  }
}
@media (max-height: 620px) {
  .note-panel {
    bottom: 68px;
    max-height: calc(100svh - 84px);
    padding: 22px;
  }
  .note-panel #note-private {
    margin-bottom: 12px;
  }
  .note-panel textarea {
    min-height: 75px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .note-panel {
    animation: none;
  }
}

/* Keep overflowing notes in the same dark palette as the scene library. */
.note-panel {
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: #a5c2ab59 transparent;
}
.note-panel textarea {
  scrollbar-width: thin;
  scrollbar-color: #a5c2ab59 transparent;
}
.note-panel::-webkit-scrollbar,
.note-panel textarea::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.note-panel::-webkit-scrollbar-track,
.note-panel textarea::-webkit-scrollbar-track {
  background: transparent;
}
.note-panel::-webkit-scrollbar-thumb,
.note-panel textarea::-webkit-scrollbar-thumb {
  background: #a5c2ab59;
  border-radius: 8px;
}
.note-panel::-webkit-scrollbar-thumb:hover,
.note-panel textarea::-webkit-scrollbar-thumb:hover {
  background: #a5c2ab85;
}
.note-panel::-webkit-scrollbar-button,
.note-panel textarea::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
.note-panel::-webkit-scrollbar-corner,
.note-panel textarea::-webkit-scrollbar-corner {
  background: transparent;
}
.note-panel #note-send:disabled {
  opacity: 0.6;
  cursor: wait;
}
.note-panel input:disabled,
.note-panel textarea:disabled {
  opacity: 0.75;
}
