/* ==========================================================================
   styles.css - Tiva Studio Preview
   Requires: base.css (loaded first in studio.html)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Layout container (Studio aligned to Webseite side grid)
   -------------------------------------------------------------------------- */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1240px;
  margin: calc(var(--header-h) + 14px) auto 18px;
  padding-left: var(--side-pad);
  padding-right: var(--side-pad);
}

.app-main {
  display: grid;
  gap: 12px;
}

.app-status-top {
  margin: -4px 0 0;
  padding: 0 2px;
}

/* --------------------------------------------------------------------------
   Panel – base card
   -------------------------------------------------------------------------- */
.panel {
  border: 1px solid var(--line);
  background: var(--panel-bg);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(94, 85, 72, 0.07);
}

.panel.demo-locked {
  position: relative;
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Hero panel
   -------------------------------------------------------------------------- */
.hero-panel {
  padding: 18px;
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(420px, 1fr);
  align-items: start;
  gap: 14px 22px;
}

.hero-copy h1 {
  margin: 0 0 7px;
  line-height: 1.18;
  font-size: clamp(1.35rem, 2.3vw, 1.82rem);
  letter-spacing: 0.01em;
}

.hero-copy h1,
.hero-copy > p {
  grid-column: 1;
}

.hero-copy > p {
  margin: 0;
  font-size: 0.95rem;
  max-width: 48ch;
  color: var(--ink-soft);
}

.hero-signal-composer {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin-top: 0;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(172, 165, 151, 0.44);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.52);
}

.hero-signal-composer label {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
}

.hero-signal-composer textarea {
  margin-top: 0;
  min-height: 112px;
  max-height: 148px;
  background: rgba(255, 255, 255, 0.64);
}

.hero-signal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Studio quick-start steps + scope
   -------------------------------------------------------------------------- */
.studio-quick-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.studio-step {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--btn-green-border);
  background: var(--btn-green-bg);
  color: var(--btn-green-text);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.primary-flow-step {
  min-width: 160px;
  border-color: var(--btn-green-border-strong);
  background: rgba(107, 128, 100, 0.92);
  color: #fffdf8;
}

.flow-next-action {
  margin-top: 12px;
  display: flex;
  justify-content: flex-start;
}

.studio-step:hover,
.studio-step:focus-visible {
  border-color: var(--btn-green-border-strong);
  background: rgba(107, 128, 100, 0.92);
  color: #fffdf8;
}

.primary-flow-step:hover,
.primary-flow-step:focus-visible,
.primary-flow-step.is-active {
  border-color: var(--btn-green-border-strong);
  background: rgba(107, 128, 100, 0.92);
  color: #fffdf8;
}

/* --------------------------------------------------------------------------
   Guest banner
   -------------------------------------------------------------------------- */
.guest-banner {
  display: grid;
  gap: 10px;
}

.guest-banner-compact {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.guest-pill {
  margin: 0;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(172, 165, 151, 0.56);
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.guest-inline {
  font-size: 0.9rem;
}

.preview-capabilities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.86), rgba(242, 248, 238, 0.68)),
    var(--surface);
}

.preview-capability {
  min-height: 126px;
  padding: 14px 14px 13px;
  border: 1px solid rgba(172, 165, 151, 0.38);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.preview-capability-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 22px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(107, 128, 100, 0.13);
  color: var(--sage-strong);
  font-size: 0.72rem;
  font-weight: 800;
}

.preview-capability h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(1rem, 1.2vw, 1.18rem);
  line-height: 1.16;
}

.preview-capability p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.primary-btn,
.cta-btn,
.ghost-btn,
.toolbar-btn,
.studio-step,
.preview-step-btn,
.panel-lock-cta {
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}

.primary-btn:active,
.cta-btn:active,
.ghost-btn:active,
.toolbar-btn:active,
.studio-step:active,
.preview-step-btn:active {
  transform: translateY(1px);
}

.ghost-btn {
  border-color: var(--btn-green-border);
  background: var(--btn-green-bg);
  color: var(--btn-green-text);
  font-size: 0.82rem;
  font-weight: 700;
}

.ghost-btn:hover,
.ghost-btn:focus-visible {
  border-color: var(--btn-green-border-strong);
  background: var(--btn-green-bg-hover);
  color: var(--btn-green-text-hover);
}

button:disabled,
button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

/* --------------------------------------------------------------------------
   Video / canvas preview — redesigned for the 3-phase animated canvas
   -------------------------------------------------------------------------- */
