/* AI chat and interactive reading domain --------------------------------- */
.lz-chat-page {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: calc(100dvh - var(--lz-header-height));
  overflow-x: clip;
  color: var(--lz-ink);
}

.lz-reading-page {
  min-width: 0;
  color: var(--lz-ink);
}

.lz-chat-hero,
.lz-reading-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--lz-space-6);
  min-height: 190px;
  margin: 0 0 var(--lz-space-5);
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid rgba(231, 133, 109, .18);
  border-radius: var(--lz-radius-xl);
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 255, 255, .88) 0 4px, transparent 5px),
    radial-gradient(circle at 75% 36%, rgba(255, 255, 255, .64) 0 2px, transparent 3px),
    linear-gradient(125deg, rgba(255, 230, 216, .98), rgba(255, 248, 235, .95) 48%, rgba(238, 233, 251, .9));
  box-shadow: var(--lz-shadow-md);
}

.lz-reading-hero::after,
.lz-chat-hero::after {
  position: absolute;
  z-index: -1;
  top: -66px;
  right: -42px;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(117, 89, 186, .14);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 185, 237, .42), rgba(201, 185, 237, 0) 66%);
  content: "";
  pointer-events: none;
}

.lz-chat-hero h1,
.lz-reading-hero h1 {
  margin: 7px 0 8px;
  color: var(--lz-sage-900);
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  font-weight: 780;
  letter-spacing: -.045em;
}

.lz-chat-hero p,
.lz-reading-hero p {
  max-width: 690px;
  margin: 0;
  color: var(--lz-ink-soft);
  line-height: 1.75;
}

.lz-reading-hero-compact,
.lz-reading-hero.is-compact {
  min-height: 152px;
}

.lz-reading-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lz-purple-700);
  font-size: var(--lz-font-sm);
  font-weight: 760;
  letter-spacing: .06em;
}

.lz-chat-hero-meta {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--lz-space-2);
  max-width: 380px;
}

.lz-chat-page .lz-chat-hero {
  position: relative;
  z-index: 1;
  align-items: flex-start;
  min-height: 0;
  margin-bottom: 14px;
  padding: 24px 26px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.lz-chat-page .lz-chat-hero > div:first-of-type {
  position: relative;
  z-index: 3;
  max-width: 55%;
}

.lz-chat-page .lz-chat-hero h1 {
  margin: 3px 0 2px;
  font-size: clamp(2rem, 3vw, 2.7rem);
}

.lz-chat-page-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.lz-chat-page-background img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.lz-chat-page > :not(.lz-chat-page-background) {
  position: relative;
  z-index: 1;
}

.lz-chat-page .lz-chat-hero::after {
  display: none;
}

.lz-chat-mascot {
  position: absolute;
  top: 3px;
  right: 29%;
  z-index: 2;
  display: block;
  width: clamp(104px, 10vw, 142px);
  aspect-ratio: 1063 / 859;
  pointer-events: none;
  filter: drop-shadow(0 12px 18px rgba(184, 105, 88, 0.15));
}

.lz-chat-mascot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lz-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(231, 133, 109, .22);
  border-radius: var(--lz-radius-pill);
  color: #815036;
  background: rgba(255, 253, 248, .78);
  font-size: var(--lz-font-xs);
  font-weight: 740;
}

.lz-status-link {
  color: var(--lz-purple-700);
  text-decoration: none;
}

.lz-status-link:hover {
  border-color: rgba(117, 89, 186, .28);
  background: #fff;
}

.lz-inline-status {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--lz-line);
  border-radius: var(--lz-radius-md);
  color: var(--lz-ink-soft);
  background: rgba(255, 255, 255, .78);
  font-size: var(--lz-font-sm);
  line-height: 1.55;
}

.lz-inline-status[hidden] {
  display: none !important;
}

.lz-inline-status.is-error,
.empty-state.is-error {
  color: #8d3942;
  border-color: rgba(185, 81, 88, .22);
  background: #fff0ef;
}

.lz-inline-status.is-success {
  color: #315e46;
  border-color: rgba(76, 128, 99, .22);
  background: #eaf5ed;
}

.lz-inline-status.is-loading {
  color: var(--lz-purple-700);
  border-color: rgba(117, 89, 186, .2);
  background: var(--lz-purple-100);
}

