/* Pre-Interview Coach — Arrive / Live / Shape
   Grey/blue canvas. Exactly one teal moment per view. */

.precoach {
  --pc-void: #0c1318;
  --pc-halo: #b8cdd8;
  --pc-mist: #7a99ab;
  --pc-slate: #2e404f;
  --pc-teal: #00c4a0;
  --pc-safe-bottom: env(safe-area-inset-bottom, 12px);
  color: #fff;
  min-height: min(100dvh, 920px);
}

/* Keep live coach chrome (End session, dock) above the permanent bottom nav. */
#pre-interview-coach-card.precoach:not(.hidden) {
  position: relative;
  z-index: 1100;
}

.precoach-shell {
  display: grid;
  gap: 0;
  min-height: inherit;
  position: relative;
}

.precoach-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: inherit;
  min-width: 0;
}

.precoach-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
}

.precoach-wordmark-home {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.precoach-wordmark-home:focus-visible {
  outline: 2px solid var(--pc-teal-glow, #00e5c0);
  outline-offset: 3px;
  border-radius: 4px;
}

.precoach-phase-label {
  margin: 0;
  flex: 1;
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pc-mist);
}

/* ── Arrive ──────────────────────────────────────────────────────────── */
.precoach-arrive {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

.precoach-arrive-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 8px;
  min-height: 0;
}

.precoach-arrive-sticky {
  position: sticky;
  bottom: 0;
  z-index: 5;
  flex-shrink: 0;
  margin-top: auto;
  padding: 14px 0 calc(10px + var(--pc-safe-bottom));
  background:
    linear-gradient(
      180deg,
      rgba(7, 7, 13, 0) 0%,
      rgba(7, 7, 13, 0.92) 28%,
      rgba(7, 7, 13, 0.98) 100%
    );
}

/* Sit above permanent bottom nav when coach is shown as a full page */
.precoach[data-ui="arrive"] {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.precoach[data-ui="arrive"] .precoach-arrive-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 18px 12px;
  box-sizing: border-box;
  background:
    linear-gradient(
      180deg,
      rgba(7, 7, 13, 0) 0%,
      rgba(7, 7, 13, 0.94) 22%,
      rgba(7, 7, 13, 0.99) 100%
    );
}

.precoach-step-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.precoach-step-primary {
  width: 100%;
  margin: 0;
}

.precoach-step-secondary,
.precoach-step-tertiary {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--pc-mist);
  font: inherit;
  font-size: 0.92rem;
  padding: 6px 4px;
  cursor: pointer;
  text-align: center;
  width: 100%;
}

.precoach-step-secondary:hover,
.precoach-step-tertiary:hover {
  color: var(--pc-halo);
}

.precoach-step-tertiary {
  font-size: 0.82rem;
  opacity: 0.85;
}

.precoach-summary-block {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(184, 205, 216, 0.16);
  border-radius: 12px;
  background: rgba(12, 19, 24, 0.45);
}

.precoach-summary-theme {
  margin: 0 0 4px;
  font-size: 1rem;
  color: #fff;
  font-weight: 600;
}

.precoach-summary-evidence {
  margin: 8px 0 0;
  padding-left: 1.1rem;
  color: var(--pc-halo);
  font-size: 0.88rem;
  line-height: 1.45;
}

.precoach-summary-evidence li {
  margin-bottom: 4px;
}

.precoach-review-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.precoach-review-themes {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.precoach-review-themes-label {
  margin: 0 0 8px;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pc-mist);
  font-weight: 500;
}

.precoach-review-themes-scroll {
  max-height: min(32vh, 240px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 10px 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(184, 205, 216, 0.12);
  background: rgba(12, 19, 24, 0.35);
}

.precoach-review-themes-scroll .sb-pills {
  justify-content: flex-start;
  padding-bottom: 0;
}

.precoach-review-transcript {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 14%;
  bottom: 30%;
  transform: none;
  z-index: 2;
  margin: 0;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: auto;
  scrollbar-width: thin;
}

.precoach-review-transcript.is-live {
  opacity: 1;
}

.precoach-review-mist-stage .kouli-coach-stage {
  min-height: clamp(240px, 36vh, 400px);
}

.precoach-review-mist-stage {
  min-height: 280px;
}

.precoach-review-talk,
.precoach-review-end {
  position: absolute;
  left: 50%;
  top: auto;
  bottom: 12%;
  transform: translateX(-50%);
  z-index: 3;
  appearance: none;
  border: 1px solid rgba(184, 205, 216, 0.22);
  background: rgba(14, 22, 28, 0.72);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.precoach-review-talk:hover,
.precoach-review-end:hover {
  border-color: rgba(0, 196, 160, 0.45);
}

.precoach-review-end {
  color: var(--pc-halo);
}

#precoach-review-update:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.precoach[data-ui="arrive"] .precoach-arrive-scroll {
  padding-bottom: 168px;
}

.precoach-title {
  margin: 8px 0 0;
  font-size: clamp(1.55rem, 6vw, 2rem);
  letter-spacing: -0.04em;
  font-weight: 650;
}

.precoach-subtitle {
  margin: 0;
  color: var(--pc-halo);
  font-size: 0.95rem;
  line-height: 1.45;
}

.precoach-first-intro {
  display: grid;
  gap: 12px;
}

.precoach-first-intro.hidden,
.precoach-arrive-main.hidden,
.precoach-story-hub-main.hidden {
  display: none !important;
}

.precoach-arrive-main {
  display: grid;
  gap: 16px;
}

.precoach-intro-lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
  color: #e8eef2;
  letter-spacing: -0.02em;
}

