body.vpa-thinking-board-scroll-lock {
  overflow: hidden;
}

.vpa-thinking-board {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(20, 24, 32, 0.92) 0%, rgba(10, 13, 18, 0.78) 100%);
  border: 1px solid rgba(48, 54, 61, 0.7);
  box-shadow: 0 28px 60px -26px rgba(18, 255, 164, 0.4);
  overflow: hidden;
  isolation: isolate;
}

.vpa-thinking-board::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.28), transparent 55%),
              radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.16), transparent 45%);
  opacity: 0.75;
  pointer-events: none;
}

.vpa-thinking-board > * {
  position: relative;
  z-index: 1;
}

.vpa-thinking-board-form {
  display: grid;
  gap: 1.1rem;
  padding: 1.5rem;
  border-radius: 22px;
  background: rgba(8, 10, 15, 0.76);
  border: 1px solid rgba(34, 197, 94, 0.2);
  backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vpa-thinking-board-form:hover {
  border-color: rgba(34, 197, 94, 0.32);
  box-shadow: 0 18px 30px -24px rgba(18, 255, 164, 0.55);
}

.vpa-thinking-board textarea[name="status_text"] {
  width: 100%;
  min-height: 130px;
  padding: 1.1rem 1.25rem;
  border-radius: 18px;
  background: rgba(15, 18, 26, 0.95);
  border: 1px solid rgba(48, 54, 61, 0.8);
  color: #F0F6FC;
  font-size: 1.05rem;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vpa-thinking-board textarea[name="status_text"]:focus {
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.24);
  outline: none;
}

.vpa-thinking-board-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.vpa-thinking-board-count {
  color: #8B949E;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vpa-thinking-board-form-actions {
  display: flex;
  gap: 0.75rem;
}

.vpa-thinking-board-add-song,
.vpa-thinking-board-add-prompt,
.vpa-thinking-board-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.vpa-thinking-board-add-song {
  background: rgba(34, 197, 94, 0.15);
  color: #8CF7B9;
  border-color: rgba(34, 197, 94, 0.4);
}

.vpa-thinking-board-add-song:hover,
.vpa-thinking-board-add-song:focus {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px -14px rgba(34, 197, 94, 0.7);
  outline: none;
}

.vpa-thinking-board-add-song[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.vpa-thinking-board-submit {
  background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
  color: #05130B;
  border: none;
  box-shadow: 0 16px 36px -22px rgba(34, 197, 94, 0.9);
}

.vpa-thinking-board-submit:hover,
.vpa-thinking-board-submit:focus {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 22px 44px -24px rgba(34, 197, 94, 1);
  outline: none;
}

.vpa-thinking-board-form.is-busy .vpa-thinking-board-submit {
  opacity: 0.65;
  pointer-events: none;
}

.vpa-thinking-board-form.is-busy .vpa-thinking-board-submit::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(5, 19, 11, 0.4);
  border-top-color: rgba(5, 19, 11, 0.8);
  border-radius: 50%;
  animation: vpa-spin 0.7s linear infinite;
}

@keyframes vpa-spin {
  to { transform: rotate(360deg); }
}

.vpa-thinking-board-selected {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  padding: 0.8rem 1.1rem;
  border-radius: 16px;
  background: rgba(10, 13, 18, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.vpa-thinking-board-selected-info {
  color: #93C5FD;
  font-size: 0.9rem;
  line-height: 1.4;
}

.vpa-thinking-board-selected-remove {
  background: transparent;
  color: #93C5FD;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.vpa-thinking-board-feedback {
  font-size: 0.9rem;
  min-height: 1.25rem;
  color: #8CF7B9;
  transition: opacity 0.2s ease;
}

.vpa-thinking-board-feedback.is-error {
  color: #F87171;
}

.vpa-thinking-board-feed {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.vpa-thinking-board-card {
  position: relative;
  padding: 1.5rem;
  border-radius: 22px;
  background: rgba(9, 12, 18, 0.82);
  border: 1px solid rgba(48, 54, 61, 0.8);
  box-shadow: 0 24px 40px -32px rgba(0, 0, 0, 0.8);
  animation: vpa-fade-up 0.35s ease both;
}

@keyframes vpa-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.vpa-thinking-board-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.vpa-thinking-board-card-time {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8991A7;
}

.vpa-thinking-board-delete {
  background: rgba(248, 113, 113, 0.14);
  color: #FCA5A5;
  border: 1px solid rgba(248, 113, 113, 0.32);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.vpa-thinking-board-delete:hover,
.vpa-thinking-board-delete:focus {
  background: rgba(248, 113, 113, 0.24);
  border-color: rgba(248, 113, 113, 0.45);
  outline: none;
}

.vpa-thinking-board-status {
  color: #D1D9E6;
  font-size: 1rem;
  line-height: 1.7;
}

.vpa-thinking-board-status p {
  margin: 0 0 0.65rem 0;
}

.vpa-thinking-board-song {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1rem;
  padding: 0.75rem 0.95rem;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.42);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

/* Prompt appearance in feed (mirror song styles) */
.vpa-thinking-board-prompt {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-top: 1rem;
  padding: 0.75rem 0.95rem;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.42);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.vpa-thinking-board-prompt-meta {
  display: flex;
  flex-direction: column;
}

.vpa-thinking-board-prompt-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #E0F2FF;
}

.vpa-thinking-board-prompt-excerpt {
  margin: 0.35rem 0 0 0;
  font-size: 0.9rem;
  color: #CFE8FF;
  line-height: 1.45;
}

.vpa-thinking-board-song img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}

.vpa-thinking-board-song-meta {
  display: flex;
  flex-direction: column;
}

.vpa-thinking-board-song-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #E0F2FF;
}

.vpa-thinking-board-card-footer {
  margin-top: 1rem;
}

.vpa-thinking-board-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  border-radius: 18px;
  background: rgba(13, 17, 23, 0.78);
  border: 1px dashed rgba(34, 197, 94, 0.35);
  color: #8B949E;
}

.vpa-thinking-board-load-more {
  align-self: center;
  padding: 0.75rem 2.25rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
  color: #8CF7B9;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vpa-thinking-board-load-more:hover,
.vpa-thinking-board-load-more:focus {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -26px rgba(34, 197, 94, 0.7);
  outline: none;
}

.vpa-thinking-board-load-more.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.vpa-thinking-board-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 999;
}

.vpa-thinking-board-modal[hidden] {
  display: none;
}

.vpa-thinking-board-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 11, 0.78);
  backdrop-filter: blur(8px);
}