.studio-preview-wrap {
  margin-top: 0;
}

.studio-preview-wrap .preview-placeholder {
  max-width: 760px;
  margin: 0 auto;
  border-color: rgba(114, 135, 109, 0.38);
  background: #eee8dc;
  border-radius: 12px;
  overflow: hidden;
}

.studio-preview-wrap .preview-placeholder video {
  object-fit: cover;
  z-index: 2;
}

.studio-preview-wrap .preview-placeholder canvas {
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
}

/* Agent name label overlaid on the preview */
.preview-agent-label {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  max-width: calc(100% - 24px);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(172, 165, 151, 0.5);
  border-radius: 999px;
  padding: 5px 13px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(10px);
}

/* Step navigation buttons below the preview */
.preview-interaction {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.preview-step-btn {
  min-width: 0;
  min-height: 32px;
  border: 1px solid rgba(172, 165, 151, 0.58);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.1;
  padding: 6px 8px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.preview-step-btn:hover,
.preview-step-btn:focus-visible,
.preview-step-btn.is-active {
  background: rgba(107, 135, 100, 0.92);
  border-color: rgba(82, 108, 76, 0.8);
  color: #fffdf8;
}

.preview-caption {
  max-width: 760px;
  margin: 8px auto 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Builder grid
   -------------------------------------------------------------------------- */
.studio-workflow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.builder-grid {
  display: grid;
  grid-template-columns: minmax(380px, 0.92fr) minmax(420px, 1fr);
  gap: 14px;
  align-items: start;
}

.builder-grid .panel,
.studio-workflow-grid .panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   Signal panel — updated label and textarea
   -------------------------------------------------------------------------- */
.signal-toolbar {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.signal-toolbar-title {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.signal-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.toolbar-btn {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--btn-green-border);
  background: var(--btn-green-bg);
  color: var(--btn-green-text);
  font-size: 0.78rem;
  font-weight: 700;
}

.toolbar-btn:hover,
.toolbar-btn:focus-visible {
  color: var(--btn-green-text-hover);
  background: var(--btn-green-bg-hover);
  border-color: var(--btn-green-border-strong);
}

textarea {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(172, 165, 151, 0.60);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.52;
  resize: vertical;
  min-height: 118px;
  max-height: 190px;
}

.signal-panel textarea {
  min-height: 118px;
  max-height: 150px;
  line-height: 1.58;
  font-size: 0.97rem;
}

.signal-panel textarea::placeholder {
  color: var(--muted);
  font-style: italic;
}

.signal-profile {
  margin-top: 12px;
  border: 1px dashed rgba(172, 165, 151, 0.56);
  border-radius: 10px;
  background: rgba(250, 247, 243, 0.68);
  padding: 10px 11px;
  min-height: 0;
}

.signal-profile h3 {
  margin: 0 0 8px;
  font-size: 0.84rem;
  color: var(--ink);
}

.signal-profile-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.signal-profile-row {
  margin: 0;
  display: grid;
  gap: 3px;
  align-items: start;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.signal-profile-row strong {
  color: var(--ink);
  font-weight: 600;
  text-align: left;
  overflow-wrap: anywhere;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(172, 165, 151, 0.55);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.profile-summary {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  background: rgba(250, 248, 244, 0.68);
  border: 1px solid rgba(172, 165, 151, 0.45);
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   Recent signals
   -------------------------------------------------------------------------- */
.recent-signals {
  margin-top: 12px;
  border: 1px dashed rgba(172, 165, 151, 0.56);
  border-radius: 10px;
  background: rgba(250, 247, 243, 0.68);
  padding: 10px 11px;
}

.recent-signals-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.recent-signals h3 {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink);
}

.recent-signals-list {
  margin-top: 8px;
  display: grid;
  gap: 7px;
}

.recent-signal-item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(172, 165, 151, 0.52);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.62);
  padding: 8px 9px;
}

.recent-signal-item:hover,
.recent-signal-item:focus-visible {
  border-color: rgba(120, 112, 97, 0.90);
}

.recent-signal-text {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.35;
}

.recent-signal-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.recent-signals-empty {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   Agent builder
   -------------------------------------------------------------------------- */
.agent-locked-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.agent-builder-form {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

@media (min-width: 981px) {
  .agent-builder-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
    align-items: start;
  }

  .agent-field-name,
  .agent-field-subject {
    grid-column: 1;
  }

  .agent-field-style,
  .agent-field-adapt {
    grid-column: 2;
  }

  .agent-builder-form .flow-next-action {
    grid-column: 1 / -1;
  }
}

.agent-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.agent-field label {
  margin-top: 0;
}

.agent-field .field-help {
  min-height: 1.35em;
}

.agent-builder-form .inline-actions {
  margin-top: 12px;
  padding-top: 10px;
}

label {
  display: block;
  margin-top: 12px;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

input[type="text"],
select {
  width: 100%;
  min-height: 42px;
  padding: 10px;
  border: 1px solid rgba(172, 165, 151, 0.60);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
}

.agent-builder-form input[type="text"],
.agent-builder-form select {
  min-height: 36px;
  padding: 7px 10px;
}

.subject-custom-input {
  margin-top: 8px;
}

input[type="range"] {
  width: 100%;
  accent-color: #7f8f6f;
}

.range-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

output {
  min-width: 56px;
  text-align: right;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.field-help {
  margin: -2px 0 7px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.range-wrap + .field-help {
  margin-top: 7px;
}

.inline-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 42px;
  align-items: flex-start;
}

/* --------------------------------------------------------------------------
   Agent preview card / blueprint
   -------------------------------------------------------------------------- */
.agent-preview-card {
  margin-top: 10px;
  border-radius: 10px;
  border: 1px dashed rgba(172, 165, 151, 0.56);
  background: rgba(250, 247, 243, 0.68);
  padding: 9px;
  min-height: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.agent-preview-card.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.agent-blueprint-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agent-blueprint-top-minimal {
  justify-content: flex-end;
}

.agent-blueprint-empty {
  min-height: 0;
}

.agent-visual {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(232, 242, 228, 0.95), rgba(140, 167, 132, 0.8));
  border: 1px solid rgba(114, 138, 106, 0.65);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.35);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.agent-visual::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(124, 148, 116, 0.55);
}

.agent-visual-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: saturate(0) brightness(0.68) sepia(0.95) hue-rotate(35deg) saturate(1.7);
  animation: tiva-agent-breath 3.2s ease-in-out infinite;
}

@keyframes tiva-agent-breath {
  0%,  100% { transform: scale(0.97); opacity: 0.82; }
  50%        { transform: scale(1.05); opacity: 1;    }
}

.agent-blueprint-name {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 700;
}

.agent-blueprint-sub {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 0.83rem;
}

/* --------------------------------------------------------------------------
   Experience preview — 4-scene animated chat conversation
   -------------------------------------------------------------------------- */
.agent-experience-preview {
  margin-top: 8px;
  border: 1px solid rgba(142, 166, 135, 0.48);
  border-radius: 12px;
  background: linear-gradient(148deg, rgba(247, 243, 236, 0.97), rgba(229, 240, 225, 0.82));
  overflow: hidden;
}

.experience-preview-head {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(172, 165, 151, 0.38);
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.experience-preview-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.experience-preview-title span,
.experience-preview-title strong {
  min-width: 0;
}

.experience-preview-title strong {
  min-width: 0;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.experience-toggle {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--btn-green-border-strong);
  border-radius: 999px;
  background: rgba(107, 128, 100, 0.92);
  color: #fffdf8;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.experience-toggle:hover,
.experience-toggle:focus-visible {
  background: rgba(82, 108, 76, 0.96);
}

.experience-toggle-icon {
  width: 1em;
  display: inline-flex;
  justify-content: center;
  font-size: 0.76rem;
  line-height: 1;
}

.experience-stage {
  position: relative;
  height: clamp(118px, 14vw, 154px);
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.9), transparent 30%),
    linear-gradient(158deg, rgba(240, 233, 221, 0.97), rgba(218, 234, 214, 0.88));
}

/* Progress bar at bottom of stage */
.experience-playhead {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 9px;
  height: 4px;
  z-index: 4;
  border-radius: 999px;
  background: rgba(180, 171, 154, 0.45);
  overflow: hidden;
}

.experience-playhead::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6b8764, #88a880);
  transform-origin: left center;
  animation: experience-progress 30s linear infinite;
}

.agent-experience-preview.is-paused .experience-playhead::after,
.agent-experience-preview.is-paused .experience-scene,
.agent-experience-preview.is-paused .experience-graphic *,
.agent-experience-preview.is-paused .experience-graphic {
  animation-play-state: paused;
}

.agent-experience-preview.is-complete .experience-playhead::after {
  animation: none;
  transform: scaleX(1);
}

.agent-experience-preview.is-complete .experience-scene {
  animation: none;
  opacity: 0;
  transform: translateY(-6px) scale(0.992);
}

.agent-experience-preview.is-complete .experience-scene-5 {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Chat scenes — each rotates in sequence */
.experience-scene {
  position: absolute;
  inset: 9px 10px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid rgba(172, 165, 151, 0.42);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.80);
  box-shadow: 0 8px 20px rgba(94, 85, 72, 0.08);
  opacity: 0;
  transform: translateY(8px) scale(0.988);
  animation: experience-scene 30s ease-in-out infinite;
}

.experience-scene-2 { animation-delay: 6s; }
.experience-scene-3 { animation-delay: 12s; }
.experience-scene-4 { animation-delay: 18s; }
.experience-scene-5 { animation-delay: 24s; }

.experience-kicker {
  margin: 0;
  color: #5e7d58;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Chat bubbles — sized for real scenario text */
.experience-bubble {
  margin: 0;
  max-width: min(92%, 620px);
  padding: 8px 10px;
  border: 1px solid rgba(172, 165, 151, 0.40);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  font-size: clamp(0.78rem, 1.1vw, 0.88rem);
  line-height: 1.34;
}

.experience-user {
  align-self: flex-end;
  background: rgba(233, 243, 229, 0.86);
  border-color: rgba(142, 166, 135, 0.52);
  color: #3a5235;
}

.experience-agent {
  align-self: flex-start;
}

.experience-graphic {
  align-self: flex-start;
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  min-height: 28px;
  margin-left: 4px;
}

.experience-graphic-label {
  margin: -2px 0 0 4px;
  color: #5e7d58;
  font-size: 0.72rem;
  font-weight: 800;
}

.experience-graphic-football {
  padding-right: 30px;
}

.wave-seat {
  width: 13px;
  height: 15px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, #78926f, #dce8d7);
  animation: laola-wave 1.15s ease-in-out infinite;
}

.wave-seat:nth-child(2) { animation-delay: 0.08s; }
.wave-seat:nth-child(3) { animation-delay: 0.16s; }
.wave-seat:nth-child(4) { animation-delay: 0.24s; }
.wave-seat:nth-child(5) { animation-delay: 0.32s; }

.wave-ball {
  position: absolute;
  right: 0;
  bottom: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #6b8764;
  background:
    radial-gradient(circle at 42% 42%, #fdfbf6 0 28%, transparent 29%),
    repeating-conic-gradient(from 18deg, #6b8764 0 16deg, #fdfbf6 16deg 42deg);
  animation: ball-bounce 1.15s ease-in-out infinite;
}

.experience-graphic-gaming span,
.experience-graphic-cycling span,
.experience-graphic-music span,
.experience-graphic-drawing span,
.experience-graphic-building span,
.experience-graphic-racing span,
.experience-graphic-default span {
  display: block;
  width: 18px;
  height: 8px;
  border-radius: 999px;
  background: rgba(107, 128, 100, 0.82);
  animation: mini-win-pulse 1.2s ease-in-out infinite;
}

.experience-graphic-gaming span:nth-child(2),
.experience-graphic-cycling span:nth-child(2),
.experience-graphic-music span:nth-child(2),
.experience-graphic-drawing span:nth-child(2),
.experience-graphic-building span:nth-child(2),
.experience-graphic-racing span:nth-child(2),
.experience-graphic-default span:nth-child(2) {
  animation-delay: 0.14s;
}

.experience-graphic-gaming span:nth-child(3),
.experience-graphic-cycling span:nth-child(3),
.experience-graphic-music span:nth-child(3),
.experience-graphic-drawing span:nth-child(3),
.experience-graphic-building span:nth-child(3),
.experience-graphic-racing span:nth-child(3),
.experience-graphic-default span:nth-child(3) {
  animation-delay: 0.28s;
}

.experience-graphic-music span {
  width: 7px;
  height: 22px;
  border-radius: 6px;
}

.experience-graphic-drawing span {
  width: 24px;
  height: 3px;
  transform: rotate(-10deg);
}

.experience-graphic-building span {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.experience-graphic-racing span {
  width: 28px;
  height: 4px;
}

@keyframes experience-progress {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes laola-wave {
  0%, 100% { transform: translateY(0) scaleY(0.78); opacity: 0.72; }
  40%      { transform: translateY(-10px) scaleY(1.18); opacity: 1; }
}

@keyframes ball-bounce {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  45%      { transform: translate(4px, -12px) rotate(32deg); }
}

@keyframes mini-win-pulse {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  45%      { transform: translateY(-7px); opacity: 1; }
}

@keyframes experience-scene {
  0%   { opacity: 0; transform: translateY(8px) scale(0.988); }
  4%   { opacity: 1; transform: translateY(0) scale(1); }
  21%  { opacity: 1; transform: translateY(0) scale(1); }
  25%  { opacity: 0; transform: translateY(-6px) scale(0.992); }
  100% { opacity: 0; transform: translateY(-6px) scale(0.992); }
}

/* Metric grid below the preview */
.agent-blueprint-grid {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.agent-metric {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border: 1px solid rgba(172, 165, 151, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  padding: 5px 10px;
}

.agent-metric-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.agent-metric-value {
  margin: 0;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
}

.agent-blueprint-next {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(233, 243, 229, 0.55);
  border: 1px solid rgba(142, 166, 135, 0.46);
}

.agent-blueprint-next p {
  margin: 0;
  color: #506849;
  font-size: 0.78rem;
}

.agent-blueprint-next p + p {
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   Agent welcome modal
   -------------------------------------------------------------------------- */
.agent-modal {
  width: min(640px, calc(100% - 28px));
  border: 0;
  border-radius: 14px;
  padding: 0;
  background: transparent;
}

.agent-modal::backdrop {
  background: rgba(83, 74, 63, 0.36);
  backdrop-filter: blur(3px);
}

.agent-modal-card {
  margin: 0;
  border: 1px solid rgba(172, 165, 151, 0.56);
  border-radius: 14px;
  background: rgba(249, 246, 241, 0.96);
  box-shadow: 0 16px 36px rgba(71, 61, 50, 0.20);
  padding: 16px;
}

.agent-modal-card h2 {
  margin: 0 0 8px;
}

.agent-modal-signals {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.agent-modal-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(172, 165, 151, 0.58);
  background: rgba(255, 255, 255, 0.74);
  padding: 6px 10px;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.agent-modal-question {
  margin-top: 12px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
}

.agent-modal-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

/* --------------------------------------------------------------------------
   Workspace + community grids
   -------------------------------------------------------------------------- */
.workspace-grid,
.community-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.community-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.community-grid .panel {
  height: 100%;
  min-height: 300px;
}

.lower-panel {
  min-height: 0;
  padding: 14px;
}

/* --------------------------------------------------------------------------
   Settings panel
   -------------------------------------------------------------------------- */
.settings-upload-row {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.upload-btn-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.upload-info {
  margin-top: 10px;
  margin-bottom: 8px;
  font-size: 0.84rem;
  font-style: italic;
}

.settings-disclosure {
  margin-top: 14px;
}

.settings-disclosure summary {
  cursor: pointer;
  color: var(--btn-green-text);
  font-size: 0.9rem;
  padding: 10px 12px;
  border: 1px solid var(--btn-green-border);
  border-radius: 10px;
  background: var(--btn-green-bg);
  user-select: none;
}

.settings-disclosure summary:hover,
.settings-disclosure summary:focus-visible {
  background: var(--btn-green-bg-hover);
  border-color: var(--btn-green-border-strong);
  color: var(--btn-green-text-hover);
}

.settings-disclosure[open] summary {
  margin-bottom: 10px;
}

.setting-block + .setting-block {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(172, 165, 151, 0.26);
}

/* --------------------------------------------------------------------------
   Path panel
   -------------------------------------------------------------------------- */
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-head h2 {
  margin-bottom: 0;
}

.panel-subtext,
.community-panel > .muted {
  margin: 6px 0 0;
  min-height: 2.45em;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.38;
}

.live-personalization {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  border: 1px solid rgba(172, 165, 151, 0.56);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.progress-wrap {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
}

.progress-wrap label {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(172, 165, 151, 0.36);
  background: rgba(255, 255, 255, 0.46);
}

progress::-webkit-progress-bar  { background: rgba(255, 255, 255, 0.46); }
progress::-webkit-progress-value { background: linear-gradient(90deg, #728768 0%, #94a78f 100%); }

.path-timeline {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.path-step {
  border: 1px solid rgba(172, 165, 151, 0.42);
  border-radius: 11px;
  padding: 12px;
  background: rgba(249, 246, 241, 0.74);
}

.step-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.step-title {
  margin: 0;
  font-size: 0.98rem;
}

.step-meta {
  margin: 8px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.step-summary {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.step-supports {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.step-supports li {
  background: var(--accent-soft);
  color: #3f5338;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.78rem;
}

.step-check-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.path-step.completed {
  border-color: rgba(107, 128, 100, 0.58);
  background: rgba(227, 239, 223, 0.42);
}

.path-step.locked {
  border-style: dashed;
  border-color: rgba(172, 165, 151, 0.70);
  background: rgba(246, 241, 234, 0.74);
}

/* --------------------------------------------------------------------------
   Demo / guest state
   -------------------------------------------------------------------------- */
.demo-step,
.demo-card {
  opacity: 0.82;
}

.demo-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-style: italic;
}

.panel-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px;
  background: linear-gradient(180deg, rgba(248, 245, 240, 0.18) 0%, rgba(248, 245, 240, 0.56) 100%);
  backdrop-filter: blur(1px);
}

.panel-lock-overlay-passive {
  align-items: center;
  justify-content: center;
  padding: 0;
  background: linear-gradient(180deg, rgba(248, 245, 240, 0.20) 0%, rgba(248, 245, 240, 0.50) 100%);
}

.preview-locked-panel > :not(.panel-lock-overlay) {
  filter: blur(2px);
  opacity: 0.58;
  pointer-events: none;
  user-select: none;
}

.preview-unlock-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.88), rgba(236, 245, 233, 0.68)),
    var(--panel-bg);
}

.preview-unlock-kicker,
.preview-unlock-notice h2,
.preview-unlock-notice p {
  margin: 0;
}

.preview-unlock-kicker {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.preview-unlock-notice h2 {
  margin-top: 4px;
  color: var(--ink);
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  line-height: 1.26;
}

.preview-unlock-notice p {
  margin-top: 6px;
  max-width: 82ch;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Achievement cards
   -------------------------------------------------------------------------- */
.achievement-deck,
.community-feed {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.achievement-card,
.community-post {
  border: 1px solid rgba(172, 165, 151, 0.40);
  border-radius: 11px;
  padding: 12px;
  background: rgba(250, 247, 243, 0.72);
}

.achievement-card h3,
.community-post h3 {
  margin: 0;
  font-size: 0.96rem;
}

.achievement-card p,
.community-post p {
  margin: 7px 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.badge-card-row,
.community-badge-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.community-badge-row {
  grid-template-columns: auto 1fr;
}

.badge-copy h3 { margin: 0; }

.badge-copy p {
  margin: 4px 0 0;
  font-size: 0.83rem;
}

.badge-share-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(172, 165, 151, 0.60);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.learning-badge {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4e452f;
  background: linear-gradient(145deg, #f3e7b9 0%, #d7ba6f 100%);
  border: 1px solid rgba(130, 110, 62, 0.50);
  box-shadow: inset 0 0 0 2px rgba(255, 248, 220, 0.35), 0 6px 14px rgba(94, 85, 72, 0.12);
}

.learning-badge.small {
  width: 44px;
  height: 44px;
  font-size: 1rem;
}

.learning-badge span { font-size: 1.14rem; }

.badge-shape-hex    { clip-path: polygon(25% 5%, 75% 5%, 96% 50%, 75% 95%, 25% 95%, 4% 50%); }
.badge-shape-shield { clip-path: polygon(50% 4%, 92% 22%, 84% 78%, 50% 96%, 16% 78%, 8% 22%); }
.badge-shape-ring   {
  border-radius: 50%;
  box-shadow: inset 0 0 0 7px rgba(78, 69, 47, 0.16),
              inset 0 0 0 2px rgba(255, 248, 220, 0.42),
              0 6px 14px rgba(94, 85, 72, 0.12);
}

.badge-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.76rem;
}

.badge-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Community
   -------------------------------------------------------------------------- */
.community-reactions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.emoji-btn {
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(172, 165, 151, 0.55);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.community-meta {
  margin-top: 7px;
  font-size: 0.8rem;
  color: var(--muted);
}

.lock-link {
  display: inline-flex;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Misc / shared Studio utilities
   -------------------------------------------------------------------------- */
h2 {
  margin: 0 0 8px;
  line-height: 1.24;
  font-size: 1.2rem;
}

h3 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink);
}

.empty-state {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.app-status {
  margin: 0;
  min-height: 22px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.app-status.warn { color: var(--warning); }
.app-status.ok   { color: #4e6655; }

/* --------------------------------------------------------------------------
   Footer (Studio variant – overrides base where needed)
   -------------------------------------------------------------------------- */
.studio-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: clamp(34px, 6.8vh, 68px) 0 0;
  padding: 0 var(--side-pad) 24px;
  font-size: 14px;
  color: var(--muted);
}

.studio-footer .footer-links {
  display: block;
}

.studio-footer .footer-links li {
  margin-bottom: 10px;
}

.studio-footer .footer-copy {
  margin-top: 18px;
}

/* --------------------------------------------------------------------------
   Responsive – Studio breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .workspace-grid,
  .builder-grid,
  .studio-workflow-grid,
  .community-grid,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .hero-copy > p,
  .hero-signal-composer {
    grid-column: 1;
    grid-row: auto;
  }

  .preview-capabilities {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-brand {
    justify-self: start;
  }

  .guest-banner-compact {
    grid-template-columns: 1fr;
  }

  .guest-inline {
    overflow-wrap: anywhere;
  }

  .lower-panel {
    min-height: auto;
  }

  .builder-grid .panel,
  .studio-workflow-grid .panel {
    min-height: auto;
  }

  .signal-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 54px;
    --edge-pad: 12px;
  }

  .container {
    width: 100%;
    margin-top: calc(var(--header-h) + 12px);
    margin-bottom: 12px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .studio-footer {
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
  }

  .panel {
    padding: 14px;
    border-radius: 11px;
  }

  .preview-unlock-notice {
    flex-direction: column;
    align-items: flex-start;
  }

  .preview-unlock-notice .cta-btn {
    width: 100%;
  }

  .guest-banner-compact .cta-btn {
    width: 100%;
  }

  .preview-capabilities {
    grid-template-columns: 1fr;
  }

  .inline-actions {
    flex-direction: column;
  }

  .primary-btn,
  .cta-btn {
    width: 100%;
  }

  .panel-head {
    align-items: flex-start;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-brand {
    display: none;
  }

  .signal-profile-grid {
    grid-template-columns: 1fr;
  }

  .agent-blueprint-grid {
    grid-template-columns: 1fr;
  }

  .experience-preview-head,
  .experience-preview-title {
    align-items: flex-start;
  }

  .experience-preview-head {
    flex-direction: column;
  }

  .experience-preview-title {
    flex-direction: column;
    gap: 2px;
  }

  .experience-preview-title strong {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .experience-stage {
    height: clamp(226px, 74vw, 310px);
  }

  .experience-scene {
    inset: 10px 10px 28px;
    padding: 9px;
    gap: 8px;
  }

  .agent-modal-actions {
    justify-content: stretch;
  }

  .agent-modal-actions .primary-btn {
    width: 100%;
  }

  /* Smaller bubble font on mobile */
  .experience-bubble {
    font-size: 0.82rem;
    padding: 8px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agent-visual-logo,
  .experience-scene,
  .experience-playhead::after,
  .experience-graphic,
  .experience-graphic * {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  /* Show all scenes stacked when motion is off */
  .experience-scene {
    position: relative;
    inset: auto;
    opacity: 1;
    transform: none;
    margin-bottom: 8px;
  }

  .experience-stage {
    aspect-ratio: auto;
    min-height: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: none;
  }
}

/* ==========================================================================
   v2: Phase Stepper, editierbares Profil, Phase-Lock, Confidence
   Added 2026-05-16. All new selectors only, no overrides of older rules.
   ========================================================================== */

/* Phase stepper -------------------------------------------------------- */
.phase-stepper {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 14px 18px;
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(94, 85, 72, 0.07);
  font-size: 0.9rem;
}

.phase-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted, #88857d);
  flex: 0 0 auto;
}

.phase-step:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: clamp(20px, 6vw, 60px);
  height: 1px;
  background: var(--line, rgba(0,0,0,0.12));
  margin-left: 8px;
}

.phase-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.05);
  font-size: 0.78rem;
  font-weight: 600;
  color: inherit;
}

.phase-step.is-active {
  color: var(--accent-strong, #4a6b3e);
}
.phase-step.is-active .phase-step-num {
  background: var(--accent-strong, #4a6b3e);
  color: #fff;
}
.phase-step.is-complete .phase-step-num {
  background: #b8d3a8;
  color: #2c4023;
}
.phase-step.is-complete .phase-step-num::before {
  content: "✓";
}
.phase-step.is-complete .phase-step-num > * {
  display: none;
}

/* Editierbares Profil -------------------------------------------------- */
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.profile-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-form-header h3 {
  margin: 0;
  font-size: 1rem;
}

.profile-form-hint {
  margin: 0;
  font-size: 0.85rem;
}

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

.profile-row > label {
  font-size: 0.85rem;
  color: var(--muted, #88857d);
  margin: 0;
}

.profile-row > input,
.profile-row > select {
  padding: 8px 12px;
  border: 1px solid var(--line, rgba(0,0,0,0.12));
  border-radius: 8px;
  background: #fff;
  font: inherit;
  width: 100%;
  box-sizing: border-box;
}

.profile-row > input:focus,
.profile-row > select:focus {
  outline: 2px solid var(--accent-strong, #4a6b3e);
  outline-offset: 1px;
}

.profile-row.is-warn > input,
.profile-row.is-warn > select {
  background: #fff8e6;
  border-color: #d6a83d;
}

.profile-row-hint {
  grid-column: 2;
  margin: 0;
  font-size: 0.78rem;
  color: #8a6a17;
}

/* Required perspective select */
.profile-row-perspective {
  align-items: center;
}

.profile-perspective-select {
  border-color: rgba(92, 116, 85, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 249, 244, 0.88));
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

.profile-perspective-select:invalid {
  color: var(--muted, #88857d);
  font-size: 0.86rem;
  border-color: rgba(174, 109, 86, 0.62);
  background: rgba(255, 248, 242, 0.92);
}

/* Hobby chips */
.profile-chip-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 6px;
  border: 1px solid var(--line, rgba(0,0,0,0.12));
  border-radius: 8px;
  background: #fff;
}

.profile-chips {
  display: contents;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #f5ecd9;
  color: #633806;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
}

.profile-chip-remove {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0 0 0 2px;
  color: inherit;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}

#profileHobbyInput {
  flex: 1 1 80px;
  min-width: 80px;
  border: 0;
  outline: 0;
  padding: 4px 6px;
  font: inherit;
  font-size: 0.85rem;
  background: transparent;
}

/* Confidence pill */
.confidence-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}

.confidence-pill[data-level="ok"] {
  background: #e6f0dd;
  color: #2c4023;
}

.confidence-pill[data-level="warn"] {
  background: #fff1d1;
  color: #8a6a17;
}

.confidence-pill[data-level="low"] {
  background: #fbe5d6;
  color: #99391c;
}

/* Profile form footer */
.profile-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line, rgba(0,0,0,0.12));
}

.profile-form-note {
  margin: 0;
  font-size: 0.78rem;
}

/* Confirmed summary */
.profile-summary-confirmed {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  background: #f3f0e8;
  border: 1px solid var(--line, rgba(0,0,0,0.1));
  border-radius: 10px;
  margin-top: 10px;
}

.profile-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-summary-header h3 {
  margin: 0;
  font-size: 0.95rem;
}

.profile-summary-line {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink, #2c2a26);
}

.small-btn {
  font-size: 0.78rem;
  padding: 4px 10px;
}

/* Phase locking -------------------------------------------------------- */
.phase-locked {
  position: relative;
  pointer-events: none;
  opacity: 0.45;
  filter: grayscale(0.3);
  transition: opacity 0.25s ease, filter 0.25s ease;
}

.phase-locked::before {
  content: attr(data-phase-locked-hint);
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.95);
  border: 1px solid var(--line, rgba(0,0,0,0.12));
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.78rem;
  color: var(--muted, #88857d);
  font-weight: 500;
  pointer-events: none;
  z-index: 2;
}

.phase-locked.phase-locked-noindicator::before {
  display: none;
}

.phase-locked.phase-active {
  pointer-events: auto;
  opacity: 1;
  filter: none;
}

.phase-locked.phase-active::before {
  display: none;
}

/* Experience preview fallback disclaimer */
.experience-fallback-disclaimer {
  margin-top: 8px;
  padding: 8px 10px;
  background: #f3f0e8;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--muted, #88857d);
  border: 1px solid rgba(184, 168, 120, 0.42);
}

@media (max-width: 720px) {
  .phase-stepper {
    font-size: 0.78rem;
    padding: 10px 12px;
  }
  .phase-step-label {
    display: none;
  }
  .phase-step.is-active .phase-step-label {
    display: inline;
  }

  .profile-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .profile-row > label {
    font-weight: 500;
  }
  .profile-row-hint {
    grid-column: 1;
  }
}