.precoach-intro-steps {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 8px;
  color: var(--pc-halo);
  font-size: 0.9rem;
  line-height: 1.4;
}

.precoach-intro-steps strong {
  color: #e8eef2;
  font-weight: 600;
}

.precoach-identifying {
  margin: 4px 0 0;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.74);
  background:
    linear-gradient(
      100deg,
      rgba(255, 255, 255, 0.46) 0%,
      rgba(255, 255, 255, 0.46) 36%,
      rgba(255, 255, 255, 0.98) 46%,
      rgba(216, 231, 255, 1) 50%,
      rgba(255, 255, 255, 0.98) 54%,
      rgba(255, 255, 255, 0.46) 64%,
      rgba(255, 255, 255, 0.46) 100%
    );
  background-size: 240% 100%;
  background-position: 140% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: kouliLabelFlashlight 2.8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .precoach-identifying {
    animation: none;
    background: none;
    color: rgba(255, 255, 255, 0.85);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.85);
  }
}

.precoach-pack-prompt {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.precoach-pack-prompt p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--pc-halo);
  line-height: 1.4;
}

.precoach-pack-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.precoach-pack-prompt-actions button {
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.8rem;
  cursor: pointer;
}

.precoach-pack-fresh {
  border: none;
  background: var(--pc-teal);
  color: var(--pc-void);
  font-weight: 650;
}

.precoach-pack-continue {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--pc-halo);
}

.precoach-suggested-themes {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.precoach-suggested-label {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pc-mist);
  font-weight: 500;
  line-height: 1.35;
}

.precoach-suggested-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--pc-mist);
  line-height: 1.45;
}

.precoach-suggested-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Context chips — not the primary action */
.precoach-suggested-chip {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--pc-halo);
  padding: 7px 11px;
  font-size: 0.75rem;
  line-height: 1.3;
  cursor: default;
  pointer-events: none;
}

#precoach-suggested-pressures {
  margin-top: 2px;
}

.precoach-locked-preview {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.precoach-locked-label {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pc-mist);
}

.precoach-locked-open {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--pc-halo);
  padding: 10px 12px;
  font-size: 0.84rem;
  line-height: 1.35;
  cursor: pointer;
}

.precoach-locked-open:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.precoach-locked-open .precoach-locked-more {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--pc-mist);
}

.precoach-cta {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 14px 18px;
  background: var(--pc-teal);
  color: var(--pc-void);
  font-weight: 650;
  font-size: 0.95rem;
  cursor: pointer;
}

.precoach-cta:hover {
  background: #00e5c0;
}

.precoach-ghost-link {
  border: none;
  background: none;
  color: var(--pc-mist);
  font-size: 0.8rem;
  padding: 8px 0 0;
  cursor: pointer;
  text-align: center;
  width: 100%;
}

.precoach-ghost-link:hover {
  color: var(--pc-halo);
}

.precoach[data-ui="story-hub"] {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.precoach-story-hub {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.precoach-story-hub-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 120px;
  min-height: 0;
}

.precoach-story-hub-block {
  display: grid;
  gap: 8px;
}

.precoach-story-hub-list {
  display: grid;
  gap: 0;
}

.precoach-story-hub-item {
  appearance: none;
  width: 100%;
  text-align: left;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #e8eef2;
  padding: 12px 0;
  font-size: 0.9rem;
  line-height: 1.35;
  cursor: pointer;
}

.precoach-story-hub-item:first-child {
  border-top: none;
  padding-top: 2px;
}

.precoach-story-hub-item:hover {
  color: #fff;
}

.precoach-story-hub-meta {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  color: var(--pc-mist);
  text-transform: capitalize;
}

.precoach-story-hub-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 18px 10px;
  box-sizing: border-box;
  display: grid;
  gap: 4px;
  background:
    linear-gradient(
      180deg,
      rgba(7, 7, 13, 0) 0%,
      rgba(7, 7, 13, 0.94) 28%,
      rgba(7, 7, 13, 0.99) 100%
    );
}

