/* Phase 5 · ADR-0039 · Brando-first conversation and the owner's visual direction of 2026-10-16: WHITE predominates
   (white canvas, white sidebar), a few SAND details, GREEN accents (emerald for primary actions, focus and Brando),
   generous spacing; calm, premium, uncluttered. Loaded after product-uxr.css and scoped to `body.uxr` (DEMO and
   isolated development only): PILOT, frozen, never receives it. Tokens only; the official logo and the canonical gem
   are untouched. Presentation only: every control keeps its id and its handler. */

body.uxr {
  --p5-canvas: #ffffff;
  --p5-line: #ebe8e1;
  --p5-line-strong: #ddd8cd;
  --p5-soft: #f8f7f4;
  --p5-sand: #f6f1e7;
  --p5-sand-line: rgba(201, 174, 130, .45);
  --p5-shadow: 0 1px 2px rgba(22, 27, 25, .04), 0 8px 24px rgba(22, 27, 25, .05);
  --p5-shadow-hover: 0 2px 4px rgba(22, 27, 25, .05), 0 14px 32px rgba(22, 27, 25, .08);
  --p5-radius: 18px;
}

/* ───────────── Shell: white canvas, white sidebar, quiet top bar ───────────── */
body.uxr.app #main { background: var(--p5-canvas); background-attachment: scroll; }
body.uxr.app header { background: rgba(255, 255, 255, .97); }
body.uxr.app header::after { background: var(--p5-line); }
@media (min-width: 1280px) {
  body.uxr.app:not(.left-collapsed) header { background: linear-gradient(90deg, transparent var(--sidebar-width), rgba(255, 255, 255, .97) var(--sidebar-width)); }
  body.uxr.app:not(.left-collapsed) #journey { background: var(--p5-canvas); border-right: 1px solid var(--p5-line); }
  body.uxr.app:not(.left-collapsed) header .header-brand-control select { border-color: var(--p5-line-strong); box-shadow: none; background-color: var(--p5-canvas); }
}
body.uxr #journey { background: var(--p5-canvas); }
body.uxr #journey .nav-item { color: var(--bp-neutral-800); }
body.uxr #journey .nav-item .ico { color: var(--bp-neutral-600); }
body.uxr #journey .nav-item:hover { background: var(--p5-soft); }
/* Current area: a soft emerald tint with an emerald word (the mockups' light highlight), never a heavy solid block. */
body.uxr #journey button.nav-item[aria-current], body.uxr #journey button.nav-item.contains-current, body.uxr #journey #home[aria-current] { background: var(--bp-success-bg); color: var(--bp-brand-emerald-deep); box-shadow: inset 3px 0 0 var(--bp-brand-emerald); }
body.uxr #journey button.nav-item[aria-current] .ico, body.uxr #journey button.nav-item.contains-current .ico { color: var(--bp-brand-emerald); }
body.uxr #journey button.nav-item[aria-current] .nav-count, body.uxr #journey button.nav-item.contains-current .nav-count { background: var(--bp-white); color: var(--bp-brand-emerald-deep) !important; }
body.uxr #journey .nav-divider { border-color: var(--p5-line); }
body.uxr #journey .nav-principle { border-top-color: var(--p5-line); }
body.uxr .global-search { border-color: var(--p5-line-strong); background: var(--p5-soft); }
body.uxr .global-search:focus-within { background: var(--p5-canvas); }
body.uxr.app header #mode-badge { background: var(--p5-sand); border: 1px solid var(--p5-sand-line); color: var(--bp-warning); }
body.uxr.app[data-live-ai="true"] header #mode-badge { background: var(--bp-success-bg); border-color: var(--bp-brando-emerald-ring); color: var(--bp-brand-emerald-deep); }
.p5-bell { display: none; }
@media (min-width: 768px) {
  body.uxr.app .p5-bell { display: inline-grid; place-items: center; width: 40px; min-width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 12px; }
  body.uxr.app .p5-bell .ico { width: 20px; height: 20px; flex-basis: 20px; }
}
/* Right tool strip: same white family. */
body.uxr .intelligence-rail, body.uxr .rail-tools { background: var(--p5-canvas); border-color: var(--p5-line); }

