/* ============================================
   Living Brief — one quiet studio
   ============================================ */

.hero-section .planning-container.planning-container--living {
  max-width: 840px;
  padding: 0 16px 24px;
}

.planning-container--living .planning-header,
.planning-container--living #export-area,
.planning-container--living #workspace-container,
.planning-container--living .lb-tools,
.planning-container--living .lb-capture-strip {
  display: none;
}

.living-brief-bridge {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.living-brief {
  --lb-ink: #171717;
  --lb-mute: #6b6b6b;
  --lb-line: #e8e8e8;
  --lb-bg: #ffffff;
  --lb-soft: #f7f7f7;
  --lb-accent: #ff6b35;
  --lb-size-meta: 0.75rem;
  --lb-size-body: 0.95rem;
  --lb-size-title: 0.95rem;
  --lb-size-input: 1.125rem;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  color: var(--lb-ink);
  animation: lb-in 0.45s ease both;
}

@keyframes lb-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* One surface — tall chat viewport for better screen use; composer stays pinned */
.living-brief-shell {
  position: relative;
  background: var(--lb-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  height: min(88vh, 920px);
  min-height: 560px;
  display: flex;
  flex-direction: column;
}

.lb-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.lb-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

/* Header — one thin row; progress centered in the container */
.lb-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--lb-line);
  flex-shrink: 0;
}

.lb-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  justify-self: start;
}

.lb-brand-title {
  margin: 0;
  font-size: var(--lb-size-title);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.lb-deliverable-hint {
  margin: 0;
  padding: 10px 18px 12px;
  border-bottom: 1px solid var(--lb-line);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--lb-muted, #5c564f);
}

.lb-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  justify-self: center;
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px) scale(0.96);
  pointer-events: none;
  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    visibility 0.45s ease;
}

.lb-progress.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.lb-progress.is-idle {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lb-progress-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Progress meter — brand orange arc; score stays ink/accent (never green) */
.lb-ring {
  --lb-ring-size: 52px;
  --lb-ring-color: var(--lb-accent);
  --lb-ring-track: #ececec;
  position: relative;
  width: var(--lb-ring-size);
  height: var(--lb-ring-size);
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.lb-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.lb-ring-track {
  stroke: var(--lb-ring-track);
  stroke-width: 2.75;
}

.lb-ring-meter {
  stroke: var(--lb-ring-color);
  stroke-width: 2.75;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.lb-score {
  position: relative;
  z-index: 3;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lb-ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.04em;
  transition: opacity 0.25s ease, transform 0.35s ease, color 0.35s ease;
}

.lb-score strong {
  font-weight: 800;
  color: var(--lb-ink);
  transition: color 0.35s ease;
}

.lb-ring-energy {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.35);
  background:
    radial-gradient(
      circle at 50% 45%,
      color-mix(in srgb, var(--lb-accent) 18%, transparent) 0%,
      color-mix(in srgb, var(--lb-accent) 42%, transparent) 42%,
      color-mix(in srgb, var(--lb-accent) 22%, transparent) 72%,
      transparent 100%
    );
  box-shadow:
    0 0 12px color-mix(in srgb, var(--lb-accent) 35%, transparent),
    inset 0 0 14px color-mix(in srgb, var(--lb-accent) 28%, transparent);
}

.lb-ring-waves {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 1;
}

.lb-ring-wave {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--lb-ring-color) 45%, transparent);
  transform: scale(0.72);
  opacity: 0;
}

.lb-progress.is-thinking .lb-ring-waves {
  opacity: 1;
}

.lb-progress.is-thinking .lb-ring-meter {
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--lb-accent) 28%, transparent));
}

.lb-progress.is-thinking:not(.is-complete):not(.is-energizing) .lb-score {
  opacity: 0.55;
  transform: scale(0.94);
}

.lb-progress.is-thinking .lb-ring-wave:nth-child(1) {
  animation: lb-ring-ripple 1.6s ease-out infinite;
}

.lb-progress.is-thinking .lb-ring-wave:nth-child(2) {
  animation: lb-ring-ripple 1.6s ease-out 0.35s infinite;
}

