/* Standalone Style Explorer additions. app.css supplies the core planner look. */

.style-word-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.word-chip,
.color-chip,
.vibe-option,
.pair-choice {
  min-height: 46px;
  border: 1px solid rgba(233, 217, 207, 0.95);
  background: rgba(255, 255, 255, 0.58);
  color: var(--text);
  border-radius: 18px;
  padding: 11px 12px;
  font-weight: 760;
  cursor: pointer;
  text-align: left;
  line-height: 1.08;
  transition: transform 160ms ease, border 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.word-chip:active,
.color-chip:active,
.vibe-option:active,
.pair-choice:active {
  transform: scale(0.985);
}

.word-chip.is-selected,
.color-chip.is-selected,
.vibe-option.is-selected,
.pair-choice.is-selected {
  background: #fff2ea;
  border-color: rgba(154, 107, 88, 0.62);
  color: var(--accent-dark);
  box-shadow: 0 8px 18px rgba(83, 58, 46, 0.08);
}

.word-chip.is-negative-selected {
  background: #f3e4dc;
  color: #6f4638;
  border-color: rgba(111, 70, 56, 0.36);
}

.word-chip .word-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 730;
  letter-spacing: 0.02em;
}

.route-card,
.mini-note,
.vector-note {
  margin-top: 18px;
  border: 1px solid rgba(233, 217, 207, 0.95);
  background: rgba(255, 245, 238, 0.68);
  border-radius: 22px;
  padding: 14px;
}

.route-card p,
.mini-note p,
.vector-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.adaptive-round-card {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.adaptive-round-card .word-chip {
  min-height: 64px;
  border-radius: 22px;
}

.round-counter {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 850;
}

.vibe-list,
.pair-list,
.summary-stack {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.vibe-row,
.pair-row,
.debug-panel {
  border: 1px solid rgba(233, 217, 207, 0.95);
  background: rgba(255, 245, 238, 0.68);
  border-radius: 22px;
  padding: 14px;
}

.vibe-label,
.pair-label {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.vibe-controls,
.pair-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.vibe-option,
.pair-choice {
  min-height: 42px;
  border-radius: 999px;
  padding: 9px 10px;
  text-align: center;
  font-size: 0.88rem;
}

.pair-controls.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.debug-panel h2 {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.debug-pre {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.35;
}

.copy-status {
  margin: 10px 0 0;
  color: var(--accent-dark);
  font-weight: 760;
  font-size: 0.9rem;
}

.screen-actions {
  margin-top: 22px;
}

.screen-actions .primary-btn,
.screen-actions .secondary-btn {
  white-space: normal !important;
  line-height: 1.12 !important;
}

.warning-note {
  margin-top: 16px;
  color: #8c3f45;
  font-size: 0.9rem;
  line-height: 1.4;
  font-weight: 720;
}

@media (max-width: 420px) {
  .style-word-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .word-chip,
  .color-chip {
    min-height: 43px;
    font-size: 0.9rem;
  }

  .vibe-option,
  .pair-choice {
    font-size: 0.78rem;
    padding-left: 6px;
    padding-right: 6px;
  }
}

/* Backend-generated client summary + feedback */
.client-summary-card {
  margin-top: 16px;
  border: 1px solid rgba(154, 107, 88, 0.22);
  background: linear-gradient(180deg, #fff7f1, #f8e9e0);
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 10px 28px rgba(83, 58, 46, 0.08);
}

.client-summary-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1.28;
  letter-spacing: -0.03em;
}

.client-summary-card p {
  color: var(--muted);
  line-height: 1.45;
}

.summary-eyebrow {
  margin-bottom: 8px;
}

.thinking-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}

.thinking-row h2 {
  margin-bottom: 4px;
}

.thinking-row p {
  margin: 0;
}

.thinking-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent-dark);
  animation: thinkingPulse 900ms ease-in-out infinite;
}

@keyframes thinkingPulse {
  0%, 100% { opacity: 0.35; transform: scale(0.84); }
  50% { opacity: 1; transform: scale(1); }
}

.error-card {
  border-color: rgba(140, 63, 69, 0.32);
  background: rgba(255, 242, 234, 0.9);
}

.summary-feedback {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(233, 217, 207, 0.95);
}

.feedback-label {
  margin: 0;
  color: var(--accent-dark) !important;
  font-size: 0.9rem;
  font-weight: 820;
}

.rating-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.rating-button {
  min-height: 40px;
  border: 1px solid rgba(233, 217, 207, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
  font-weight: 830;
  cursor: pointer;
}

.rating-button.is-selected {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fffaf6;
}

.michele-summary-panel p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
  font-weight: 680;
}

.returned-summary-list {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(233, 217, 207, 0.72);
}

.returned-summary-list h3 {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.returned-summary-list ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.45;
}

/* Client-facing local style profile */
.style-profile-card {
  display: grid;
  gap: 18px;
}

.profile-section {
  display: grid;
  gap: 10px;
}

.profile-section + .profile-section {
  padding-top: 2px;
}

.preference-tray-grid {
  display: grid;
  gap: 10px;
}

.preference-tray-item {
  border: 1px solid rgba(233, 217, 207, 0.95);
  background: rgba(255, 255, 255, 0.48);
  border-radius: 20px;
  padding: 12px;
}

.preference-tray-item h3 {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preference-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(233, 217, 207, 0.95);
  border-radius: 999px;
  background: rgba(255, 250, 246, 0.86);
  color: var(--text);
  padding: 7px 10px;
  font-size: 0.88rem;
  font-weight: 720;
  line-height: 1.15;
}

.preference-tray-item.is-text-note .profile-chip {
  width: 100%;
  border-radius: 16px;
  justify-content: flex-start;
  white-space: normal;
}

.style-note-list {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(233, 217, 207, 0.95);
  background: rgba(255, 245, 238, 0.62);
  border-radius: 22px;
  padding: 12px;
}

.style-note-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(233, 217, 207, 0.72);
}