/* Cards and headers: white surfaces with a fine line (no ivory glass). */
body.uxr .plan-block, body.uxr .home-starter, body.uxr .continue-card, body.uxr .dimension, body.uxr .strategy-next, body.uxr .client-card, body.uxr .result-card,
body.uxr .kit-entry, body.uxr .validate-entry, body.uxr .offer-card, body.uxr .proposal-card, body.uxr .plan-empty, body.uxr .collab-card, body.uxr .plan-kpi, body.uxr .client-stage {
  background: var(--p5-canvas); border-color: var(--p5-line); box-shadow: var(--p5-shadow);
}
body.uxr .home-starter:hover, body.uxr .continue-card:hover, body.uxr .dimension:hover, body.uxr .validate-entry:hover, body.uxr .kit-entry:hover { background: var(--p5-canvas); border-color: var(--bp-brando-emerald-ring); box-shadow: var(--p5-shadow-hover); }
body.uxr #decision .ws-hero { background: linear-gradient(120deg, #ffffff 55%, var(--p5-sand)); border-color: var(--p5-line); box-shadow: none; }
body.uxr #decision .ws-hero::after { opacity: .5; }
body.uxr #decision .ws-hero .eyebrow { background: var(--p5-canvas); border-color: var(--p5-sand-line); }

/* ───────────── «Volver a Brando» (every specialized view) ───────────── */
.p5-back { display: none; }
body.uxr.app .p5-back:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 14px; }
.p5-back-button { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; padding: 4px 16px 4px 6px; border: 1px solid var(--bp-brando-emerald-ring); border-radius: 999px; background: var(--p5-canvas); color: var(--bp-brand-emerald-deep); font: 650 14px/1.2 var(--font-ui); box-shadow: var(--p5-shadow); }
.p5-back-button:hover { background: var(--bp-success-bg); }
.p5-back-button img { width: 32px; height: 32px; border-radius: 50%; background: var(--bp-success-bg); }
.p5-back-hint { font-size: 13px; color: var(--text-muted); }
@media (max-width: 767px) { .p5-back-hint { display: none; } body.uxr.app .p5-back:not([hidden]) { margin-bottom: 10px; } }

/* ───────────── Inicio · Brando's conversation on white ───────────── */
body.uxr #decision .p5-home { display: flex; flex-direction: column; gap: 0; max-width: 1080px; margin: 0 auto; padding: 8px 0 4px; }
body.uxr .p5-home .home-hero { grid-template-columns: 168px minmax(0, 1fr); column-gap: 28px; padding: 24px 8px 8px; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
body.uxr .p5-home .home-hero::after { display: none; }
body.uxr .p5-home .home-hero-art { animation: p5-float 8s ease-in-out infinite; }
body.uxr .p5-home .home-hero-art::before { width: 196px; height: 196px; background: radial-gradient(closest-side, rgba(14, 122, 82, .12), rgba(201, 174, 130, .14) 60%, transparent); animation: none; }
body.uxr .p5-home .home-hero-art::after { width: 176px; height: 176px; border: 1px solid var(--p5-sand-line); opacity: .7; }
body.uxr .p5-home .home-gem { width: 150px; height: 150px; filter: drop-shadow(0 16px 22px rgba(7, 61, 45, .18)); }
body.uxr .p5-home .home-brand-line { margin: 0 0 6px; color: var(--text-secondary); font: 500 15px/1.4 var(--font-ui); }
body.uxr .p5-home .home-brand-line strong { color: var(--bp-brand-emerald); font-weight: 650; }
body.uxr #decision .p5-home h2 { margin: 0 0 10px; color: var(--bp-brand-charcoal); font: 400 clamp(34px, 3.2vw, 48px)/1.08 var(--font-display); letter-spacing: -.015em; }
body.uxr .p5-home .home-hero-lead { max-width: 620px; color: var(--text-secondary); font-size: 16.5px; }
body.uxr .p5-home .home-help { margin: 10px 6px 0; color: var(--text-muted); font-size: 13.5px; }
body.uxr .p5-home .home-status { min-height: 1.4em; margin: 10px 6px 0; color: var(--bp-brand-emerald-deep); font-size: 14px; font-weight: 600; }

/* Composer: one wide white field, emerald focus, the mode chip from the server. */
body.uxr .p5-home .home-composer { margin: 22px 0 0; padding: 14px 14px 12px 20px; border: 1px solid var(--p5-line-strong); border-radius: 22px; background: var(--p5-canvas); box-shadow: 0 2px 4px rgba(22, 27, 25, .03), 0 14px 36px rgba(22, 27, 25, .07); }
body.uxr .p5-home .home-composer:focus-within { border-color: var(--bp-brand-emerald); box-shadow: 0 0 0 4px var(--bp-emerald-focus-soft), 0 14px 36px rgba(22, 27, 25, .07); }
body.uxr #decision .p5-home .home-composer textarea { min-height: 52px; max-height: 220px; padding: 4px 0; border: 0; background: transparent; box-shadow: none; font-size: 16.5px; line-height: 1.5; resize: vertical; }
body.uxr #decision .p5-home .home-composer textarea:focus, body.uxr #decision .p5-home .home-composer textarea:focus-visible { outline: none; box-shadow: none; }
body.uxr .p5-home .home-composer-bar { gap: 12px; margin-top: 8px; }
body.uxr .p5-home .home-mode { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--p5-sand-line); border-radius: 999px; background: var(--p5-sand); color: var(--bp-warning); font: 650 12px/1.2 var(--font-ui); }
body.uxr .p5-home .home-mode::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bp-brand-champagne); }
body.uxr .p5-home .home-mode.is-live { border-color: var(--bp-brando-emerald-ring); background: var(--bp-success-bg); color: var(--bp-brand-emerald-deep); }
body.uxr .p5-home .home-mode.is-live::before { background: var(--bp-brand-signal); }
.p5-keys { margin-left: auto; font-size: 12px; color: var(--text-muted); }
body.uxr .p5-home .home-composer-bar .home-mode { margin-right: 0; }
body.uxr .p5-home .home-composer button[type="submit"] { min-height: 46px; padding: 8px 18px 8px 20px; border-radius: 999px; background: var(--bp-brand-emerald); color: var(--bp-white); box-shadow: 0 6px 16px rgba(11, 104, 71, .22); }
body.uxr .p5-home .home-composer button[type="submit"]:hover { background: var(--bp-brand-emerald-deep); }
body.uxr .p5-home .home-composer button[type="submit"]:disabled { opacity: .7; }