.lb-progress.is-thinking .lb-ring-wave:nth-child(3) {
  animation: lb-ring-ripple 1.6s ease-out 0.7s infinite;
}

.lb-progress.is-settling .lb-ring {
  animation: lb-ring-settle 0.55s ease both;
}

.lb-progress.is-complete .lb-ring-meter,
.lb-progress.is-energizing .lb-ring-meter {
  stroke: var(--lb-accent);
  stroke-width: 3.25;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--lb-accent) 45%, transparent));
}

.lb-progress.is-complete .lb-score,
.lb-progress.is-complete .lb-score strong,
.lb-progress.is-energizing .lb-score,
.lb-progress.is-energizing .lb-score strong,
.lb-progress.is-charged .lb-score,
.lb-progress.is-charged .lb-score strong {
  color: var(--lb-accent);
  opacity: 1;
  transform: none;
  text-shadow: none;
}

.lb-progress.is-energizing .lb-ring-energy {
  animation: lb-ring-energy-fill 0.85s cubic-bezier(0.2, 0.75, 0.25, 1) forwards;
}

.lb-progress.is-energizing .lb-ring-waves {
  opacity: 1;
}

.lb-progress.is-energizing .lb-ring-wave {
  border-color: color-mix(in srgb, var(--lb-accent) 70%, transparent);
  animation: lb-ring-energy-pulse 0.7s ease-out infinite;
}

.lb-progress.is-energizing .lb-score {
  animation: lb-score-charge 0.85s ease both;
}

.lb-progress.is-charged .lb-ring-energy {
  opacity: 0.55;
  transform: scale(1);
  animation: lb-ring-energy-hum 2.4s ease-in-out infinite;
}