/* ── Live ────────────────────────────────────────────────────────────── */
.precoach[data-ui="live"] {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.precoach-live {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding-bottom: 0;
}

.precoach-mistbox {
  flex: 1;
  min-height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  padding: 16px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.35s, box-shadow 0.35s;
}

.precoach-mistbox.precoach-ai-speaking {
  border-color: rgba(0, 196, 160, 0.28);
  box-shadow: 0 0 20px rgba(0, 196, 160, 0.06);
}

.precoach-feed {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  justify-content: flex-start;
  padding-bottom: 8px;
}

.precoach-mist-current {
  margin: 0;
  font-size: clamp(1.35rem, 3.4vw, 1.85rem);
  letter-spacing: -0.03em;
  line-height: 1.32;
  color: #f2f7fa;
  font-weight: 500;
}

.precoach-mist-current:empty {
  display: none;
}

.precoach-mist-recent {
  display: grid;
  gap: 10px;
}

.precoach-mist-recent-line {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--pc-mist);
}

.precoach-mist-recent-line.is-status {
  font-style: italic;
  color: #5a7688;
}

.precoach-mist-extra {
  display: grid;
  gap: 10px;
}

.precoach-mist-extra:empty {
  display: none;
}

.precoach-line {
  padding: 0;
  background: none;
  border: none;
}

.precoach-who {
  display: none;
}

.precoach-line p {
  margin: 0;
}

.precoach-resume {
  display: grid;
  gap: 8px;
  padding: 12px 0 4px;
}

.precoach-resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.precoach-resume-btn {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--pc-halo);
  padding: 8px 14px;
  font-size: 0.82rem;
  cursor: pointer;
}

.precoach-resume-btn:hover {
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}

.precoach-profile-urls {
  display: grid;
  gap: 8px;
}

.precoach-url-field {
  display: grid;
  gap: 4px;
}

.precoach-url-field span {
  font-size: 0.72rem;
  color: var(--pc-mist);
  letter-spacing: 0.04em;
}

.precoach-url-field input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e8eef2;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.88rem;
}

.precoach-url-field input::placeholder {
  color: #5a7688;
}

.precoach-url-field textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e8eef2;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.88rem;
  resize: vertical;
  min-height: 96px;
}

.precoach-url-field textarea::placeholder {
  color: #5a7688;
}

.precoach-url-field textarea:focus {
  outline: none;
  border-color: rgba(0, 229, 192, 0.55);
}

.precoach-bank-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.88rem;
  color: #e8eef2;
}

.precoach-bank-item-main {
  min-width: 0;
}

.precoach-bank-delete {
  border: none;
  background: none;
  color: #5a7688;
  font-size: 0.72rem;
  cursor: pointer;
  padding: 4px 2px;
  line-height: 1.2;
}

.precoach-bank-delete:hover {
  color: #c0392b;
}

.precoach-type-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.precoach-type-panel textarea {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 10, 14, 0.55);
  color: #fff;
  padding: 8px 10px;
  font: inherit;
  resize: none;
}

.precoach-send-quiet {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--pc-halo);
  padding: 0 14px;
  font-size: 0.82rem;
  cursor: pointer;
}

.precoach-live-footer {
  position: fixed;
  left: 0;
  right: 0;
  /* Sit clearly above the permanent bottom nav hit area. */
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 1200;
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 18px 12px;
  box-sizing: border-box;
  display: grid;
  gap: 14px;
  background:
    linear-gradient(
      180deg,
      rgba(7, 7, 13, 0) 0%,
      rgba(7, 7, 13, 0.94) 22%,
      rgba(7, 7, 13, 0.99) 100%
    );
  /* Must accept clicks — never inherit pointer-events:none from overlays. */
  pointer-events: auto;
}

.precoach-live-footer > * {
  pointer-events: auto;
}

.precoach-live-drafts-wrap {
  position: relative;
  min-width: 0;
  margin-top: 2px;
}

.precoach-live-drafts-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 36px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(7, 7, 13, 0), rgba(7, 7, 13, 0.95));
}

.precoach-live-drafts-wrap.is-scrolled-end::after {
  opacity: 0;
}

.precoach-live-drafts {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 28px 6px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(122, 153, 171, 0.45) transparent;
}

.precoach-live-drafts::-webkit-scrollbar {
  height: 3px;
}

.precoach-live-drafts::-webkit-scrollbar-thumb {
  background: rgba(122, 153, 171, 0.45);
  border-radius: 999px;
}