.style-note-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.style-note-label {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 850;
}

.style-note-value {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 820;
}

.style-note-score {
  display: inline-block;
  margin-left: 4px;
  color: var(--muted);
  font-size: 0.78em;
  font-weight: 760;
  letter-spacing: 0;
}

.constellation-cloud {
  position: relative;
  min-height: 230px;
  border: 1px solid rgba(233, 217, 207, 0.95);
  border-radius: 24px;
  background:
    radial-gradient(circle at 24% 28%, rgba(255, 255, 255, 0.82), transparent 18%),
    radial-gradient(circle at 72% 62%, rgba(255, 242, 234, 0.88), transparent 24%),
    linear-gradient(180deg, rgba(255, 250, 246, 0.76), rgba(255, 245, 238, 0.72));
  overflow: hidden;
}

.constellation-cloud::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle, rgba(111, 70, 56, 0.18) 1px, transparent 1.5px);
  background-size: 38px 38px;
  opacity: 0.32;
  pointer-events: none;
}

.constellation-word {
  position: absolute;
  z-index: 1;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  color: var(--accent-dark);
  font-weight: 820;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 0 rgba(255, 250, 246, 0.9);
}

.constellation-word.was-selected {
  color: var(--accent-dark);
  opacity: 1;
}

.constellation-word.was-inferred {
  color: var(--text);
  opacity: 0.68;
}

.constellation-word-1 { left: 50%; top: 18%; font-size: 1.35rem; }
.constellation-word-2 { left: 28%; top: 34%; font-size: 1.12rem; }
.constellation-word-3 { left: 72%; top: 35%; font-size: 1.12rem; }
.constellation-word-4 { left: 47%; top: 51%; font-size: 1.02rem; }
.constellation-word-5 { left: 22%; top: 63%; font-size: 0.96rem; }
.constellation-word-6 { left: 76%; top: 64%; font-size: 0.96rem; }
.constellation-word-7 { left: 38%; top: 78%; font-size: 0.9rem; }
.constellation-word-8 { left: 64%; top: 80%; font-size: 0.9rem; }
.constellation-word-9 { left: 18%; top: 20%; font-size: 0.84rem; }
.constellation-word-10 { left: 84%; top: 22%; font-size: 0.84rem; }

@media (max-width: 420px) {
  .style-profile-card {
    gap: 16px;
  }

  .preference-tray-item {
    padding: 10px;
    border-radius: 18px;
  }

  .profile-chip {
    font-size: 0.82rem;
    padding: 6px 9px;
  }

  .style-note-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .style-note-value {
    font-size: 1rem;
  }

  .constellation-cloud {
    min-height: 210px;
  }

  .constellation-word-1 { font-size: 1.18rem; }
  .constellation-word-2,
  .constellation-word-3 { font-size: 1rem; }
  .constellation-word-4 { font-size: 0.94rem; }
  .constellation-word-5,
  .constellation-word-6 { font-size: 0.88rem; }
  .constellation-word-7,
  .constellation-word-8,
  .constellation-word-9,
  .constellation-word-10 { font-size: 0.78rem; }
}

.rating-scale-labels {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.35rem 0 0.4rem;
  font-size: 0.8rem;
  color: var(--muted-text, #6f645f);
}

.star-rating-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}

.star-rating-button {
  width: 100%;
  min-width: 0;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.75rem 0.5rem;
}

/* When embedded in the full planner, let the parent card provide the outer shell. */
body.is-embedded {
  background: transparent;
}

body.is-embedded .planner-shell {
  width: 100%;
  min-height: 0;
  padding: 0;
  display: block;
}

body.is-embedded .planner-card {
  min-height: 0;
  padding: 18px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