/* AI chat ---------------------------------------------------------------- */
.lz-chat-layout {
  display: grid;
  grid-template-columns: minmax(210px, 236px) minmax(420px, 1fr) minmax(220px, 270px);
  gap: var(--lz-space-4);
  min-height: min(720px, calc(100dvh - var(--lz-header-height) - 76px));
  align-items: stretch;
}

.lz-chat-page .lz-chat-layout {
  height: clamp(480px, calc(100dvh - 330px), 700px);
  min-height: 0;
}

.lz-chat-sidebar,
.lz-chat-main,
.lz-chat-recommendations {
  min-width: 0;
  border: 1px solid rgba(112, 82, 70, .18);
  border-radius: var(--lz-radius-lg);
  background: rgba(255, 253, 248, .78);
  box-shadow: var(--lz-shadow-sm);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.lz-chat-sidebar,
.lz-chat-recommendations {
  padding: var(--lz-space-4);
}

.lz-chat-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--lz-space-4);
}

.lz-new-chat {
  width: 100%;
}

.lz-sidebar-heading {
  display: grid;
  gap: 3px;
}

.lz-sidebar-heading strong {
  color: var(--lz-sage-900);
  font-size: var(--lz-font-md);
}

.lz-sidebar-heading span,
.healing-hint,
.lz-safety-note,
.lz-composer-hint {
  color: var(--lz-muted);
  font-size: var(--lz-font-xs);
  line-height: 1.6;
}

.healing-session-list {
  display: grid;
  align-content: start;
  gap: 7px;
  max-height: 430px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.healing-session {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--lz-radius-md);
  color: var(--lz-ink-soft);
  background: rgba(255, 255, 255, .58);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--lz-transition), background var(--lz-transition), color var(--lz-transition), transform var(--lz-transition);
}

.healing-session strong {
  display: block;
  overflow: hidden;
  font-size: var(--lz-font-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.healing-session:hover,
.healing-session.active {
  border-color: rgba(117, 89, 186, .22);
  color: var(--lz-purple-700);
  background: var(--lz-purple-100);
}

.healing-session:active {
  transform: scale(.985);
}

.healing-hint.is-error {
  color: var(--lz-danger);
}

.lz-safety-note {
  margin: auto 0 0;
  padding: 12px;
  border-radius: var(--lz-radius-md);
  background: rgba(238, 242, 232, .78);
}

.lz-chat-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 235, 222, .62), rgba(255, 253, 248, .76) 26%);
}

.lz-chat-main > .lz-inline-status {
  width: auto;
  margin: 12px 14px 0;
}

