.preview-banner__slot .theme-notes-bar {
  width: 100%;
  justify-content: flex-end;
}

.theme-notes-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
}

.theme-notes-bar-live {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  justify-content: flex-end;
}

.theme-notes-bar-live.is-reserved {
  visibility: hidden;
  pointer-events: none;
}

.theme-notes-bar-live.is-ready {
  visibility: visible;
}

.theme-notes-bar--placeholder {
  pointer-events: none;
}

.theme-notes-bar:not(.theme-notes-bar--placeholder) > .theme-notes-bar-skeleton {
  display: none;
}

.framework-swap {
  transition: opacity 0.22s ease;
}

.framework-swap.is-swapping {
  opacity: 0.55;
}

.framework-swap.is-ready {
  animation: frameworkSwapIn 0.3s ease both;
}

@keyframes frameworkSwapIn {
  from {
    opacity: 0.55;
  }

  to {
    opacity: 1;
  }
}

.framework-shimmer-line {
  display: block;
  height: 10px;
  margin: 0 0 10px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    rgba(128, 128, 128, 0.1) 0%,
    rgba(128, 128, 128, 0.2) 50%,
    rgba(128, 128, 128, 0.1) 100%
  );
  background-size: 200% 100%;
  animation: frameworkShimmer 1.15s ease-in-out infinite;
}

.framework-shimmer-line.w90 {
  width: 90%;
}

.framework-shimmer-line.w85 {
  width: 85%;
}

.framework-shimmer-line.w72 {
  width: 72%;
}

.framework-shimmer-line.w70 {
  width: 70%;
}

.framework-shimmer-line.w65 {
  width: 65%;
}

.framework-shimmer-line.w60 {
  width: 60%;
}

.framework-shimmer-line.w55 {
  width: 55%;
}

.framework-shimmer-line.w48 {
  width: 48%;
}

.framework-shimmer-line.w40 {
  width: 40%;
}

.framework-shimmer-line.w30 {
  width: 30%;
}

.framework-shimmer-line.w20 {
  width: 20%;
}

.framework-shimmer-line.w18 {
  width: 18%;
}

@keyframes frameworkShimmer {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

.framework-load-status {
  margin: 12px 0 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.65;
  animation: frameworkLoadPulse 1.2s ease-in-out infinite;
}

@keyframes frameworkLoadPulse {
  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }
}

.framework-sk-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(128, 128, 128, 0.15);
}

.framework-sk-row .framework-shimmer-line {
  margin: 0;
}

.framework-sk-card {
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid rgba(128, 128, 128, 0.15);
  background: rgba(255, 255, 255, 0.35);
}

.framework-gallery-loading {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.theme-notes-bar-skeleton {
  display: block;
  width: min(200px, 42vw);
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    rgba(128, 128, 128, 0.12) 0%,
    rgba(128, 128, 128, 0.22) 50%,
    rgba(128, 128, 128, 0.12) 100%
  );
  background-size: 200% 100%;
  animation: theme-notes-bar-shimmer 1.2s ease-in-out infinite;
}

@keyframes theme-notes-bar-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.theme-notes-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 7.25em;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: #176b5d;
  color: #fff;
}

.theme-notes-link {
  font-size: 12px;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
  padding: 5px 10px;
  border: 1px solid currentColor;
  border-radius: 8px;
  opacity: 0.9;
}

.theme-notes-link:hover {
  opacity: 1;
}

.theme-notes-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 8000;
  width: min(340px, calc(100vw - 32px));
  max-height: min(50vh, 420px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: #fff;
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  transform: translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.theme-notes-panel.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.theme-notes-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
  font-weight: 800;
}

.theme-notes-panel-close {
  border: 0;
  background: #f3f4f6;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
}

.theme-notes-panel-list {
  overflow: auto;
  padding: 8px;
}

.theme-user-note-card {
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fafafa;
}

.theme-user-note-card strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.theme-user-note-card p {
  margin: 0;
  font-size: 12px;
  color: #4b5563;
  line-height: 1.45;
}

.theme-note-commentary {
  font-style: italic;
}

.theme-note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.theme-note-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  color: #2d5a50;
  background: rgba(23, 107, 93, 0.12);
}

.theme-user-note-card small {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.theme-notes-inject {
  margin: 0 0 16px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(23, 107, 93, 0.45);
  background: rgba(23, 107, 93, 0.06);
}

.theme-notes-inject-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

.theme-notes-inject .theme-user-note-card {
  margin-bottom: 6px;
}

.theme-notes-inject .theme-user-note-card:last-child {
  margin-bottom: 0;
}

.theme-notes-mount-hint {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
}

.theme-slot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.theme-slot-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  background: rgba(128, 128, 128, 0.15);
  border: 1px solid rgba(128, 128, 128, 0.25);
}

body.preview-page .theme-slot-tag {
  color: inherit;
}

.theme-notes-empty {
  padding: 12px;
  font-size: 13px;
  color: #6b7280;
}

[data-personlab-note-id].active {
  outline: 1px dashed rgba(23, 107, 93, 0.35);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .preview-banner__slot .theme-notes-bar {
    justify-content: flex-start;
  }

  .theme-notes-bar-live {
    justify-content: flex-start;
  }
}