@keyframes lb-ring-energy-fill {
  0% {
    opacity: 0;
    transform: scale(0.28);
    filter: brightness(1.4);
  }
  40% {
    opacity: 0.75;
    transform: scale(1.08);
    filter: brightness(1.25);
  }
  70% {
    opacity: 0.95;
    transform: scale(0.96);
    filter: brightness(1.15);
  }
  100% {
    opacity: 0.6;
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes lb-ring-energy-hum {
  0%,
  100% {
    filter: brightness(1);
    box-shadow:
      0 0 10px color-mix(in srgb, var(--lb-accent) 40%, transparent),
      inset 0 0 12px color-mix(in srgb, var(--lb-accent) 25%, transparent);
  }
  50% {
    filter: brightness(1.18);
    box-shadow:
      0 0 18px color-mix(in srgb, var(--lb-accent) 60%, transparent),
      inset 0 0 16px color-mix(in srgb, var(--lb-accent) 35%, transparent);
  }
}

@keyframes lb-ring-energy-pulse {
  0% {
    transform: scale(0.82);
    opacity: 0.65;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

@keyframes lb-score-charge {
  0% {
    transform: scale(0.92);
  }
  45% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes lb-ring-ripple {
  0% {
    transform: scale(0.78);
    opacity: 0.55;
  }
  70% {
    opacity: 0.12;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

@keyframes lb-ring-settle {
  0% {
    transform: scale(1.06);
  }
  55% {
    transform: scale(0.97);
  }
  100% {
    transform: scale(1);
  }
}

.lb-ready-msg {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--lb-accent);
  text-align: center;
  white-space: nowrap;
  animation: lb-ready-in 0.35s ease both;
}

.lb-ready-msg[hidden] {
  display: none;
}

@keyframes lb-ready-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lb-confetti {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 40;
}

.lb-confetti-piece {
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 16px;
  margin: 0;
  border-radius: 2px;
  opacity: 0.95;
  will-change: transform, opacity;
  animation-name: lb-confetti-burst;
  animation-timing-function: cubic-bezier(0.12, 0.65, 0.22, 1);
  animation-fill-mode: forwards;
}

@keyframes lb-confetti-burst {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  70% {
    opacity: 0.9;
  }
  100% {
    transform: translate3d(var(--lb-cx, 0), var(--lb-cy, 160px), 0) rotate(var(--lb-cr, 360deg)) scale(0.7);
    opacity: 0;
  }
}

.lb-dots {
  display: none;
}

.lb-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d9d9d9;
  font-size: 0;
  color: transparent;
  overflow: hidden;
  transition: background 0.35s ease;
}

.lb-dot.is-on {
  background: var(--lb-accent);
}

@media (prefers-reduced-motion: reduce) {
  .lb-progress,
  .lb-top-actions {
    transition: none;
  }

  .lb-progress.is-thinking .lb-ring-wave,
  .lb-progress.is-settling .lb-ring {
    animation: none;
  }

  .lb-progress.is-thinking .lb-ring-waves {
    opacity: 0.35;
  }

  .lb-ring-meter {
    transition: none;
  }
}

.lb-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  justify-self: end;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px) scale(0.96);
  pointer-events: none;
  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    visibility 0.45s ease;
}

.lb-top-actions.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.lb-top-actions.is-idle {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lb-generate {
  border: 0;
  background: var(--lb-accent);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: var(--lb-size-meta);
  font-weight: 650;
  cursor: pointer;
  transition: background 0.35s ease, filter 0.15s ease;
}

.lb-generate:hover {
  filter: brightness(1.05);
}

.lb-generate:disabled {
  opacity: 0.7;
  cursor: default;
  filter: none;
}

/* Chat — only this region scrolls; messages rise above the fixed composer */
.lb-chat-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px 18px 12px;
  background: var(--lb-bg);
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.lb-msg {
  max-width: 100%;
  margin-bottom: 14px;
  animation: lb-msg-in 0.28s ease both;
}

@keyframes lb-msg-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lb-msg--user {
  margin-left: auto;
}

.lb-avatar {
  display: none;
}

.lb-bubble {
  font-size: var(--lb-size-body);
  font-weight: 450;
  line-height: 1.55;
  letter-spacing: -0.01em;
  white-space: pre-wrap;
  word-break: break-word;
}

.lb-msg--assistant .lb-bubble {
  color: var(--lb-ink);
  padding: 0;
  background: transparent;
  border: 0;
}

.lb-inline-generate-wrap {
  margin-top: 12px;
}

.lb-inline-generate {
  border: 0;
  background: var(--lb-accent);
  color: #fff;
  border-radius: 999px;
  padding: 9px 18px;
  font: inherit;
  font-size: var(--lb-size-meta);
  font-weight: 650;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.lb-inline-generate:hover {
  filter: brightness(1.05);
}

.lb-inline-generate:active {
  transform: scale(0.98);
}

.lb-inline-generate:disabled {
  opacity: 0.65;
  cursor: default;
  filter: none;
  transform: none;
}

.lb-msg--creating {
  align-self: stretch;
  max-width: 100%;
}

.lb-msg--creating .lb-creating {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: min(100%, 280px);
  padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--lb-accent) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--lb-accent) 22%, transparent);
}

.lb-creating-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.lb-creating-copy {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  color: var(--lb-accent);
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.lb-creating-label {
  background: linear-gradient(
    90deg,
    var(--lb-accent) 0%,
    #ffb089 42%,
    var(--lb-accent) 78%,
    var(--lb-accent) 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: lb-creating-shimmer 1.6s ease-in-out infinite;
}

.lb-creating-dots span {
  display: inline-block;
  color: var(--lb-accent);
  opacity: 0.25;
  animation: lb-creating-dot 1.2s ease-in-out infinite;
}

.lb-creating-dots span:nth-child(2) {
  animation-delay: 0.18s;
}

.lb-creating-dots span:nth-child(3) {
  animation-delay: 0.36s;
}

.lb-creating-orbit {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--lb-accent) 28%, transparent);
  border-top-color: var(--lb-accent);
  animation: lb-creating-spin 0.85s linear infinite;
}

.lb-creating-bar {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--lb-accent) 16%, #fff);
  overflow: hidden;
}

.lb-creating-bar-fill {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8a5b, var(--lb-accent), #ffb089);
  animation: lb-creating-bar 1.35s ease-in-out infinite;
}

@keyframes lb-creating-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@keyframes lb-creating-dot {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-1px);
  }
}

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