.healing-messages {
  flex: 1 1 auto;
  min-height: 420px;
  max-height: min(620px, calc(100dvh - var(--lz-header-height) - 250px));
  padding: clamp(18px, 3vw, 30px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.lz-chat-page .healing-messages {
  min-height: 0;
  max-height: none;
}

.healing-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 100%;
  padding: 42px 20px;
  color: var(--lz-muted);
  text-align: center;
  line-height: 1.65;
}

.healing-empty strong {
  color: var(--lz-sage-900);
  font-size: var(--lz-font-lg);
}

.lz-empty-orb {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 4px;
  border: 1px solid rgba(117, 89, 186, .15);
  border-radius: 50%;
  color: var(--lz-purple-600);
  background: radial-gradient(circle at 35% 30%, #fff, var(--lz-purple-100));
  box-shadow: 0 14px 34px rgba(117, 89, 186, .15);
  font-size: 1.5rem;
}

.healing-msg {
  width: fit-content;
  max-width: min(78%, 680px);
  margin: 0 0 14px;
  padding: 13px 16px;
  border: 1px solid var(--lz-line);
  border-radius: 8px 18px 18px 18px;
  color: var(--lz-ink);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 5px 16px rgba(61, 73, 67, .06);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.healing-msg.user {
  margin-left: auto;
  border-color: rgba(231, 133, 109, .2);
  border-radius: 18px 8px 18px 18px;
  color: #693c30;
  background: linear-gradient(135deg, #ffd8c7, #f3ab92);
}

.healing-msg > :first-child,
.healing-msg > p:first-child {
  margin-top: 0;
}

.healing-msg > :last-child,
.healing-msg > p:last-child {
  margin-bottom: 0;
}

.healing-msg img,
.markdown-body img {
  display: block;
  max-width: 100%;
  max-height: 360px;
  margin-top: 10px;
  border-radius: var(--lz-radius-md);
  object-fit: contain;
  cursor: zoom-in;
}

.healing-card-pack {
  width: min(100%, 720px);
  margin: -2px 0 18px;
}

.healing-card-intro {
  margin: 0 0 8px;
  color: var(--lz-muted);
  font-size: var(--lz-font-sm);
}

.healing-card-scroll {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.healing-action-card {
  display: grid;
  gap: 10px;
  min-height: 152px;
  padding: 14px;
  border: 1px solid var(--lz-line);
  border-radius: var(--lz-radius-lg);
  color: var(--lz-ink);
  background: rgba(255, 255, 255, .78);
  text-decoration: none;
  transition: transform var(--lz-transition), box-shadow var(--lz-transition), border-color var(--lz-transition);
}

.healing-action-card:hover {
  border-color: rgba(117, 89, 186, .25);
  box-shadow: var(--lz-shadow-md);
  transform: translateY(-2px);
}

.healing-card-top,
.healing-card-main {
  display: flex;
}

.healing-card-top {
  align-items: center;
  justify-content: space-between;
}

.healing-card-main {
  flex-direction: column;
  gap: 3px;
}

.healing-card-main span,
.healing-card-tag,
.healing-card-cta {
  color: var(--lz-muted);
  font-size: var(--lz-font-xs);
}

.healing-card-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--lz-purple-700);
  background: var(--lz-purple-100);
}

.healing-card-cta {
  margin-top: auto;
  color: var(--lz-purple-700);
  font-weight: 700;
}

.healing-input {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin: 0 14px 8px;
  padding: 10px;
  border: 1px solid var(--lz-line-strong);
  border-radius: 20px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 12px 30px rgba(53, 65, 59, .11);
  backdrop-filter: blur(14px);
}

.healing-compose {
  min-width: 0;
}

.healing-compose textarea.form-control {
  min-height: 44px;
  max-height: 132px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  resize: none;
}

.healing-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

.healing-tool-btn,
.healing-attach-preview button,
.image-viewer button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: var(--lz-radius-pill);
  color: var(--lz-purple-700);
  background: transparent;
  cursor: pointer;
}

.healing-tool-btn span {
  font-size: var(--lz-font-xs);
  font-weight: 700;
}

.healing-tool-btn:hover,
.healing-attach-preview button:hover {
  background: var(--lz-purple-100);
}

.healing-attach-preview {
  display: none;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 4px 5px 4px 8px;
  border: 1px solid var(--lz-line);
  border-radius: var(--lz-radius-md);
  color: var(--lz-ink-soft);
  background: var(--lz-cream-100);
  font-size: var(--lz-font-xs);
}

.healing-attach-preview img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
}

.healing-attach-preview span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.healing-attach-preview button {
  min-width: 36px;
  min-height: 36px;
}

.lz-send-button {
  min-width: 96px;
}

.lz-composer-hint {
  margin: 0 20px 12px;
  text-align: center;
}

.lz-chat-recommendations {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lz-recommend-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-areas: "icon title" "icon copy";
  column-gap: 10px;
  align-items: center;
  min-height: 92px;
  padding: 13px;
  border: 1px solid var(--lz-line);
  border-radius: var(--lz-radius-lg);
  color: var(--lz-ink);
  text-decoration: none;
  transition: transform var(--lz-transition), box-shadow var(--lz-transition), border-color var(--lz-transition);
}

.lz-recommend-card > span {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 1.1rem;
}

.lz-recommend-card strong {
  grid-area: title;
}

.lz-recommend-card small {
  grid-area: copy;
  color: var(--lz-muted);
}

.lz-recommend-card.is-violet {
  background: linear-gradient(135deg, #f4f0ff, #fff);
}

.lz-recommend-card.is-violet > span {
  color: var(--lz-purple-700);
  background: var(--lz-purple-100);
}

.lz-recommend-card.is-sage {
  background: linear-gradient(135deg, #eef4e9, #fff);
}

.lz-recommend-card.is-sage > span {
  color: var(--lz-success);
  background: var(--lz-sage-100);
}

.lz-recommend-card.is-coral {
  background: linear-gradient(135deg, #fff0e7, #fff);
}

.lz-recommend-card.is-coral > span {
  color: var(--lz-coral-500);
  background: var(--lz-coral-100);
}

.lz-recommend-card:hover {
  border-color: rgba(117, 89, 186, .22);
  box-shadow: var(--lz-shadow-md);
  transform: translateY(-2px);
}

.image-viewer {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: none;
  place-items: center;
  padding: 70px 24px 24px;
  background: rgba(24, 30, 27, .82);
  backdrop-filter: blur(9px);
}

.image-viewer.open {
  display: grid;
}

.image-viewer > img {
  max-width: min(1100px, 94vw);
  max-height: 84vh;
  border-radius: var(--lz-radius-lg);
  object-fit: contain;
  box-shadow: var(--lz-shadow-lg);
}

.image-viewer button {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: 20px;
  color: #fff;
  background: rgba(255, 255, 255, .14);
}

/* Assessment ------------------------------------------------------------- */
.lz-assessment-panel {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 38px);
}

.scale-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--lz-space-4);
}

.scale-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-height: 230px;
  padding: 22px;
  border: 1px solid var(--lz-line);
  border-radius: var(--lz-radius-lg);
  color: var(--lz-ink);
  background: rgba(255, 253, 248, .86);
  text-decoration: none;
  transition: transform var(--lz-transition), box-shadow var(--lz-transition), border-color var(--lz-transition);
}