.precoach-live-draft-pill {
  flex: 0 0 auto;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--pc-mist);
  padding: 6px 11px;
  font-size: 0.68rem;
  line-height: 1.25;
}

.precoach-live {
  padding-bottom: 236px;
}

.precoach-dock {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
}

.precoach-dock-ghost {
  border: none;
  background: none;
  color: var(--pc-mist);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 10px 4px;
}

.precoach-dock-ghost:first-child {
  justify-self: start;
}

.precoach-dock-ghost:last-child {
  justify-self: end;
}

.precoach-dock-ghost.is-on {
  color: var(--pc-halo);
}

.precoach-dock-mic {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: var(--pc-teal);
  color: var(--pc-void);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(0, 196, 160, 0.35);
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.precoach-dock-mic.is-listening {
  background: var(--pc-teal);
  animation: precoach-pulse 2s ease-in-out infinite;
}

.precoach-dock-mic.is-speaking {
  background: #00e5c0;
  color: #041016;
  box-shadow:
    0 0 0 3px rgba(0, 229, 192, 0.35),
    0 0 22px rgba(0, 229, 192, 0.55);
  animation: precoach-speak-glow 1.05s ease-in-out infinite;
}

@keyframes precoach-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 196, 160, 0.35); }
  50% { box-shadow: 0 0 0 10px rgba(0, 196, 160, 0); }
}

@keyframes precoach-speak-glow {
  0%, 100% {
    box-shadow:
      0 0 0 3px rgba(0, 229, 192, 0.3),
      0 0 18px rgba(0, 229, 192, 0.45);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(0, 229, 192, 0.22),
      0 0 28px rgba(0, 229, 192, 0.7);
    transform: scale(1.04);
  }
}

.precoach-end-quiet {
  border: none;
  background: none;
  color: #5a7688;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 10px 24px 6px;
  min-height: 44px;
  min-width: 120px;
  justify-self: center;
  position: relative;
  z-index: 3;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  margin-top: 2px;
}

.precoach-end-quiet:hover {
  color: var(--pc-mist);
}

/* Quiet strips above dock */
.precoach-theme-advance,
.precoach-story-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 2px 2px;
}

.precoach-theme-advance p,
.precoach-story-nudge p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--pc-halo);
  line-height: 1.35;
}

.precoach-story-shape {
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--pc-halo);
  padding: 7px 14px;
  font-size: 0.8rem;
  cursor: pointer;
}

/* ── Evidence bridge ─────────────────────────────────────────────────── */
.precoach[data-ui="evidence"] {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.precoach-evidence-bridge {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.precoach-evidence-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 110px;
  min-height: 0;
}

.precoach-evidence-theme-list {
  display: grid;
  gap: 0;
}

.precoach-evidence-theme {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
  color: #e8eef2;
  line-height: 1.4;
}

.precoach-evidence-theme:first-child {
  border-top: none;
  padding-top: 2px;
}

.precoach-evidence-theme-num {
  display: block;
  margin-bottom: 2px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pc-mist);
}

.precoach-evidence-theme-status {
  display: block;
  margin-top: 3px;
  font-size: 0.75rem;
  color: var(--pc-mist);
}

.precoach-bank-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.precoach-bank-tab {
  border: none;
  background: none;
  color: var(--pc-mist);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 0;
  cursor: pointer;
}

.precoach-bank-tab.is-on {
  color: var(--pc-halo);
}

.precoach-bank-attach {
  margin-top: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: transparent;
  color: var(--pc-halo);
  font-size: 0.72rem;
  padding: 4px 10px;
  cursor: pointer;
}

.precoach-reuse-sheet {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.precoach-reuse-item {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--pc-halo);
  padding: 8px 10px;
  font-size: 0.82rem;
  cursor: pointer;
}

.precoach-reuse-item:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.precoach-evidence-why {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
  display: grid;
  gap: 8px;
}

.precoach-evidence-why-label {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pc-mist);
}

.precoach-evidence-why ul {
  margin: 0;
  padding-left: 1.1em;
  color: var(--pc-halo);
  font-size: 0.88rem;
  line-height: 1.45;
}

.precoach-evidence-why li + li {
  margin-top: 4px;
}

.precoach-evidence-why-note {
  margin: 0;
  font-size: 0.84rem;
  color: var(--pc-mist);
  line-height: 1.45;
}

.precoach-evidence-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 18px 10px;
  box-sizing: border-box;
  display: grid;
  gap: 8px;
  justify-items: stretch;
  background:
    linear-gradient(
      180deg,
      rgba(7, 7, 13, 0) 0%,
      rgba(7, 7, 13, 0.94) 28%,
      rgba(7, 7, 13, 0.99) 100%
    );
}