@keyframes lb-creating-bar {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(280%);
  }
}

.lb-msg--user .lb-bubble {
  display: inline-block;
  background: var(--lb-soft);
  color: var(--lb-ink);
  border-radius: 14px;
  padding: 10px 14px;
}

.lb-bubble strong {
  font-weight: 650;
}

.lb-tag-token {
  font-weight: 550;
  color: inherit;
}

.lb-caret {
  display: inline-block;
  width: 0.4em;
  color: var(--lb-mute);
  animation: lb-caret 0.9s steps(1) infinite;
}

@keyframes lb-caret {
  50% {
    opacity: 0;
  }
}

.lb-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-height: 1.2em;
}

.lb-typing span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #bdbdbd;
  animation: lb-dot 1.1s ease-in-out infinite;
}

.lb-typing span:nth-child(2) {
  animation-delay: 0.12s;
}
.lb-typing span:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes lb-dot {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

/* Feature added — compact success row (auto-hides) */
.lb-msg--feature {
  max-width: 100%;
  transition: opacity 0.28s ease, transform 0.28s ease, margin 0.28s ease, max-height 0.28s ease;
  max-height: 120px;
  overflow: hidden;
}

.lb-msg--feature.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
  margin-bottom: 0;
  max-height: 0;
}

.lb-feature-added {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e6f0ea;
  position: relative;
}

.lb-feature-check {
  flex-shrink: 0;
  display: inline-flex;
  margin-top: 1px;
}

.lb-feature-text {
  flex: 1;
  min-width: 0;
  font-size: var(--lb-size-meta);
  font-weight: 450;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: #3d5c45;
  word-break: break-word;
  padding-right: 4px;
}

.lb-feature-remove {
  flex-shrink: 0;
  align-self: center;
  border: 0;
  background: transparent;
  color: #8a8a8a;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, background 0.12s ease, color 0.12s ease;
}

.lb-feature-added:hover .lb-feature-remove,
.lb-feature-added:focus-within .lb-feature-remove {
  opacity: 1;
  pointer-events: auto;
}

.lb-feature-remove:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #444;
}

/* Legacy proposal card bits (unused in chat; keep minimal) */
.lb-msg--card {
  max-width: 100%;
}

.lb-card {
  padding: 10px 0;
  border-top: 1px solid var(--lb-line);
}

.lb-card-title {
  margin: 0;
  font-size: var(--lb-size-body);
  font-weight: 550;
}

.lb-card-meta {
  display: none;
}

.lb-card-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.lb-btn {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: var(--lb-size-meta);
  font-weight: 550;
  color: var(--lb-mute);
  cursor: pointer;
}

.lb-btn--accept {
  color: var(--lb-ink);
}

/* Composer — pinned to bottom of the shell */
.lb-composer {
  flex-shrink: 0;
  margin-top: 0;
  padding: 12px 16px 12px;
  background: var(--lb-bg);
  border-top: 1px solid var(--lb-line);
}

.lb-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 8px 0 0;
}

.lb-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 3px 7px 3px 5px;
  margin: 0;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  color: #777;
  cursor: pointer;
  opacity: 0.4;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    opacity 0.15s ease;
}

.lb-tag-plus {
  font-weight: 700;
  color: #999;
  line-height: 1;
  transition: color 0.15s ease;
}

.lb-tag:hover {
  opacity: 1;
  background: #f0f0f0;
  color: var(--lb-ink);
}

.lb-tag:hover .lb-tag-plus {
  color: var(--lb-accent);
}

.lb-tag:focus-visible {
  opacity: 1;
}

.lb-tag:focus-visible .lb-tag-plus {
  color: var(--lb-accent);
}

.lb-tag.is-active {
  opacity: 1;
  background: var(--lb-ink);
  color: #fff;
}

.lb-tag.is-active .lb-tag-plus {
  color: #fff;
}

.lb-composer-form {
  margin: 0;
}

/* Gray composer card — attach | input | send */
.lb-field {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 8px 8px 8px 6px;
  border: 0;
  border-radius: 18px;
  background: #f2f2f2;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 6px 18px rgba(0, 0, 0, 0.08);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.lb-field:focus-within {
  background: #ececec;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 8px 22px rgba(0, 0, 0, 0.11);
}