.scale-card:hover {
  border-color: rgba(117, 89, 186, .28);
  box-shadow: var(--lz-shadow-md);
  transform: translateY(-3px);
}

.scale-card-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: var(--lz-purple-700);
  background: var(--lz-purple-100);
  font-size: 1.25rem;
}

.scale-card p {
  margin: 7px 0 0;
  color: var(--lz-ink-soft);
  line-height: 1.7;
}

.scale-card .pill {
  margin-top: auto;
}

.lz-assessment-warning {
  margin: var(--lz-space-5) 0 0;
  padding: 13px 15px;
  border-left: 3px solid var(--lz-coral-500);
  border-radius: 0 var(--lz-radius-md) var(--lz-radius-md) 0;
  background: var(--lz-coral-100);
}

.scale-question-list {
  gap: 12px;
}

.scale-question {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--lz-line);
  border-radius: var(--lz-radius-lg);
  background: rgba(255, 255, 255, .72);
}

.scale-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.lz-assessment-score {
  margin-top: var(--lz-space-5);
  padding: 18px;
}

/* Upload readings and results ------------------------------------------- */
.lz-reading-steps-panel,
.lz-reading-panel {
  padding: clamp(18px, 2.5vw, 28px);
}

.lz-reading-steps-panel {
  margin-bottom: var(--lz-space-4);
}

.lz-reading-steps-panel .cosmic-steps {
  max-width: 780px;
  margin: 0 auto;
}

.lz-reading-workspace,
.lz-reading-result-grid {
  align-items: start;
  gap: var(--lz-space-4);
}

.lz-reading-upload-panel,
.lz-reading-result-panel,
.lz-reading-report-panel {
  min-width: 0;
}

.lz-reading-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 310px;
  padding: 28px;
  border: 1px dashed rgba(117, 89, 186, .35);
  border-radius: var(--lz-radius-xl);
  color: var(--lz-ink-soft);
  background:
    radial-gradient(circle at 50% 32%, rgba(201, 185, 237, .32), transparent 34%),
    linear-gradient(145deg, rgba(238, 242, 232, .9), rgba(255, 253, 248, .92));
  text-align: center;
}

.lz-reading-dropzone strong {
  color: var(--lz-sage-900);
  font-size: var(--lz-font-lg);
}

.lz-reading-upload-icon {
  width: 70px;
  height: 70px;
  color: var(--lz-purple-700);
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 12px 28px rgba(117, 89, 186, .14);
  font-size: 1.45rem;
}

.lz-reading-preview,
.lz-reading-result-image,
.lz-reading-explain-image,
.lz-palm-guide-image {
  display: block;
  width: 100%;
  border: 1px solid var(--lz-line);
  border-radius: var(--lz-radius-lg);
  background: rgba(255, 255, 255, .72);
  object-fit: contain;
}

.lz-reading-preview {
  max-height: 460px;
}

.lz-reading-result-image {
  max-height: 540px;
}

.lz-reading-explain-image,
.lz-palm-guide-image {
  max-height: 720px;
  background: #fff;
}

.lz-palm-guide-card {
  margin-bottom: var(--lz-space-4);
  padding: 15px;
}

.lz-reading-privacy-note {
  justify-content: flex-start;
  width: 100%;
  margin-top: var(--lz-space-3);
  padding: 10px 13px;
  white-space: normal;
  line-height: 1.55;
}

.lz-reading-status,
.lz-reading-report,
.report-box {
  min-height: 210px;
  padding: 20px;
  line-height: 1.85;
}

.lz-reading-status {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lz-muted);
  text-align: center;
}