.precoach-evidence-sticky .precoach-ghost-link {
  text-align: center;
}

/* ── Shape = Story Coach voice Live + quiet step chrome ─────────────── */
.precoach[data-ui="shape"] {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.precoach[data-ui="shape"] .precoach-live {
  display: flex !important;
}

.precoach-story-live-chrome {
  display: grid;
  gap: 4px;
  padding: 0 0 4px;
  flex-shrink: 0;
}

.precoach-story-live-chrome.hidden {
  display: none !important;
}

.precoach-story-live-chrome .precoach-story-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 0;
  order: 0;
}

.precoach-story-live-chrome .precoach-story-context {
  margin: 0;
  font-size: 0.75rem;
  color: var(--pc-mist);
  line-height: 1.35;
  opacity: 0.85;
  order: 0;
}

.precoach-story-live-chrome .precoach-story-context.hidden {
  display: none;
}

.precoach-story-steps span {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5a7688;
}

.precoach-story-steps span.is-active {
  color: var(--pc-teal);
}

.precoach-story-steps span.is-done {
  color: var(--pc-mist);
}

/* Legacy typing form — kept in DOM but never shown */
.precoach-story-builder {
  display: none !important;
}

.precoach-story-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
}

.precoach-nav-quiet {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--pc-halo);
  padding: 11px 18px;
  font-size: 0.88rem;
  cursor: pointer;
  min-height: 44px;
}

.precoach-story-draft {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 12px;
}

.precoach-story-draft-title {
  margin: 0 0 6px;
  font-size: 0.88rem;
  color: var(--pc-halo);
}

.precoach-story-draft-body {
  margin: 0;
  white-space: pre-wrap;
  user-select: text;
  -webkit-user-select: text;
  color: #e8eef2;
  font-size: 0.92rem;
  line-height: 1.45;
  cursor: text;
}

.precoach-story-draft-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.precoach-story-draft-save {
  border-radius: 999px;
  border: none;
  background: var(--pc-teal, #00c4a0);
  color: #07070d;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.precoach-story-draft-saved {
  font-size: 0.78rem;
  color: var(--pc-mist);
}

#precoach-story-next.is-lock {
  border: none;
  background: var(--pc-teal);
  color: var(--pc-void);
  font-weight: 650;
  padding: 11px 22px;
}

.precoach-drafts-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ── Bank (drawer mobile / column desktop) ───────────────────────────── */
.precoach-bank {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  max-height: min(72vh, 520px);
  border-radius: 18px 18px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  background: #1a2530;
  padding: 14px 16px calc(16px + var(--pc-safe-bottom));
  transform: translateY(110%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.precoach-bank.is-open {
  transform: translateY(0);
}

.precoach-bank-scrim {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(7, 7, 13, 0.55);
}

.precoach-bank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.precoach-bank-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.precoach-bank-export {
  border: none;
  background: none;
  color: #5a7688;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 6px 8px;
  line-height: 1.2;
}

.precoach-bank-export:hover {
  color: var(--pc-halo, #b8cdd8);
}

.precoach-bank-head h2 {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pc-mist);
  font-weight: 500;
}

.precoach-bank-close {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--pc-halo);
  font-size: 1.2rem;
  cursor: pointer;
}

.precoach-bank-list {
  overflow-y: auto;
  display: grid;
  gap: 14px;
}

.precoach-bank-section {
  display: grid;
  gap: 0;
}

.precoach-bank-section-title {
  margin: 0 0 2px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pc-mist);
}

.precoach-bank-section .precoach-bank-item:first-of-type {
  border-top: none;
  padding-top: 6px;
}

.precoach-bank-meta {
  display: block;
  margin-top: 3px;
  font-size: 0.75rem;
  color: var(--pc-mist);
}

.precoach-memory-empty {
  margin: 0;
  color: var(--pc-mist);
  font-size: 0.84rem;
}

