.night-story .night-controls[hidden] { display: none !important; }
.night-story .night-controls:not([hidden]) { display: flex; }
.night-story[data-reduced-motion="true"] .night-controls { display: none !important; }
.night-story .story-stage { display: block; }
.night-caption,
.night-disclosure { position: absolute; z-index: 5; left: 32px; margin: 0; color: #41413D; }
.night-caption { top: 16px; font-size: 14px; font-weight: 560; line-height: 20px; }
.night-disclosure { top: 532px; color: #62625D; font-size: 12px; line-height: 16px; }
.night-browser { position: absolute; top: 48px; left: 32px; width: 672px; height: 472px; overflow: hidden; border: 1px solid #E8E8E5; border-radius: 24px; background: #fff; box-shadow: 0 16px 40px rgba(35,33,24,.12); color: #171717; }
.night-chrome { display: flex; height: 32px; align-items: center; gap: 14px; padding: 0 13px; border-bottom: 1px solid #EDEDEA; background: #FAFAF8; color: #62625D; font-size: 12px; line-height: 20px; }
.night-window-dots { display: flex; gap: 5px; }
.night-window-dots i { width: 7px; height: 7px; border-radius: 50%; background: #D8D8D3; }
.night-aperture { position: relative; width: 100%; height: 440px; overflow: hidden; background: #fff; }
.night-customer,
.night-owner { position: absolute; inset: 0; background: #fff; }
.night-story:not([data-enhanced]) .night-customer { display: none; }
.night-story:not([data-enhanced]) .night-owner { display: block; }
.night-story:not([data-enhanced]) .night-detail-scroll { height: auto; overflow: visible; transform: translateY(-300px); }
.night-story .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.night-chat-head { display: flex; height: 44px; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid #EDEDEA; }
.night-chat-head img { width: 36px; height: 28px; flex: none; object-fit: contain; }
.night-chat-head > span { display: grid; gap: 1px; }
.night-chat-head b { font-size: 14px; font-weight: 560; line-height: 18px; }
.night-chat-head small { color: #62625D; font-size: 12px; line-height: 16px; }
.night-transcript { display: flex; height: 292px; flex-direction: column; justify-content: center; gap: 8px; padding: 8px 24px; overflow: hidden; }
.night-bubble { display: grid; width: fit-content; max-width: 600px; gap: 4px; padding: 7px 12px; border-radius: 20px; opacity: 0; transform: translateY(5px); }
.night-bubble[data-visible="true"] { opacity: 1; transform: translateY(0); }
.night-bubble[hidden] { display:none!important; }
.night-thinking { display: none; align-items: center; gap: 5px; align-self: flex-start; padding: 8px 12px; border-radius: 18px; background: #F0F0EC; color: #62625D; font-size: 12px; line-height: 16px; }
.night-thinking[data-visible="true"] { display: flex; }
.night-thinking > span { margin-right: 4px; }
.night-thinking > i { width: 5px; height: 5px; border-radius: 50%; background: #73736D; }
.night-bubble.night-buyer { align-self: flex-end; background: #4265EE; color: #fff; }
.night-bubble.night-answer { align-self: flex-start; background: #F0F0EC; color: #171717; }
.night-meta { display: flex; justify-content: space-between; gap: 18px; font-size: 12px; line-height: 16px; }
.night-meta b { font-weight: 560; }
.night-meta time { flex: none; opacity: .76; }
.night-bubble p { margin: 0; font-size: 18px; line-height: 26px; overflow-wrap: anywhere; }
.night-composer { display: flex; height: 64px; align-items: center; gap: 2px; margin: 12px 16px 16px; padding: 7px 8px 7px 18px; border: 1px solid #E6E6E6; border-radius: 999px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.04); color: #62625D; font-size: 16px; line-height: 24px; }
.night-composer[data-focused="true"] { border-color: #B8B8B0; }
.night-input { min-width: 0; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.night-caret { width: 1px; height: 18px; flex: none; background: #171717; opacity: 0; }
.night-caret[data-visible="true"] { opacity: 1; animation: night-caret-blink 1s steps(2, start) infinite; }
.night-story[data-state="paused"] .night-caret { animation-play-state: paused; }
@keyframes night-caret-blink { 50% { opacity: 0; } }
.night-send { display: grid; width: 46px; height: 46px; flex: none; place-items: center; margin-left: auto; border-radius: 50%; background: #171717; color: #fff; font-size: 22px; line-height: 1; }
.night-story[data-enhanced] .night-customer,
.night-story[data-enhanced] .night-owner { display: block; }
.night-story[data-night-context="buyer"] .night-customer { opacity: 1; transform: translateX(0); }
.night-story[data-night-context="buyer"] .night-owner { opacity: 0; transform: translateX(24px); pointer-events: none; }
.night-story[data-night-context="owner"] .night-customer { opacity: 0; transform: translateX(-32px); pointer-events: none; }
.night-story[data-night-context="owner"] .night-owner { opacity: 1; transform: translateX(0); }
.night-owner-canvas { position: relative; display: flex; width: 964px; height: 440px; align-items: flex-start; gap: 24px; padding: 20px 32px; transform: translateX(0); }
.night-story[data-night-camera="detail"] .night-owner-canvas { transform: translateX(-364px); }
.night-list-pane { width: 340px; flex: none; }
.night-list-head { margin: 0 0 14px; }
.night-eyebrow { margin: 0 0 3px; color: #62625D; font-size: 11px; line-height: 16px; }
.night-list-head h3 { margin: 0; font-size: 22px; font-weight: 560; line-height: 28px; letter-spacing: -.35px; }
.night-list-context { margin: 8px 0; color: #62625D; font-size: 12px; line-height: 18px; }
.night-export { display: inline-flex; align-items: center; padding: 7px 12px; border: 1px solid #EDEDEA; border-radius: 999px; font-size: 12px; line-height: 18px; }
.night-list-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; color: #62625D; font-size: 12px; line-height: 18px; }
.night-list-filters p { width: 100%; margin: 0; }
.night-list-filters > span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 1px solid #EDEDEA; border-radius: 999px; }
.night-list-filters i { display: grid; width: 14px; height: 14px; place-items: center; border-radius: 3px; background: #171717; color: #fff; font-size: 10px; font-style: normal; }
.night-list-filters .status-new { color: #004F99; background: #E5F3FF; }
.night-list-filters .status-in_progress { color: #6E5400; background: #FFF6D9; }
.night-list-filters .status-won { color: #126B3F; background: #E8F7EE; }
.night-list-filters .status-lost { color: #A12A2A; background: #FDECEC; }
.night-owner .lead-list { display: block; padding: 0; overflow: hidden; border-top: 1px solid #EDEDEA; }
.night-owner .lead-list-item { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 8px 12px; width: 100%; min-height: 112px; padding: 16px 12px; border: 0; border-bottom: 1px solid #EDEDEA; background: transparent; color: #171717; text-align: left; }
.night-owner .lead-list-item[aria-pressed="true"] { background: #FAFAF8; box-shadow: inset 2px 0 0 #171717; }
.night-owner .lead-status { width: fit-content; margin: 0; padding: 4px 8px; border-radius: 999px; background: #F0F0EC; color: #62625D; font-size: 11px; font-weight: 560; line-height: 16px; }
.night-owner .lead-list-main { display: grid; grid-column: 1 / -1; grid-row: 2; gap: 3px; min-width: 0; }
.night-owner .lead-list-main strong { font-size: 16px; font-weight: 560; line-height: 22px; }
.night-owner .lead-list-main > span { overflow: hidden; color: #62625D; font-size: 12px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.night-owner .lead-list-meta { display: flex; grid-column: 2; grid-row: 1; justify-self: end; color: #62625D; font-size: 12px; line-height: 16px; }
.night-detail-window { display: none; width: 600px; height: 440px; flex: none; overflow: hidden; }
.night-story[data-night-camera="detail"] .night-detail-window { display: block; }
.night-detail-scroll { width: 600px; height: 440px; overflow: hidden; scrollbar-width: none; }
.night-detail-scroll::-webkit-scrollbar { display: none; }
.night-owner .lead-detail { position: relative; width: 600px; min-height: 0; margin: 0; padding: 20px 24px 136px; overflow: visible; border: 1px solid #EDEDEA; border-radius: 16px; background: #fff; box-shadow: 0 4px 18px rgba(23,23,23,.06); color: #171717; }
.night-owner .lead-detail-close { position: absolute; top: 16px; right: 16px; display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #171717; color: #fff; font-size: 22px; line-height: 1; }
.night-owner .lead-detail > .eyebrow { margin: 0 0 8px; color: #62625D; font-size: 12px; line-height: 18px; }
.night-owner .lead-detail-title h2 { margin: 0 0 8px; font-size: 24px; font-weight: 560; line-height: 30px; letter-spacing: -.4px; }
.night-owner .lead-detail > .lead-status { margin-bottom: 0; }
.night-owner .lead-stage { margin: 16px 0 12px; padding: 12px 16px; border-radius: 16px; background: #F7F7F4; color: #62625D; }
.night-owner .lead-stage > span { display: block; margin-bottom: 7px; color: #62625D; font-size: 11px; line-height: 16px; }
.night-owner .lead-stage > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.night-owner .lead-stage-option { display: grid; min-height: 34px; place-items: center; padding: 4px 8px; border: 1px solid #EDEDEA; border-radius: 12px; color: #62625D; font-size: 12px; line-height: 18px; }
.night-owner .lead-stage-option.status-in_progress { color: #4265EE; background: #EEF1FF; }
.night-owner .lead-stage-option.status-won { color: #427D2C; background: #F0F5ED; }
.night-owner .lead-stage-option.status-lost { color: #B54747; background: #FBEEEE; }
.night-owner .lead-stage > small { display: block; margin-top: 6px; color: #62625D; font-size: 11px; line-height: 16px; }
.night-owner .avito-chat-button { display: flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; margin: 0; border: 1px solid #EDEDEA; border-radius: 12px; background: #F0F0EC; color: #41413D; font-size: 12px; line-height: 18px; }
.night-owner .night-fields { display: grid; gap: 12px; margin: 16px 0 0; }
.night-owner .night-fields > div { padding-top: 10px; border-top: 1px solid #EDEDEA; }
.night-owner .night-fields dt { color: #62625D; font-size: 12px; line-height: 18px; }
.night-owner .night-fields dd { margin: 3px 0 0; color: #171717; font-size: 16px; line-height: 23px; overflow-wrap: anywhere; }
.night-owner .night-history { margin-top: 18px; padding: 14px 0 0; border-top: 1px solid #EDEDEA; }
.night-owner .night-history > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.night-owner .night-history .eyebrow { margin: 0; color: #62625D; font-size: 12px; line-height: 18px; }
.night-owner .night-history > div:first-child > span { display: grid; min-width: 24px; height: 24px; place-items: center; border-radius: 50%; background: #F0F0EC; color: #41413D; font-size: 11px; }
.night-owner .night-history article { display: grid; grid-template-columns: 12px 1fr; gap: 8px; padding: 4px 0; }
.night-owner .night-history article > i { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #73736D; }
.night-owner .night-history article time { display: block; color: #62625D; font-size: 11px; line-height: 16px; }
.night-owner .night-history article b { display: block; margin-top: 2px; font-size: 13px; font-weight: 560; line-height: 18px; }
.night-owner .night-history article p { margin: 3px 0 0; color: #62625D; font-size: 12px; line-height: 18px; }
.night-click-halo { position: absolute; z-index: 3; top: 0; left: 0; width: 20px; height: 20px; border: 1px solid rgba(23,23,23,.42); border-radius: 50%; opacity: 0; pointer-events: none; }
.night-pointer { position: absolute; z-index: 4; top: 0; left: 0; width: 26px; height: 30px; opacity: 0; pointer-events: none; }
.night-pointer[data-visible="true"] { opacity: 1; }
.night-story[data-motion-ready="false"] .night-pointer,
.night-story[data-reduced-motion="true"] .night-pointer { display: none; }
@media (prefers-reduced-motion: reduce) {
  .night-story[data-enhanced] .night-customer,
  .night-story[data-enhanced] .night-owner,
  .night-owner-canvas,
  .night-bubble,
  .night-caret { transition: none !important; animation: none !important; }
}

@media (max-width:1000px) {
  .night-story .story-stage { height:520px; min-height:520px; padding:0; }
  .night-caption { top:8px; left:10px; max-width:calc(100% - 20px); font-size:12px; line-height:16px; }
  .night-disclosure { top:auto; bottom:4px; left:10px; max-width:calc(100% - 20px); font-size:10px; line-height:14px; }
  .night-browser { top:48px; left:8px; width:calc(100% - 16px); height:432px; border-radius:16px; }
  .night-chrome { height:30px; padding-inline:9px; font-size:11px; }
  .night-aperture { height:400px; }
  .night-customer { display:flex!important; flex-direction:column; }
  .night-chat-head { flex:none; min-height:52px; }
  .night-transcript { flex:1 1 0; min-height:0; height:auto; padding:8px 12px; overflow:auto; justify-content:flex-start; }
  .night-bubble { max-width:100%; min-width:0; flex:none; }
  .night-bubble p { font-size:16px; line-height:22px; }
  .night-composer { flex:none; height:56px; margin:8px 10px 12px; padding-left:12px; }
  .night-input { white-space:normal; overflow-wrap:anywhere; font-size:14px; line-height:18px; }
  .night-owner { container-type:inline-size; }
  .night-owner-canvas { width:max-content; height:400px; padding:12px; gap:12px; }
  .night-list-pane,.night-detail-window,.night-detail-scroll,.night-owner .lead-detail { width:calc(100cqw - 24px); min-width:0; }
  .night-detail-window,.night-detail-scroll { height:376px; }
  .night-detail-scroll { overflow:auto; }
  .night-owner .lead-detail { padding:14px 12px 24px; }
  .night-owner .lead-stage { padding:10px; }
  .night-owner .lead-stage-option { padding-inline:4px; font-size:11px; }
  .night-owner .lead-list-main > span { white-space:normal; overflow-wrap:anywhere; }
}

/* Approved cabinet semantic palette for the lead demonstration. */
.night-story { --lead-new:#1D4ED8; --lead-new-bg:#EFF6FF; --lead-progress:#92400E; --lead-progress-bg:#FFFBEB; --lead-won:#15803D; --lead-won-bg:#F0FDF4; --lead-lost:#B91C1C; --lead-lost-bg:#FEF2F2; --lead-new-dot:#2563EB; --lead-progress-dot:#D97706; --lead-won-dot:#16A34A; --lead-lost-dot:#EF4444; }
.night-story .status-new,.night-story .lead-status.status-new,.night-story .lead-stage-option.status-new { color:var(--lead-new);background:var(--lead-new-bg); }
.night-story .status-in_progress,.night-story .lead-status.status-in_progress,.night-story .lead-stage-option.status-in_progress { color:var(--lead-progress);background:var(--lead-progress-bg); }
.night-story .status-won,.night-story .lead-status.status-won,.night-story .lead-stage-option.status-won { color:var(--lead-won);background:var(--lead-won-bg); }
.night-story .status-lost,.night-story .lead-status.status-lost,.night-story .lead-stage-option.status-lost { color:var(--lead-lost);background:var(--lead-lost-bg); }
.night-story .status-new i { background:var(--lead-new-dot); }.night-story .status-in_progress i { background:var(--lead-progress-dot); }.night-story .status-won i { background:var(--lead-won-dot); }.night-story .status-lost i { background:var(--lead-lost-dot); }