.lz-reading-report {
  overflow-wrap: anywhere;
}

.lz-reading-report :first-child {
  margin-top: 0;
}

.lz-reading-report :last-child {
  margin-bottom: 0;
}

.lz-reading-history-head,
.lz-reading-subsection-head {
  margin-top: var(--lz-space-5);
}

.lz-reading-history-row {
  width: 100%;
  min-height: 62px;
  border: 1px solid var(--lz-line);
  background: rgba(255, 255, 255, .7);
  cursor: pointer;
}

.lz-reading-history-row:hover {
  border-color: rgba(117, 89, 186, .25);
  background: #fff;
}

.lz-reading-retry {
  margin-top: var(--lz-space-4);
}

/* Relationship reading -------------------------------------------------- */
.relationship-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
}

.person-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--lz-space-4);
}

.person-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--lz-line);
  border-radius: var(--lz-radius-lg);
  background: rgba(255, 255, 255, .62);
}

.person-card h2 {
  margin: 0 0 14px;
  color: var(--lz-sage-900);
  font-size: var(--lz-font-lg);
}

.field-stack {
  display: grid;
  gap: 12px;
}

.field-stack label {
  display: grid;
  gap: 6px;
  color: var(--lz-ink-soft);
  font-size: var(--lz-font-sm);
  font-weight: 720;
}

.relationship-question-fields {
  margin-top: var(--lz-space-4);
}

.relationship-aside {
  align-content: start;
}

.report-box {
  white-space: pre-wrap;
}

.history-row strong {
  font-size: .98rem;
}

/* Liuyao ---------------------------------------------------------------- */
.lz-liuyao-page .liuyao-shell {
  max-width: 1040px;
  margin: 0 auto;
}

.lz-liuyao-page .liuyao-intro,
.lz-liuyao-page .liuyao-question,
.lz-liuyao-page .liuyao-cast,
.lz-liuyao-result-page .liuyao-result-card {
  padding: clamp(20px, 3vw, 32px);
}

.liuyao-category-label {
  display: block;
  margin-top: var(--lz-space-4);
}

.lz-liuyao-page > .liuyao-shell > .lz-inline-status {
  margin: 0 0 var(--lz-space-4);
}

.lz-liuyao-page .coin {
  min-width: 72px;
  min-height: 72px;
  transition: transform var(--lz-transition), box-shadow var(--lz-transition), background var(--lz-transition);
}

.lz-liuyao-page .coin:hover {
  box-shadow: 0 12px 26px rgba(168, 103, 45, .19);
  transform: translateY(-2px);
}

.lz-liuyao-page .preview-line {
  border-radius: var(--lz-radius-md);
}

.lz-liuyao-result-page .liuyao-result-grid,
.lz-liuyao-result-page .liuyao-actions,
.lz-liuyao-result-page > .liuyao-result-card,
.lz-liuyao-result-page > .lz-inline-status {
  max-width: 1120px;
  margin-right: auto;
  margin-left: auto;
}

.lz-liuyao-result-page .liuyao-result-card {
  margin-bottom: var(--lz-space-4);
}

.lz-liuyao-result-page .liuyao-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lz-space-3);
  margin-top: var(--lz-space-5);
}

.lz-liuyao-result-page > .lz-inline-status {
  margin-top: var(--lz-space-3);
}

/* Responsive behavior --------------------------------------------------- */
@media (max-width: 1120px) {
  .lz-chat-layout {
    grid-template-columns: minmax(200px, 224px) minmax(0, 1fr);
  }

  .lz-chat-recommendations {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lz-chat-recommendations .lz-sidebar-heading {
    grid-column: 1 / -1;
  }

  .relationship-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(270px, .85fr);
  }
}