/* Desktop: side bank, no drawer */
@media (min-width: 1100px) {
  .precoach-shell {
    grid-template-columns: 1.45fr 0.9fr;
    gap: 18px;
    align-items: stretch;
  }

  .precoach-bank {
    position: static;
    max-height: none;
    transform: none;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    padding: 14px;
  }

  .precoach-bank-close,
  .precoach-bank-scrim {
    display: none !important;
  }

  .precoach-dock-ghost#precoach-bank-toggle {
    visibility: hidden;
    pointer-events: none;
  }

  .precoach[data-ui="arrive"],
  .precoach[data-ui="live"],
  .precoach[data-ui="evidence"],
  .precoach[data-ui="story-hub"],
  .precoach[data-ui="shape"] {
    padding-bottom: 0;
  }

  .precoach[data-ui="shape"] .precoach-story-live-chrome {
    padding-top: 4px;
    max-width: 720px;
  }

  .precoach[data-ui="shape"] .precoach-bank {
    gap: 14px;
    padding: 18px 16px;
  }

  .precoach[data-ui="shape"] .precoach-bank-item {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .precoach[data-ui="arrive"] .precoach-arrive-sticky,
  .precoach[data-ui="evidence"] .precoach-evidence-sticky,
  .precoach[data-ui="story-hub"] .precoach-story-hub-sticky {
    position: sticky;
    left: auto;
    right: auto;
    bottom: 0;
    max-width: 360px;
    width: 100%;
    margin: 16px auto 0;
    padding: 0;
    background: none;
  }

  .precoach[data-ui="arrive"] .precoach-step-actions {
    align-items: center;
  }

  .precoach[data-ui="arrive"] .precoach-step-primary {
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .precoach[data-ui="arrive"] .precoach-step-secondary,
  .precoach[data-ui="arrive"] .precoach-step-tertiary,
  .precoach[data-ui="arrive"] .precoach-step-meta {
    max-width: 320px;
    text-align: center;
  }

  .precoach-review-shell {
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
  }

  .precoach-story-hub-scroll {
    padding-bottom: 8px;
  }

  .precoach-ghost-link {
    text-align: left;
    width: auto;
  }

  .precoach-live-footer {
    position: static;
    max-width: none;
    padding: 8px 0 0;
    background: none;
  }

  .precoach-live {
    padding-bottom: 0;
  }

  .precoach-evidence-scroll {
    padding-bottom: 8px;
  }

  .precoach[data-ui="arrive"] .precoach-arrive-scroll {
    padding-bottom: 8px;
  }

  .precoach-cta {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .precoach-locked-preview {
    display: none !important;
  }

  /* Mobile-only prep opener — desktop already shows the bank column. */
  #precoach-evidence-my-prep {
    display: none !important;
  }
}

.precoach .hidden {
  display: none !important;
}

/* ── Prep workspace (extract + editable pills) ───────────────────────── */
.precoach-workspace {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 12px 0 8px;
}

.precoach-ws-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.precoach-ws-pills,
.precoach-ws-evidence-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.precoach-ws-pill,
.precoach-ws-evidence {
  display: flex;
  align-items: stretch;
  gap: 6px;
  border: 1px solid rgba(184, 205, 216, 0.18);
  border-radius: 12px;
  background: rgba(12, 19, 24, 0.55);
  overflow: hidden;
}

.precoach-ws-pill-main,
.precoach-ws-evidence-open {
  flex: 1;
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.precoach-ws-pill-main:hover,
.precoach-ws-evidence-open:hover {
  background: rgba(184, 205, 216, 0.06);
}

.precoach-ws-pill-label {
  font-size: 0.95rem;
  color: #fff;
}

.precoach-ws-pill-meta {
  font-size: 0.78rem;
  color: var(--pc-mist);
  line-height: 1.35;
}

.precoach-ws-pill-actions {
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(184, 205, 216, 0.12);
}

.precoach-ws-icon {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--pc-mist);
  width: 36px;
  min-height: 28px;
  cursor: pointer;
  font-size: 0.85rem;
}

.precoach-ws-icon:hover,
.precoach-ws-icon:focus-visible {
  color: var(--pc-teal);
}

.precoach-evidence-deepen,
.precoach-story-live-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.precoach-deepen-shell,
.precoach-story-live-scroll {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 12px;
}

.precoach-deepen-prompts {
  margin: 0;
  padding: 0 0 0 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.precoach-deepen-prompt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--pc-halo);
  font-size: 0.95rem;
  line-height: 1.4;
}

.precoach-deepen-n {
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--pc-teal);
  border: 1px solid rgba(0, 196, 160, 0.35);
}

.precoach-deepen-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: calc(12px + var(--pc-safe-bottom));
}

.precoach-story-pick {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(184, 205, 216, 0.18);
  border-radius: 12px;
  background: rgba(12, 19, 24, 0.55);
  color: inherit;
  text-align: left;
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.precoach-story-pick.is-selected {
  border-color: rgba(0, 196, 160, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 196, 160, 0.25);
}

.precoach-story-pick.is-static {
  cursor: default;
  opacity: 0.85;
}

.precoach-story-save-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.precoach-cta.is-disabled,
.precoach-cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.precoach-bank.precoach-bank-suppressed {
  display: none !important;
}

.precoach-step-eyebrow {
  margin: 0 0 6px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pc-mist);
}

.precoach-step-meta {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--pc-halo);
}