/* Four discreet starters */
body.uxr .p5-home .home-starters { gap: 12px; margin: 18px 0 0; }
body.uxr .p5-home .home-starter { min-height: 0; padding: 16px 16px 16px; grid-template-columns: 40px minmax(0, 1fr); gap: 6px 12px; border-radius: 16px; }
body.uxr .p5-home .home-starter::before { display: none; }
body.uxr .p5-home .starter-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--bp-success-bg); color: var(--bp-brand-emerald); box-shadow: none; }
body.uxr .p5-home .home-starter:nth-child(2) .starter-icon, body.uxr .p5-home .home-starter:nth-child(4) .starter-icon { background: var(--p5-sand); color: var(--bp-divider-gold); box-shadow: none; }
body.uxr .p5-home .starter-icon .ico { width: 20px; height: 20px; flex-basis: 20px; }
body.uxr .p5-home .starter-title { font-size: 15px; }
body.uxr .p5-home .starter-lead { font-size: 13px; padding-right: 18px; }
body.uxr .p5-home .starter-arrow { right: 14px; bottom: 14px; width: 16px; height: 16px; }

/* Conversation bar: «Conversaciones» (collapsible list), the open conversation, «Nueva conversación» */
.p5-convo-bar { display: none; }
body.uxr .p5-convo-bar { display: flex; align-items: center; gap: 12px; margin: 18px 0 0; padding: 0 2px; }
body.uxr .p5-home[data-thread="empty"] .p5-convo-bar { order: 3; margin-top: 18px; }
.p5-convo-toggle, .p5-convo-new { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin: 0; padding: 6px 14px; border: 1px solid var(--p5-line-strong); border-radius: 999px; background: var(--p5-canvas); color: var(--bp-neutral-800); font: 600 13.5px/1.2 var(--font-ui); box-shadow: none; }
.p5-convo-toggle:hover, .p5-convo-new:hover { border-color: var(--bp-brando-emerald-ring); background: var(--bp-success-bg); color: var(--bp-brand-emerald-deep); }
.p5-convo-toggle .ico, .p5-convo-new .ico { width: 16px; height: 16px; flex-basis: 16px; }
.p5-convo-toggle .p5-chevron { transition: transform var(--bp-motion-fast) var(--bp-ease); }
.p5-convo-toggle[aria-expanded="true"] { border-color: var(--bp-brand-emerald); color: var(--bp-brand-emerald-deep); }
.p5-convo-toggle[aria-expanded="true"] .p5-chevron { transform: rotate(180deg); }
.p5-convo-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--p5-sand); color: var(--bp-warning); font: 700 11.5px/1 var(--font-ui); }
.p5-convo-count[hidden] { display: none; }
.p5-convo-title { flex: 1; min-width: 0; margin: 0; overflow: hidden; color: var(--text-muted); font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.p5-convo-new { margin-left: auto; border-color: transparent; color: var(--bp-brand-emerald-deep); }

/* «Conversaciones» panel */
.p5-convo-panel { margin: 10px 0 0; padding: 16px 18px; border: 1px solid var(--p5-line); border-radius: var(--p5-radius); background: var(--p5-canvas); box-shadow: var(--p5-shadow-hover); }
.p5-convo-panel[hidden] { display: none; }
body.uxr .p5-home[data-thread="empty"] .p5-convo-panel { order: 4; }
.p5-convo-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
body.uxr #decision .p5-convo-panel-head h3 { margin: 0; font: 650 16px/1.3 var(--font-ui); }
.p5-convo-panel-head button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; margin: 0; padding: 4px 12px; border-radius: 12px; font-size: 13.5px; }
.p5-convo-panel-head .ico { width: 16px; height: 16px; flex-basis: 16px; }
.p5-convo-list { display: grid; gap: 6px; max-height: 340px; margin: 0 0 10px; padding: 0; overflow: auto; list-style: none; }
.p5-convo-item { display: flex; align-items: center; gap: 8px; padding: 4px; border: 1px solid transparent; border-radius: 14px; }
.p5-convo-item:hover { background: var(--p5-soft); }
.p5-convo-item.is-current { border-color: var(--bp-brando-emerald-ring); background: var(--bp-success-bg); }
.p5-convo-open { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; min-height: 44px; margin: 0; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; color: var(--text-primary); text-align: left; }
.p5-convo-open strong { max-width: 100%; overflow: hidden; font: 650 14px/1.3 var(--font-ui); text-overflow: ellipsis; white-space: nowrap; }
.p5-convo-open span { max-width: 100%; overflow: hidden; color: var(--text-secondary); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.p5-convo-open small { color: var(--text-muted); font-size: 12px; }
.p5-convo-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.p5-convo-actions button { min-height: 36px; margin: 0; padding: 4px 10px; font-size: 13px; }
.p5-convo-actions button.is-confirm { color: var(--bp-error); }
.p5-rename { display: grid; flex: 1; gap: 6px; padding: 6px; }
.p5-rename label { font-size: 13px; font-weight: 600; }
.p5-rename input { min-height: 40px; }
.p5-rename .actions { display: flex; gap: 8px; margin: 0; }

/* Thread: scrollable, newest at the bottom, «Ir al final» when the person scrolled up */
.p5-thread-wrap { position: relative; margin: 14px 0 0; }
.p5-thread-wrap[hidden] { display: none; }
.p5-thread { display: flex; flex-direction: column; gap: 18px; max-height: min(62vh, 760px); padding: 18px 18px 22px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--p5-line); border-radius: 22px; background: linear-gradient(180deg, var(--p5-soft), #ffffff 120px); scroll-padding-bottom: 16px; }
.p5-thread:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.p5-to-end { position: absolute; right: 16px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: 0; padding: 6px 14px; border: 1px solid var(--bp-brando-emerald-ring); border-radius: 999px; background: var(--p5-canvas); color: var(--bp-brand-emerald-deep); font: 650 13px/1 var(--font-ui); box-shadow: var(--p5-shadow-hover); }
.p5-to-end[hidden] { display: none; }
.p5-to-end .p5-down { width: 16px; height: 16px; flex-basis: 16px; transform: rotate(90deg); }
.p5-note { margin: 0; color: var(--text-muted); font-size: 13.5px; text-align: center; }
.p5-note.is-warn { color: var(--bp-warning); }

/* Messages */
body.uxr .p5-thread .thread-msg { margin: 0; }
body.uxr .p5-thread .thread-msg.is-user { align-items: flex-end; }
body.uxr .p5-thread .p5-user-body { order: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: min(640px, 80%); }
body.uxr .p5-thread .thread-msg.is-user .home-asked { max-width: none; padding: 12px 16px; border: 1px solid var(--p5-sand-line); border-radius: 18px 18px 4px 18px; background: var(--p5-sand); color: var(--bp-brand-charcoal); font-size: 15px; line-height: 1.55; white-space: pre-wrap; }
body.uxr .p5-thread .thread-avatar { background: var(--bp-success-bg); color: var(--bp-brand-emerald-deep); }
.p5-msg-state { color: var(--text-muted); font-size: 12px; }
.p5-msg-state.is-failed { color: var(--bp-error); }
body.uxr .p5-thread .thread-gem { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: var(--bp-success-bg); }
body.uxr .p5-thread .thread-msg.is-brando { margin-left: 0; }
body.uxr .p5-thread .thread-bubble { max-width: 820px; padding: 14px 18px; border: 1px solid var(--p5-line); border-radius: 4px 18px 18px 18px; background: var(--p5-canvas); box-shadow: var(--p5-shadow); }
body.uxr .p5-thread .thread-understood { border-bottom-color: var(--p5-line); }
body.uxr .p5-thread .thread-understood .ico { color: var(--bp-brand-emerald); }
body.uxr .p5-thread .thread-bubble .actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
body.uxr .p5-thread .thread-bubble .actions button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: 0; }
body.uxr .p5-thread .thread-bubble .actions .ico { width: 16px; height: 16px; flex-basis: 16px; }
.p5-route .thread-bubble .hint, .p5-error .thread-bubble .hint { margin: 8px 0 0; }
body.uxr .p5-thread .p5-error .thread-bubble { border-color: var(--bp-error-border); background: #fffafa; }
body.uxr #decision .p5-thread .p5-error h4 { margin: 0 0 4px; color: var(--bp-error); font: 650 14px/1.3 var(--font-ui); letter-spacing: 0; text-transform: none; }
body.uxr .p5-thread .p5-thinking .thread-bubble p { margin: 0; }
body.uxr .p5-thread .p5-thinking .thread-bubble .hint { margin-top: 4px; }
.p5-dots::after { content: ""; display: inline-block; width: 1.4em; text-align: left; animation: brando-dots 1.4s steps(4, end) infinite; }
.p5-gem-live { animation: p5-consult 2.2s ease-in-out infinite; }
/* Reply = the ADR-0038 proposal card, on white */
body.uxr .p5-thread .home-proposal { margin: 0; animation: uxr-rise var(--bp-motion-normal) var(--bp-ease) both; }
body.uxr .p5-thread .home-proposal:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
body.uxr .p5-thread .home-proposal-head { margin-bottom: 6px; }
body.uxr .p5-thread .home-proposal-head .home-mode { padding: 4px 10px; border: 1px solid var(--p5-sand-line); border-radius: 999px; background: var(--p5-sand); color: var(--bp-warning); font: 650 11.5px/1.2 var(--font-ui); }
body.uxr .p5-thread .home-proposal-head .home-mode.is-live { border-color: var(--bp-brando-emerald-ring); background: var(--bp-success-bg); color: var(--bp-brand-emerald-deep); }
body.uxr .p5-thread .home-proposal > .thread-msg.is-brando { margin: 0 0 0 50px; }
body.uxr .p5-thread .proposal-card { margin: 10px 0 0 50px; padding: 20px 22px; border-color: var(--p5-line); box-shadow: var(--p5-shadow); }
body.uxr .p5-thread .proposal-card::before { height: 3px; background: linear-gradient(90deg, var(--bp-brand-emerald), var(--bp-brand-champagne) 70%, transparent); }
body.uxr .p5-thread .home-option { background: var(--p5-canvas); border-color: var(--p5-line); }
body.uxr .p5-thread .home-option::before { background: var(--bp-success-bg); color: var(--bp-brand-emerald-deep); }
body.uxr .p5-thread .home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 14px; }
body.uxr .p5-thread .home-grid .home-block { padding: 14px 16px; border-radius: 14px; background: var(--p5-soft); }
body.uxr .p5-thread .proposal-next .next-steps li { background: var(--p5-soft); }
body.uxr .p5-thread .home-proposal-foot .actions { display: flex; flex-wrap: wrap; gap: 8px; }
body.uxr .p5-thread .home-proposal-foot .actions button[data-home-open-module] { background: var(--bp-brand-emerald); border-color: var(--bp-brand-emerald); color: var(--bp-white); }
body.uxr .p5-thread .home-proposal-foot .actions button[data-home-open-module]:hover { background: var(--bp-brand-emerald-deep); }
body.uxr .p5-thread .home-proposal-foot .actions button { display: inline-flex; align-items: center; gap: 6px; }
.p5-source { display: inline-block; margin-left: 4px; padding: 1px 8px; border: 1px solid var(--p5-sand-line); border-radius: 999px; background: var(--p5-canvas); color: var(--bp-warning); font-size: 12px; white-space: nowrap; }
.p5-session-note { margin: 10px 0 0; }

/* A thread is open: the hero steps back to one line, the starters become quiet chips (nothing is removed). */
body.uxr .p5-home[data-thread="active"] .home-hero { grid-template-columns: 64px minmax(0, 1fr); column-gap: 16px; padding: 6px 4px 0; }
body.uxr .p5-home[data-thread="active"] .home-hero-art { animation: none; }
body.uxr .p5-home[data-thread="active"] .home-hero-art::before { width: 76px; height: 76px; }
body.uxr .p5-home[data-thread="active"] .home-hero-art::after { display: none; }
body.uxr .p5-home[data-thread="active"] .home-gem { width: 60px; height: 60px; }
body.uxr .p5-home[data-thread="active"] .home-brand-line { margin: 0; font-size: 13.5px; }
body.uxr #decision .p5-home[data-thread="active"] h2 { margin: 0; font-size: clamp(22px, 1.9vw, 28px); }
body.uxr .p5-home[data-thread="active"] .home-hero-lead { display: none; }
body.uxr .p5-home[data-thread="active"] .home-composer { margin-top: 14px; }
body.uxr .p5-home[data-thread="active"] .home-starters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
body.uxr .p5-home[data-thread="active"] .home-starter { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 14px 4px 6px; border-radius: 999px; box-shadow: none; }
body.uxr .p5-home[data-thread="active"] .starter-icon { width: 30px; height: 30px; border-radius: 50%; }
body.uxr .p5-home[data-thread="active"] .starter-icon .ico { width: 16px; height: 16px; flex-basis: 16px; }
body.uxr .p5-home[data-thread="active"] .starter-lead, body.uxr .p5-home[data-thread="active"] .starter-arrow { display: none; }
body.uxr .p5-home[data-thread="active"] .starter-title { font-size: 13.5px; }
body.uxr .p5-home[data-thread="active"] .home-starter:hover { transform: none; }

/* States of Brando (no dark stage any more) */
body.uxr .p5-home[data-state="busy"] .home-composer { border-color: var(--bp-brando-emerald-ring); }
body.uxr .p5-home[data-state="busy"] .home-hero-art::after { border-style: dashed; border-color: var(--bp-brando-emerald-ring); opacity: 1; animation: brando-ring 2.6s linear infinite; }
body.uxr .p5-home[data-state="unavailable"] .home-hero-art { filter: saturate(.75); }
body.uxr .p5-home[data-state="unavailable"] .home-composer { border-color: var(--p5-line-strong); }

/* «Continuar donde lo dejaste»: at most two cards on white, sand detail on the next step */
body.uxr #decision .home-continue { max-width: 1080px; margin: 30px auto 0; }
body.uxr .continue-grid > .next-step { background: linear-gradient(135deg, #ffffff 60%, var(--p5-sand)); border-color: var(--p5-line); box-shadow: var(--p5-shadow); }
body.uxr .continue-grid > .next-step h3 { font-size: 22px; }
body.uxr .continue-grid > .next-step .next-step-art img { width: 52px; height: 52px; }
/* The decorative mark keeps its own corner: the text of the next decision never runs under it. */
body.uxr .continue-grid > .next-step > div:first-child { padding-right: 136px; }
@media (max-width: 767px) { body.uxr .continue-grid > .next-step > div:first-child { padding-right: 0; } }
body.uxr .continue-start { background: var(--p5-canvas); border-color: var(--p5-line-strong); }
body.uxr .continue-start:hover { background: var(--bp-success-bg); }
body.uxr #decision .home-overview { max-width: 1080px; margin: 18px auto 0; }
body.uxr #decision .home-answer:empty { display: none; }

/* Account settings and web assistant mounts (the view modules style their own content) */
.p5-settings-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.p5-settings-links button { min-height: 44px; margin: 0; }
.p5-mount { min-height: 120px; }
.p5-assistant-entry { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 18px; padding: 14px 18px; border: 1px solid var(--p5-line); border-left: 3px solid var(--bp-brand-champagne); border-radius: 16px; background: var(--p5-canvas); box-shadow: var(--p5-shadow); }
.p5-assistant-entry > div { flex: 1 1 280px; min-width: 0; }
body.uxr #decision .p5-assistant-entry h3 { margin: 0 0 2px; font: 650 15.5px/1.3 var(--font-ui); }
.p5-assistant-entry .hint { margin: 0; }
.p5-assistant-entry button { min-height: 44px; margin: 0; }
.p5-assistant-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--p5-sand); color: var(--bp-divider-gold); }
.p5-assistant-icon .ico { width: 20px; height: 20px; flex-basis: 20px; }

@keyframes p5-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes p5-consult { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-6deg) translateY(-1px); } }