@media (max-width: 820px) {
  .lz-chat-hero,
  .lz-reading-hero {
    align-items: flex-start;
    flex-direction: column;
    min-height: 168px;
    padding: 28px 24px;
  }

  .lz-chat-hero-meta {
    justify-content: flex-start;
    max-width: none;
  }

  .lz-chat-layout,
  .relationship-layout,
  .person-grid {
    grid-template-columns: 1fr;
  }

  .lz-chat-layout {
    height: auto;
    min-height: 0;
  }

  .lz-chat-main {
    grid-row: 1;
  }

  .lz-chat-sidebar {
    grid-row: 3;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .lz-chat-recommendations {
    grid-row: 2;
  }

  .lz-chat-sidebar .lz-sidebar-heading,
  .lz-safety-note {
    grid-column: 1 / -1;
  }

  .healing-session-list {
    display: flex;
    max-height: none;
    overflow-x: auto;
  }

  .healing-session {
    flex: 0 0 180px;
  }

  .lz-chat-main {
    min-height: min(680px, calc(100dvh - var(--lz-header-height) - var(--lz-bottom-height) - 22px));
  }

  .healing-messages {
    min-height: 390px;
    max-height: none;
  }

  .scale-card-grid {
    grid-template-columns: 1fr;
  }

  .scale-card {
    min-height: 0;
  }

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

  .lz-reading-workspace,
  .lz-reading-result-grid {
    grid-template-columns: 1fr;
  }

  .relationship-aside {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .lz-chat-page,
  .lz-reading-page {
    margin-inline: -2px;
  }

  .lz-reading-hero {
    min-height: 156px;
    margin-bottom: 14px;
    padding: 24px 20px;
    border-radius: 22px;
  }

  .lz-chat-hero {
    min-height: 112px;
    margin-bottom: 12px;
    padding: 14px 16px;
    gap: 10px;
    border-radius: 22px;
  }

  .lz-chat-page .lz-chat-hero > div:first-of-type {
    max-width: 67%;
  }

  .lz-chat-mascot {
    top: 4px;
    right: 10px;
    width: 78px;
    aspect-ratio: 888 / 1212;
  }

  .lz-chat-hero p {
    display: none;
  }

  .lz-chat-hero-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: stretch;
    gap: 8px;
    width: 100%;
    max-width: none;
  }

  .lz-chat-hero .lz-status-chip {
    min-height: 36px;
    padding: 7px 10px;
    font-size: .76rem;
    white-space: nowrap;
  }

  .lz-chat-hero .lz-status-chip:first-child {
    min-width: 0;
    justify-content: flex-start;
  }

  .lz-chat-hero .lz-status-link {
    justify-self: end;
  }

  .lz-chat-hero h1,
  .lz-reading-hero h1 {
    font-size: 1.72rem;
  }

  .lz-chat-layout {
    gap: 12px;
  }

  .lz-chat-sidebar {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .lz-chat-sidebar .lz-sidebar-heading,
  .lz-safety-note {
    grid-column: auto;
  }

  .healing-session-list {
    margin-inline: -2px;
    padding-bottom: 3px;
  }

  .healing-session {
    flex-basis: 154px;
    min-height: 44px;
  }

  .lz-chat-main {
    min-height: 230px;
    height: 230px;
    padding-bottom: 104px;
    border-radius: 20px;
  }

  .healing-messages {
    min-height: 260px;
    padding: 16px 13px;
  }

  .healing-msg {
    max-width: 88%;
    padding: 11px 13px;
  }

  .healing-card-scroll {
    display: flex;
    margin-inline: -2px;
    padding-bottom: 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .healing-action-card {
    flex: 0 0 220px;
    min-height: 140px;
    scroll-snap-align: start;
  }

  .healing-input {
    position: fixed;
    right: 8px;
    bottom: calc(var(--lz-bottom-height) + env(safe-area-inset-bottom) + 8px);
    left: 8px;
    z-index: 145;
    width: auto;
    grid-template-columns: minmax(0, 1fr) 50px;
    margin: 0;
    padding: 7px;
  }

  body.lz-keyboard-open .healing-input {
    bottom: calc(var(--lz-visual-keyboard-offset, 0px) + 8px);
    z-index: 190;
  }

  .healing-tool-btn span,
  .lz-send-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .lz-send-button {
    min-width: 48px;
    width: 48px;
    min-height: 48px;
    height: 48px;
    padding: 0;
    overflow: hidden;
  }

  .lz-composer-hint {
    display: none;
  }

  .lz-chat-recommendations {
    display: flex;
    flex-flow: row wrap;
    padding: 13px;
  }

  .lz-chat-recommendations .lz-sidebar-heading {
    flex: 0 0 100%;
  }

  .lz-recommend-card {
    flex: 1 1 145px;
    min-height: 84px;
  }

  .lz-reading-steps-panel,
  .lz-reading-panel,
  .lz-liuyao-page .liuyao-intro,
  .lz-liuyao-page .liuyao-question,
  .lz-liuyao-page .liuyao-cast,
  .lz-liuyao-result-page .liuyao-result-card {
    padding: 17px;
  }

  .lz-reading-dropzone {
    min-height: 250px;
    padding: 20px;
  }

  .lz-reading-status,
  .lz-reading-report,
  .report-box {
    min-height: 170px;
    padding: 16px;
  }

  .scale-options {
    grid-template-columns: 1fr;
  }

  .person-card {
    padding: 14px;
  }

  .lz-liuyao-result-page .liuyao-actions > * {
    flex: 1 1 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lz-chat-page *,
  .lz-reading-page * {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* User-managed conversation personas ------------------------------------- */
.lz-persona-launch {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 58px;
  padding: 9px 12px;
  border: 1px solid rgba(117, 89, 186, .22);
  border-radius: 16px;
  color: var(--lz-sage-900);
  background: rgba(255, 253, 248, .88);
  box-shadow: 0 10px 24px rgba(105, 74, 77, .09);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.lz-persona-launch:hover,
.lz-persona-launch:focus-visible {
  border-color: rgba(117, 89, 186, .48);
  box-shadow: 0 12px 28px rgba(105, 74, 77, .14);
  transform: translateY(-1px);
  outline: none;
}

.lz-persona-launch-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--lz-purple-700);
  background: var(--lz-purple-100);
  font-size: 1.05rem;
}

.lz-persona-launch-copy {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.lz-persona-launch-copy small {
  color: var(--lz-ink-soft);
  font-size: .72rem;
}

.lz-persona-launch-copy strong {
  overflow: hidden;
  color: var(--lz-sage-900);
  font-size: .94rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lz-persona-launch-action {
  color: var(--lz-purple-700);
  font-size: .75rem;
  font-weight: 760;
  white-space: nowrap;
}

body.lz-modal-open {
  overflow: hidden;
}

.lz-persona-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(49, 43, 45, .42);
  backdrop-filter: blur(8px);
}

.lz-persona-modal.open {
  display: flex;
}

.lz-persona-dialog {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(820px, 100%);
  max-height: min(88dvh, 900px);
  padding: 22px;
  overflow: auto;
  border: 1px solid rgba(231, 133, 109, .24);
  border-radius: 22px;
  background: #fffdf8;
  box-shadow: 0 28px 80px rgba(54, 44, 47, .25);
}

.lz-persona-dialog-header,
.lz-persona-form-heading,
.lz-persona-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.lz-persona-dialog-header h2,
.lz-persona-form-heading h3 {
  margin: 2px 0 4px;
  color: var(--lz-sage-900);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
}

.lz-persona-dialog-header p {
  margin: 0;
  color: var(--lz-ink-soft);
  font-size: .88rem;
  line-height: 1.6;
}

.lz-persona-kicker {
  color: var(--lz-purple-700);
  font-size: .72rem;
  font-weight: 780;
}

.lz-icon-button,
.lz-text-button {
  border: 0;
  color: var(--lz-ink-soft);
  background: transparent;
  cursor: pointer;
}

.lz-icon-button {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--lz-line);
  border-radius: 50%;
}

.lz-text-button {
  padding: 7px 0;
  color: var(--lz-purple-700);
  font-weight: 720;
}

.lz-icon-button:hover,
.lz-icon-button:focus-visible,
.lz-text-button:hover,
.lz-text-button:focus-visible {
  color: var(--lz-purple-700);
  outline: none;
}

.lz-persona-chooser {
  display: grid;
  gap: 14px;
}

.lz-persona-chooser[hidden],
.lz-persona-form[hidden] {
  display: none !important;
}

.lz-persona-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lz-persona-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 13px;
  border: 1px solid var(--lz-line);
  border-radius: 14px;
  background: #fff;
}

.lz-persona-card.is-selected {
  border-color: rgba(117, 89, 186, .48);
  background: linear-gradient(135deg, rgba(243, 238, 253, .95), rgba(255, 251, 244, .95));
  box-shadow: 0 8px 20px rgba(117, 89, 186, .08);
}

.lz-persona-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #8a6cc6, #e89b87);
  font-weight: 800;
}

.lz-persona-card-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.lz-persona-card-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.lz-persona-card-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lz-persona-card-title em {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--lz-purple-700);
  background: var(--lz-purple-100);
  font-size: .66rem;
  font-style: normal;
  font-weight: 760;
}

.lz-persona-card-copy small {
  overflow: hidden;
  color: var(--lz-ink-soft);
  font-size: .75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lz-persona-card-actions {
  display: flex;
  gap: 6px;
}

.lz-persona-card-actions button {
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid rgba(117, 89, 186, .24);
  border-radius: 9px;
  color: var(--lz-purple-700);
  background: #fff;
  font-size: .75rem;
  font-weight: 740;
  cursor: pointer;
}

.lz-persona-card-actions button:disabled {
  color: #54725f;
  border-color: rgba(76, 128, 99, .2);
  background: #eaf5ed;
  cursor: default;
}

.lz-persona-add,
.lz-persona-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 70px;
  padding: 13px;
  border: 1px dashed rgba(117, 89, 186, .34);
  border-radius: 14px;
  color: var(--lz-purple-700);
  background: rgba(243, 238, 253, .48);
}

.lz-persona-add {
  width: 100%;
  cursor: pointer;
}

.lz-persona-add > span,
.lz-persona-empty {
  flex-direction: column;
}

.lz-persona-add > span {
  display: grid;
  text-align: left;
}

.lz-persona-add small,
.lz-persona-empty span {
  color: var(--lz-ink-soft);
  font-size: .76rem;
}

.lz-persona-form {
  display: grid;
  gap: 16px;
}

.lz-persona-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 16px;
}

.lz-persona-field {
  display: grid;
  min-width: 0;
  gap: 7px;
  margin: 0;
}

.lz-persona-field > span,
.lz-persona-field legend {
  color: var(--lz-ink);
  font-size: .82rem;
  font-weight: 730;
}

.lz-persona-field em {
  color: #b65a59;
  font-size: .7rem;
  font-style: normal;
}

.lz-persona-field input,
.lz-persona-field select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--lz-line);
  border-radius: 10px;
  color: var(--lz-ink);
  background: #fff;
}

