#noteLayoutV5Stage {
  position: relative;
  margin-right: auto;
  margin-left: auto;
  overflow: visible;
}

#noteLayoutV5Viewport {
  position: relative;
  transform-origin: top left;
}

html[data-note-layout-preference="manual"] body {
  overflow-x: hidden;
}

.note-layout-v5-panel {
  position: absolute;
  right: 0;
  bottom: 64px;
  width: 286px;
  padding: 15px;
  display: none;
  border: 1px solid var(--border-subtle, #ececec);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.16);
  pointer-events: auto;
}

.note-module-hub.panel-open .note-layout-v5-panel {
  display: block;
}

.note-layout-v5-panel h3 {
  margin: 0 28px 7px 0;
  color: var(--text-primary, #262626);
  font-size: 15px;
  font-weight: 600;
}

.note-layout-v5-panel p {
  margin: 0 0 12px;
  color: #777;
  font-size: 12px;
  line-height: 1.65;
}

.note-layout-v5-close {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: #777;
  background: var(--surface-subtle, #f5f5f5);
  font-size: 20px;
}

.note-layout-v5-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.note-layout-v5-options button {
  min-height: 42px;
  padding: 0 8px;
  border: 1px solid var(--border-subtle, #ececec);
  border-radius: 8px;
  color: #666;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
}

.note-layout-v5-options button.is-active {
  color: #fff;
  border-color: var(--brand-default, #d62d46);
  background: var(--brand-default, #d62d46);
}

.note-layout-v5-options button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.note-layout-v5-status {
  margin-top: 10px !important;
  margin-bottom: 0 !important;
  color: #a23c35 !important;
}

@media (max-width: 420px) {
  .note-layout-v5-panel {
    width: min(286px, calc(100vw - 24px));
  }
}