.precoach-opp-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.precoach-opp-item {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.precoach-opp-item.is-active .precoach-opp-row {
  border-color: rgba(0, 196, 160, 0.5);
}

.precoach-opp-row {
  appearance: none;
  flex: 1 1 auto;
  border: 1px solid rgba(184, 205, 216, 0.18);
  border-radius: 12px;
  background: rgba(12, 19, 24, 0.55);
  color: inherit;
  text-align: left;
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.precoach-opp-delete {
  appearance: none;
  flex: 0 0 auto;
  align-self: center;
  border: none;
  background: transparent;
  color: var(--pc-mist);
  font: inherit;
  font-size: 0.78rem;
  padding: 8px 6px;
  cursor: pointer;
}

.precoach-opp-delete:hover {
  color: #e8a0a0;
}

.precoach-deepen-one-prompt {
  margin: 8px 0 12px;
  font-size: 1.15rem;
  line-height: 1.4;
  color: #fff;
}

.precoach-deepen-talk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -4px 0 8px;
  padding: 0 2px;
}

.precoach-deepen-talk-btn {
  appearance: none;
  border: 1px solid rgba(184, 205, 216, 0.28);
  background: rgba(12, 19, 24, 0.72);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.precoach-deepen-talk-btn:hover {
  border-color: rgba(0, 196, 160, 0.45);
}

.precoach-deepen-talk-btn.is-recording {
  border-color: rgba(192, 57, 43, 0.55);
  color: #fff;
  background: rgba(192, 57, 43, 0.16);
}

.precoach-deepen-rec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e8a0a0;
}

.precoach-deepen-rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c0392b;
  box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.45);
  animation: precoach-rec-pulse 1.2s ease-out infinite;
}

@keyframes precoach-rec-pulse {
  0% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(192, 57, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0); }
}

.sb-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--pc-halo);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(184, 205, 216, 0.16);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(8px);
  animation: sb-pill-emerge 0.45s ease forwards;
}

.sb-pill-kind {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pc-mist);
  opacity: 0.9;
}

.sb-pill-theme {
  border-color: rgba(184, 205, 216, 0.22);
}

.sb-pill-theme .sb-pill-kind {
  color: var(--pc-halo);
}

.sb-pill-pressure {
  border-color: rgba(229, 160, 0, 0.35);
  background: rgba(229, 160, 0, 0.08);
}

.sb-pill-pressure .sb-pill-kind {
  color: #e5a000;
}

.sb-pill-story {
  border-color: rgba(184, 205, 216, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.sb-pill-story .sb-pill-kind {
  color: var(--pc-halo);
}

.sb-pill-evidence {
  appearance: none;
  font: inherit;
  cursor: pointer;
  border-color: rgba(184, 205, 216, 0.2);
}

.sb-pill-evidence .sb-pill-kind {
  color: var(--pc-mist);
}

.sb-pill-evidence.is-active {
  border-color: rgba(0, 196, 160, 0.5);
  color: #fff;
}

button.sb-pill {
  text-align: left;
}

.precoach-story-beats-cheat {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 10px;
}

.precoach-story-beat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(184, 205, 216, 0.16);
  background: rgba(12, 19, 24, 0.45);
  color: var(--pc-halo);
  font-size: 0.82rem;
}

.precoach-story-beat-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35em;
  height: 1.35em;
  border-radius: 50%;
  border: 1px solid rgba(184, 205, 216, 0.28);
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--pc-mist);
}

.precoach-story-beat-label {
  font-weight: 600;
  color: #fff;
}

.precoach-story-beat-hint {
  font-size: 0.72rem;
  color: var(--pc-mist);
}

.precoach-story-beat.is-active {
  border-color: rgba(0, 196, 160, 0.45);
}

.precoach-story-beat.is-active .precoach-story-beat-n {
  border-color: rgba(0, 196, 160, 0.55);
  color: var(--teal-core, #00c4a0);
}

.precoach-story-lib {
  margin-top: 10px;
}

.precoach-story-lib-section {
  margin-bottom: 12px;
}

.precoach-story-lib-label {
  margin: 0 0 2px;
  text-align: left;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pc-mist);
  font-weight: 500;
}

.precoach-story-lib-hint {
  margin: 0 0 8px;
  text-align: left;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--pc-mist);
}

.precoach-story-card {
  margin: 0 0 8px;
  border-radius: 14px;
  border: 1px solid rgba(184, 205, 216, 0.12);
  background: rgba(12, 19, 24, 0.4);
  overflow: hidden;
}

.precoach-story-card[open] {
  border-color: rgba(184, 205, 216, 0.2);
}

.precoach-story-card-sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.precoach-story-card-sum::-webkit-details-marker {
  display: none;
}