.lz-persona-field input:focus,
.lz-persona-field select:focus {
  border-color: rgba(117, 89, 186, .54);
  box-shadow: 0 0 0 3px rgba(117, 89, 186, .1);
  outline: none;
}

.lz-persona-field-wide,
.lz-persona-gender {
  grid-column: 1 / -1;
}

.lz-persona-gender {
  min-width: 0;
  padding: 0;
  border: 0;
}

.lz-segmented-control {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.lz-segmented-control label {
  margin: 0;
}

.lz-segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lz-segmented-control span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--lz-line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.lz-segmented-control input:checked + span {
  color: var(--lz-purple-700);
  border-color: rgba(117, 89, 186, .52);
  background: var(--lz-purple-100);
  font-weight: 760;
}

.lz-segmented-control input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(117, 89, 186, .12);
}

.lz-persona-privacy {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: #557061;
  background: #eef6ef;
  font-size: .78rem;
  line-height: 1.55;
}

.lz-persona-form-actions {
  padding-top: 2px;
}

.lz-persona-save,
.lz-danger-button {
  min-height: 46px;
  padding: 10px 18px;
}

.lz-persona-save {
  margin-left: auto;
}

.lz-danger-button {
  border: 1px solid rgba(182, 90, 89, .3);
  border-radius: 12px;
  color: #a34043;
  background: #fff4f2;
  font-weight: 730;
  cursor: pointer;
}