.lb-composer.is-focused .lb-field {
  background: #ececec;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 8px 22px rgba(0, 0, 0, 0.11);
}

.lb-attach-wrap {
  position: relative;
  flex-shrink: 0;
}

.lb-attach {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8a8a8a;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.lb-attach:hover,
.lb-attach[aria-expanded='true'] {
  background: rgba(0, 0, 0, 0.05);
  color: var(--lb-ink);
}

.lb-attach-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  min-width: 120px;
  padding: 4px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--lb-line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 5;
}

.lb-attach-option {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  margin: 0;
  border-radius: 7px;
  font: inherit;
  font-size: var(--lb-size-meta);
  font-weight: 550;
  color: var(--lb-ink);
  cursor: pointer;
}

.lb-attach-option:hover {
  background: var(--lb-soft);
}

.lb-ref-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.lb-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.lb-refs[hidden] {
  display: none;
}

.lb-ref-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 5px 8px 5px 6px;
  border-radius: 10px;
  background: #f3faf5;
  border: 1px dashed #b7dfc4;
}

.lb-ref-chip-thumb {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  background: #e8e8e8;
  flex-shrink: 0;
}

.lb-ref-chip-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #e8f5ec;
  color: #1f9d55;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.lb-ref-chip-text {
  min-width: 0;
  font-size: var(--lb-size-meta);
  font-weight: 450;
  color: #3d5c45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.lb-ref-chip-remove {
  border: 0;
  background: transparent;
  color: #8a8a8a;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}

.lb-ref-chip-remove:hover {
  color: var(--lb-ink);
}

.lb-ref-panel {
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 12px;
  background: #faf7f0;
  border: 1px dashed #e2d6b8;
}

.lb-ref-panel[hidden] {
  display: none;
}

.lb-ref-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.lb-ref-panel-title {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9a8450;
}