/* ───────────── Tablet and phone ───────────── */
@media (max-width: 1279px) {
  body.uxr .p5-home .home-starters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  body.uxr .p5-home .home-hero { grid-template-columns: 128px minmax(0, 1fr); padding: 16px 4px 4px; }
  body.uxr .p5-home .home-gem { width: 116px; height: 116px; }
  body.uxr .p5-home .home-hero-art::before { width: 150px; height: 150px; }
  body.uxr .p5-home .home-hero-art::after { width: 134px; height: 134px; }
}
@media (max-width: 767px) {
  body.uxr .p5-home .home-hero { grid-template-columns: minmax(0, 1fr); padding: 6px 0 0; text-align: center; }
  body.uxr .p5-home .home-gem { width: 96px; height: 96px; }
  body.uxr .p5-home .home-hero-art::before { width: 124px; height: 124px; }
  body.uxr .p5-home .home-hero-art::after { width: 112px; height: 112px; }
  body.uxr #decision .p5-home h2 { font-size: 30px; }
  body.uxr .p5-home .home-hero-lead { font-size: 15px; }
  body.uxr .p5-home .home-composer { margin-top: 16px; padding: 10px 10px 10px 14px; border-radius: 18px; }
  /* The mode chip and the send button share a row only when both fit; the chip never leaves the composer. */
  body.uxr .p5-home .home-composer-bar { flex-wrap: wrap; gap: 8px; }
  body.uxr .p5-home .home-composer-bar .home-mode { order: 0; margin: 0 auto 0 0; max-width: 100%; }
  body.uxr .p5-home .home-composer button[type="submit"] { order: 0; width: auto; margin-left: auto; padding: 8px 14px; }
  .p5-keys { display: none; }
  body.uxr .p5-home .home-help { text-align: left; }
  body.uxr .p5-home .home-starters { gap: 8px; }
  body.uxr .p5-home .home-starter { grid-template-columns: 32px minmax(0, 1fr); align-items: center; padding: 12px; }
  body.uxr .p5-home .starter-icon { width: 32px; height: 32px; border-radius: 10px; }
  body.uxr .p5-home .starter-icon .ico { width: 17px; height: 17px; flex-basis: 17px; }
  body.uxr .p5-home .starter-title { font-size: 13.5px; }
  body.uxr .p5-convo-bar { gap: 8px; }
  .p5-convo-title { display: none; }
  .p5-convo-toggle, .p5-convo-new { min-height: 44px; }
  .p5-convo-new span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .p5-convo-new { width: 44px; justify-content: center; padding: 0; border-color: var(--p5-line-strong); }
  .p5-convo-item { flex-wrap: wrap; }
  .p5-convo-actions { width: 100%; justify-content: flex-end; }
  .p5-thread { max-height: 58vh; padding: 12px 10px 18px; gap: 14px; border-radius: 18px; }
  body.uxr .p5-thread .thread-gem { flex-basis: 32px; width: 32px; height: 32px; }
  body.uxr .p5-thread .p5-user-body { max-width: 88%; }
  body.uxr .p5-thread .home-proposal > .thread-msg.is-brando, body.uxr .p5-thread .proposal-card { margin-left: 0; }
  body.uxr .p5-thread .proposal-card { padding: 16px 14px; }
  body.uxr .p5-thread .home-proposal-head { flex-wrap: wrap; }
  body.uxr .p5-home[data-thread="active"] .home-hero { grid-template-columns: 44px minmax(0, 1fr); text-align: left; }
  body.uxr .p5-home[data-thread="active"] .home-gem { width: 44px; height: 44px; }
  body.uxr .p5-home[data-thread="active"] .home-hero-art::before { width: 54px; height: 54px; }
  body.uxr #decision .p5-home[data-thread="active"] h2 { font-size: 21px; }
  body.uxr .p5-home[data-thread="active"] .home-brand-line { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  body.uxr .p5-home .home-hero-art, .p5-gem-live, .p5-dots::after, body.uxr .p5-thread .home-proposal, body.uxr .p5-home[data-state="busy"] .home-hero-art::after { animation: none !important; }
  .p5-convo-toggle .p5-chevron { transition: none; }
}
body.uxr .p5-home[data-convo="off"] .p5-convo-bar { display: none; }
body.uxr.app header .brand { background: transparent; }
@media (max-width: 767px) { body.uxr.app .mobile-tabbar { background: rgba(255, 255, 255, .97); border-top-color: var(--p5-line); } }
/* Iteration 2 · left-aligned hero and bar; the thread leaves the composer in view; quieter focus on a reply. */
body.uxr #decision .p5-home { align-items: stretch; text-align: left; }
body.uxr .p5-home .home-hero { justify-content: start; justify-items: start; text-align: left; }
body.uxr .p5-home .home-hero-copy { text-align: left; }
.p5-thread { position: relative; max-height: max(320px, calc(100vh - 440px)); }
body.uxr .p5-thread .home-proposal:focus-visible, body.uxr .p5-thread .home-proposal:focus { outline: 2px solid var(--bp-brando-emerald-ring); outline-offset: 4px; border-radius: 18px; }
body.uxr .p5-thread .home-option > button, body.uxr .p5-thread .home-option > .home-proposal-actions { align-self: flex-start; }
@media (max-width: 767px) { body.uxr .p5-home .home-hero, body.uxr .p5-home .home-hero-copy { justify-items: center; text-align: center; } body.uxr .p5-home .home-brand-line { justify-content: center; } .p5-thread { max-height: max(300px, calc(100vh - 380px)); } }
@media (max-width: 767px) { body.uxr .p5-home[data-thread="active"] .home-hero, body.uxr .p5-home[data-thread="active"] .home-hero-copy { justify-items: start; text-align: left; } body.uxr .p5-home[data-thread="active"] .home-brand-line { justify-content: flex-start; } }
@media (max-width: 767px) {
  .p5-thread { max-height: max(260px, calc(100vh - 480px)); }
  body.uxr .p5-thread .home-proposal-head > div { flex: 1 1 calc(100% - 56px); }
  body.uxr .p5-thread .home-proposal-head .eyebrow { letter-spacing: .06em; }
  body.uxr .p5-thread .home-proposal-head .home-mode { margin-left: 50px; }
}
/* The shell's global `header` rules (sticky top bar) must not apply to the headings of the mounted view modules
   (account · web assistant), as for the campaign cards. */
body.uxr.app .p5-mount header, body.uxr.app:not(.left-collapsed) .p5-mount header { position: static; display: block; grid-template-columns: none; min-height: 0; height: auto; margin: 0 0 8px; padding: 0 0 16px; inset: auto; z-index: auto; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
body.uxr.app .p5-mount header::after, body.uxr.app .p5-mount header::before { content: none; display: none; }
/* The bell joins the top bar only where the bar has room (the tool strip keeps the notifications elsewhere). */
@media (max-width: 1279px) { body.uxr.app .p5-bell { display: none; } }

/* Mounted account and assistant views: the workspace hero already names the area, so their own eyebrow and title
   stay for assistive technology only (the tablist keeps its accessible name) and nothing is said twice. */
body.uxr .p5-mount .acct-head .acct-eyebrow, body.uxr .p5-mount .asst-head .asst-eyebrow { display: none; }
body.uxr .p5-mount .acct-head h2, body.uxr .p5-mount .asst-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