@media (max-width: 640px) {
  .lz-chat-page .lz-chat-hero {
    min-height: 150px;
  }

  .lz-chat-hero-meta {
    max-width: none;
  }

  .lz-persona-launch {
    grid-column: 1 / -1;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    min-height: 54px;
    padding: 7px 10px;
    border-radius: 13px;
  }

  .lz-persona-launch-icon {
    width: 34px;
    height: 34px;
    font-size: .9rem;
  }

  .lz-persona-launch-action,
  .lz-persona-launch-copy small {
    display: block;
  }

  .lz-persona-launch-copy strong {
    font-size: .82rem;
  }

  .lz-persona-launch-action {
    font-size: .7rem;
  }

  .lz-persona-modal {
    align-items: flex-end;
    padding: 0;
  }

  .lz-persona-dialog {
    width: 100%;
    max-height: 92dvh;
    padding: 18px 15px calc(18px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
  }

  .lz-persona-dialog-header p {
    display: none;
  }

  .lz-persona-list,
  .lz-persona-fields {
    grid-template-columns: 1fr;
  }

  .lz-persona-field-wide,
  .lz-persona-gender {
    grid-column: auto;
  }

  .lz-persona-card {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .lz-persona-avatar {
    width: 42px;
    height: 42px;
  }

  .lz-persona-card-actions button:first-child {
    min-width: 54px;
  }

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

  .lz-persona-form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .lz-persona-save,
  .lz-danger-button {
    width: 100%;
    margin: 0;
  }
}