.lb-ref-panel-close {
  border: 0;
  background: transparent;
  color: #888;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}

.lb-ref-panel-preview {
  margin: 0 0 10px;
}

.lb-ref-panel-preview[hidden] {
  display: none;
}

.lb-ref-panel-img {
  display: block;
  max-width: 140px;
  max-height: 90px;
  border-radius: 8px;
  object-fit: cover;
  background: #eee;
}

.lb-ref-panel-label {
  display: block;
  margin: 0 0 4px;
  font-size: var(--lb-size-meta);
  font-weight: 550;
  color: #6b5c3c;
}

.lb-ref-panel-label[hidden] {
  display: none;
}

.lb-ref-panel-input {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid #e2d6b8;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: var(--lb-size-meta);
  line-height: 1.45;
  color: var(--lb-ink);
  resize: vertical;
}

.lb-ref-panel-input[hidden] {
  display: none;
}

.lb-ref-panel-hint {
  margin: 0 0 10px;
  font-size: var(--lb-size-meta);
  color: #9a8450;
}

.lb-ref-panel-hint[hidden] {
  display: none;
}

.lb-ref-panel-add {
  border: 0;
  background: var(--lb-ink);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: var(--lb-size-meta);
  font-weight: 650;
  cursor: pointer;
}

.lb-ref-panel-add:disabled {
  opacity: 0.55;
  cursor: default;
}

.lb-msg--ref .lb-feature-added {
  background: #faf7f0;
  border-color: #e2d6b8;
}

.lb-msg--ref .lb-feature-text {
  color: #5c5340;
}

/* Kill global orange focus ring from main.css */
.living-brief input.lb-input:focus,
.living-brief input.lb-input:focus-visible,
.living-brief textarea.lb-input:focus,
.living-brief textarea.lb-input:focus-visible,
.living-brief .lb-send:focus,
.living-brief .lb-send:focus-visible,
.living-brief .lb-attach:focus,
.living-brief .lb-attach:focus-visible,
.living-brief .lb-attach-option:focus,
.living-brief .lb-attach-option:focus-visible,
.living-brief .lb-ref-panel-add:focus,
.living-brief .lb-ref-panel-add:focus-visible,
.living-brief .lb-ref-panel-input:focus,
.living-brief .lb-ref-panel-input:focus-visible,
.living-brief .lb-tag:focus,
.living-brief .lb-tag:focus-visible,
.living-brief .lb-ideas-off:focus,
.living-brief .lb-ideas-off:focus-visible,
.living-brief .lb-generate:focus,
.living-brief .lb-generate:focus-visible,
.living-brief .lb-suggest-item:focus,
.living-brief .lb-suggest-item:focus-visible,
.living-brief .lb-btn:focus,
.living-brief .lb-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.lb-input {
  flex: 1;
  border: 0;
  outline: none;
  box-shadow: none;
  resize: none;
  overflow-y: auto;
  min-height: 1.5em;
  max-height: min(36vh, 200px);
  width: 100%;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.45;
  color: var(--lb-ink);
  background: transparent;
  padding: 6px 4px;
  border-radius: 0;
  height: 1.5em;
  transition: height 0.18s ease;
}

.lb-input::placeholder {
  color: #a3a3a3;
  font-weight: 450;
  opacity: 1;
  transition: opacity 0.22s ease;
}

.lb-input.is-placeholder-fading::placeholder {
  opacity: 0;
}

.lb-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #e0e0e0;
  color: #9a9a9a;
  padding: 0;
  margin: 0;
  cursor: default;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.lb-send-icon {
  display: block;
}

.lb-send.is-ready {
  background: var(--lb-accent);
  color: #fff;
  cursor: pointer;
}

.lb-send.is-ready:hover {
  transform: scale(1.04);
  background: color-mix(in srgb, var(--lb-accent) 88%, #000);
}

.lb-limit-msg {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff6ef;
  border: 1px solid rgba(255, 107, 53, 0.28);
  color: #5c3a28;
  font-size: 0.9rem;
  line-height: 1.4;
}

.lb-limit-msg[hidden] {
  display: none;
}

.lb-composer.is-chat-capped .lb-field {
  opacity: 0.55;
}

.lb-composer.is-chat-capped .lb-input {
  cursor: not-allowed;
}

.lb-composer.is-chat-capped .lb-tags {
  pointer-events: none;
  opacity: 0.45;
}

.lb-generate.is-limit-cta {
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.28);
  transform: scale(1.03);
}

.lb-listening {
  display: none;
}

/* Ideas — minimal inline suggestions (max 3 per round) */
.lb-ideas-inline {
  margin: 10px 0 4px;
  max-width: 100%;
  padding: 6px 0 2px;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--lb-line);
}

.lb-ideas-inline[hidden] {
  display: none;
}

.lb-ideas-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 4px;
}

.lb-ideas-label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--lb-accent);
}

.lb-ideas-off {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  margin: 0;
  padding: 2px 0;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 550;
  letter-spacing: 0.02em;
  color: #a0a0a0;
  cursor: pointer;
}

.lb-ideas-off:hover {
  color: var(--lb-ink);
}

.lb-ideas-label-icon {
  display: inline-flex;
  color: var(--lb-accent);
}

.lb-ideas-inline-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.lb-idea-line {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  border: 0;
  background: transparent;
  border-radius: 0;
  text-align: left;
  width: 100%;
  padding: 5px 0;
  margin: 0;
  font: inherit;
  font-size: var(--lb-size-meta);
  font-weight: 450;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: #666;
  cursor: pointer;
  transition: color 0.12s ease;
}

.lb-idea-bulb {
  flex-shrink: 0;
  display: inline-flex;
  margin-top: 2px;
  color: #b8b8b8;
}

.lb-idea-text {
  min-width: 0;
}

.lb-idea-line:hover {
  background: transparent;
  color: var(--lb-ink);
}

.lb-idea-line:hover .lb-idea-bulb {
  color: #888;
}

@media (max-width: 780px) {
  .living-brief-shell {
    height: min(86vh, 820px);
    min-height: 480px;
  }

  .hero-section .planning-container.planning-container--living {
    padding: 0 12px 16px;
  }
}