.vpa-thinking-board-modal-dialog {
  position: relative;
  width: min(560px, calc(100vw - 2.5rem));
  max-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
  background: rgba(9, 12, 18, 0.92);
  border-radius: 24px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 28px 60px -24px rgba(15, 23, 42, 0.65);
  overflow: hidden;
}

.vpa-thinking-board-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(48, 54, 61, 0.7);
}

.vpa-thinking-board-modal-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #F0F6FC;
}

.vpa-thinking-board-modal-close {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.vpa-thinking-board-modal-close:hover,
.vpa-thinking-board-modal-close:focus {
  color: #E2E8F0;
  outline: none;
}

.vpa-thinking-board-modal-body {
  padding: 1.25rem 1.5rem 1.75rem;
  overflow: auto;
}

.vpa-thinking-board-song-search,
.vpa-thinking-board-prompt-search {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 18, 26, 0.95);
  color: #E2E8F0;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.vpa-thinking-board-song-search:focus {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
  outline: none;
}

.vpa-thinking-board-modal-results {
  display: grid;
  gap: 0.85rem;
}

.vpa-thinking-board-modal-results[data-loading='true']::before {
  content: 'Searching…';
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: #94A3B8;
}

.vpa-thinking-board-modal-result {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 0.75rem;
  border-radius: 16px;
  border: 1px solid transparent;
  background: rgba(14, 18, 24, 0.85);
  color: #E2E8F0;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.vpa-thinking-board-modal-result:hover,
.vpa-thinking-board-modal-result:focus {
  transform: translateY(-1px);
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(14, 18, 24, 0.95);
  outline: none;
}

.vpa-thinking-board-modal-result img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
}

.vpa-thinking-board-modal-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.vpa-thinking-board-modal-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.vpa-thinking-board-modal-channel {
  font-size: 0.78rem;
  color: #94A3B8;
}

.vpa-thinking-board-modal-empty {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #94A3B8;
}

@media (max-width: 768px) {
  .vpa-thinking-board {
    padding: 1.25rem;
    border-radius: 24px;
  }

  .vpa-thinking-board-form {
    padding: 1.25rem;
    border-radius: 18px;
  }

  .vpa-thinking-board textarea[name="status_text"] {
    min-height: 110px;
    font-size: 1rem;
  }

  .vpa-thinking-board-form-actions {
    width: 100%;
    justify-content: space-between;
  }

  .vpa-thinking-board-add-song,
  .vpa-thinking-board-submit {
    flex: 1;
    justify-content: center;
  }

  .vpa-thinking-board-selected {
    flex-direction: column;
    align-items: flex-start;
  }

  .vpa-thinking-board-card {
    padding: 1.25rem;
  }

  .vpa-thinking-board-modal-dialog {
    width: min(480px, calc(100vw - 1.5rem));
    border-radius: 20px;
  }
}

@media (max-width: 520px) {
  .vpa-thinking-board-form-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .vpa-thinking-board-form-actions {
    flex-direction: column;
    width: 100%;
  }

  .vpa-thinking-board-add-song,
  .vpa-thinking-board-submit {
    width: 100%;
  }
}