.precoach-story-card-sum::after {
  content: '';
  flex: 0 0 auto;
  width: 0.45em;
  height: 0.45em;
  margin-left: 2px;
  border-right: 1.5px solid var(--pc-mist);
  border-bottom: 1.5px solid var(--pc-mist);
  transform: rotate(45deg);
  opacity: 0.7;
  transition: transform 0.15s ease;
}

.precoach-story-card[open] > .precoach-story-card-sum::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.precoach-story-card-sum-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.precoach-story-card-kicker {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pc-mist);
  font-weight: 500;
}

.precoach-story-card-title {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
  word-break: break-word;
}

.precoach-story-card--theme .precoach-story-card-title {
  font-size: 1.02rem;
}

.precoach-story-card-meta {
  flex: 0 0 auto;
  min-width: 1.5em;
  text-align: right;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--pc-mist);
}

.precoach-story-card-list {
  list-style: none;
  margin: 0;
  padding: 0 12px 12px 14px;
}

.precoach-story-card-list--stories {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.precoach-story-nested-label {
  margin: 0;
  padding: 4px 14px 4px;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pc-mist);
  font-weight: 500;
}

.precoach-story-saved {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(184, 205, 216, 0.1);
}

.precoach-story-saved-kicker {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pc-mist);
}

.precoach-story-saved-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.precoach-story-saved-snippet {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--pc-halo);
}

.precoach-story-card-list--evidence {
  margin-left: 6px;
  padding-left: 12px;
  border-left: 1px solid rgba(184, 205, 216, 0.16);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.precoach-story-ev {
  appearance: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 7px 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--pc-halo);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.precoach-story-ev:hover {
  background: rgba(255, 255, 255, 0.04);
}

.precoach-story-ev-text {
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--pc-halo);
}

.precoach-story-ev-tag {
  flex: 0 0 auto;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pc-mist);
}

.precoach-story-ev.is-active {
  background: rgba(0, 196, 160, 0.1);
}

.precoach-story-ev.is-active .precoach-story-ev-text {
  color: #fff;
  font-weight: 500;
}

.precoach-story-card-list--pressure {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.precoach-story-card-note {
  margin: 0;
  padding: 0 14px 8px;
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--pc-mist);
}

.precoach-story-card--pressure .precoach-story-card-kicker {
  color: #e5a000;
}

.precoach-story-ev--pressure .precoach-story-ev-tag {
  color: #e5a000;
}

.precoach-story-ev--pressure.is-active {
  background: rgba(229, 160, 0, 0.1);
}

.precoach-story-theme-empty {
  margin: 0;
  padding: 0 14px 12px;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--pc-mist);
}

@media (max-width: 640px) {
  .precoach-story-card-sum {
    padding: 11px 12px;
  }

  .precoach-story-card-title {
    font-size: 0.94rem;
  }

  .precoach-story-card--theme .precoach-story-card-title {
    font-size: 0.96rem;
  }

  .precoach-story-ev-text {
    font-size: 0.8rem;
  }

  .precoach-story-lib-hint {
    font-size: 0.74rem;
  }

  .precoach-story-beat-hint {
    display: none;
  }
}

.precoach-undo-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(14, 22, 28, 0.94);
  border: 1px solid rgba(184, 205, 216, 0.22);
  color: var(--pc-halo);
  font-size: 0.9rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.precoach-undo-toast.hidden {
  display: none !important;
}

.precoach-undo-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--pc-teal);
  font: inherit;
  cursor: pointer;
  font-weight: 600;
}

/* Story Builder — mist-dominated (Quick Reps / Confidence pattern) */
.sb-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: min(100dvh, 920px);
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}

.sb-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sb-eyebrow {
  margin: 0;
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pc-mist);
}

.sb-status {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--pc-halo);
}

.sb-mist-stage {
  flex: 1;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sb-mist {
  width: 100%;
  position: relative;
}

.sb-turn-cue {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 12%;
  margin: 0;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--pc-halo);
  pointer-events: none;
}

.sb-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 4px 0 8px;
}

.sb-pill:nth-child(2) { animation-delay: 0.08s; }
.sb-pill:nth-child(3) { animation-delay: 0.16s; }

.sb-pill.is-active {
  border-color: rgba(0, 196, 160, 0.45);
  color: #fff;
}

@keyframes sb-pill-emerge {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sb-evidence-pill {
  text-align: center;
  font-size: 0.85rem;
  color: var(--pc-mist);
  padding: 0 12px 8px;
}

.sb-save-drawer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0 12px;
}

.sb-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: calc(12px + var(--pc-safe-bottom));
}

#pre-interview-coach-card[data-ui="arrive"] #precoach-bank,
#pre-interview-coach-card[data-ui="arrive"] #precoach-bank-scrim {
  display: none !important;
}
