.home-chat[hidden], .home-chat__resume[hidden] { display: none; }
.landing-body.is-home-chat-open { overflow: hidden; }
.landing-body.is-home-chat-open > .home-header { visibility: hidden; }
.landing-hero.is-chat-open { position: fixed; inset: 0; z-index: 60; width: 100%; height: 100dvh; min-height: 0; padding: 0; overflow: clip; }
.landing-hero.is-chat-open::before { background: linear-gradient(180deg, rgba(10, 10, 8, .48), rgba(10, 10, 8, .19) 25%, rgba(10, 10, 8, .15) 62%, rgba(10, 10, 8, .46)); }
.landing-hero.is-chat-open::after { opacity: .12; }
.landing-hero.is-chat-open .landing-hero__video { filter: saturate(.92) contrast(.98) brightness(.94); }
.landing-hero.is-chat-open .landing-hero__inner { width: 100%; height: 100%; transform: none; animation: none; }
.landing-hero.is-chat-open .landing-hero__scroll,
.landing-hero.is-chat-open .landing-hero__note,
.landing-hero.is-chat-open .landing-hero__motion { display: none; }
.home-chat {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); height: 100%; min-height: 0;
  border: 0; border-radius: 0; overflow: hidden;
  color: var(--landing-paper); background: rgba(18, 18, 15, .08);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  font-family: var(--theme-font); color-scheme: dark;
  animation: home-chat-open 260ms ease both;
}
.home-chat button, .home-chat input { font-family: inherit; }
.home-chat button:focus-visible, .home-chat input:focus-visible, .home-chat__resume:focus-visible { outline: 2px solid var(--landing-gold); outline-offset: 3px; }
.home-chat button:disabled { cursor: wait; opacity: .5; }
.home-chat__sidebar { position: absolute; z-index: 5; inset: 0 auto 0 0; width: min(236px, 78%); min-height: 0; display: flex; flex-direction: column; gap: 16px; padding: 26px 18px 18px; border-right: 1px solid rgba(255, 245, 227, .14); background: rgba(20, 20, 17, .38); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 16px 0 45px #0004; }
.home-chat__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; font-size: 20px; font-weight: 650; }
.home-chat__brand img { width: 32px; height: 32px; object-fit: contain; }
.home-chat__brand small { display: block; margin-top: 4px; color: #c7beb0; font-size: 11px; font-weight: 400; letter-spacing: 1px; }
#homeChatSidebarClose { display: grid; margin-left: auto; flex-basis: 30px; width: 30px; height: 30px; padding: 3px; }
.home-chat__new { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 9px 14px; border: 1px solid rgba(244, 199, 125, .3); border-radius: 12px; color: #ffdaa0; background: rgba(244, 199, 125, .09); font-size: 14px; cursor: pointer; text-align: left; }
.home-chat__new span { font-size: 22px; line-height: 1; }
.home-chat__sidebar input { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; color: #fff7e9; background: rgba(255, 255, 255, .035); font-size: 12px; }
.home-chat__sidebar input::placeholder { color: #c7beb0; }
.home-chat__eyebrow { margin: 5px 10px -5px; color: #d0c6b7; font-size: 11px; letter-spacing: 1.4px; }
.home-chat__history { min-height: 0; flex: 1; display: flex; flex-direction: column; gap: 5px; overflow-y: auto; }
.home-chat__history button { flex-shrink: 0; width: 100%; padding: 11px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #e7dfd3; text-align: left; font-size: 13px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-chat__history button[aria-current="true"] { color: #ffdaa0; background: rgba(244, 199, 125, .1); border-color: rgba(244, 199, 125, .15); }
.home-chat__history button:hover, .home-chat__icon:hover { background: rgba(255, 255, 255, .09); }
.home-chat__history p { padding: 0 11px; color: #c7beb0; font-size: 12px; }
.home-chat__history-row { display: flex; align-items: center; min-width: 0; gap: 3px; }
.home-chat__history-row > button:first-child { flex: 1; min-width: 0; width: auto; }
.home-chat__history-row > .home-chat__history-delete { width: auto; flex-shrink: 0; padding: 8px 5px; font-size: 11px; color: #c7beb0; }
.home-chat__privacy { margin: 0; padding: 15px 5px 0; border-top: 1px solid rgba(255, 255, 255, .1); color: #c7beb0; font-size: 10px; line-height: 1.9; }
.home-chat__main { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: transparent; }
.home-chat__header { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid rgba(255, 255, 255, .1); background: rgba(20, 20, 17, .23); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.home-chat__heading { flex: 1; min-width: 0; }
.home-chat__heading strong { display: block; font-size: 15px; font-weight: 600; }
.home-chat__heading strong span { margin-left: 9px; color: #f4c77d; font-size: 11px; font-weight: 400; }
.home-chat__heading small { display: block; margin-top: 5px; color: #cfc5b6; font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.home-chat__icon { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .13); border-radius: 10px; padding: 8px; color: #eadfce; background: rgba(255, 255, 255, .03); cursor: pointer; }
.home-chat__icon svg { width: 20px; height: 20px; }
#homeChatClose { background: rgba(20, 20, 17, .23); }
#homeChatClose:hover { background: rgba(244, 199, 125, .18); }
.home-chat__messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 30px max(24px, calc((100% - 780px) / 2)); scrollbar-width: thin; scrollbar-color: #a18d6e55 transparent; }
.home-chat__welcome { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 25px 0; text-align: center; text-shadow: 0 2px 16px rgba(0, 0, 0, .65), 0 1px 3px rgba(0, 0, 0, .45); }
.home-chat__welcome svg { width: 36px; height: 36px; color: var(--landing-gold); margin-bottom: 14px; }
.home-chat__welcome h3 { margin: 0; font-size: clamp(22px, 2.2vw, 31px); font-weight: 500; letter-spacing: .3px; }
.home-chat__welcome p { margin: 12px 0 0; color: #f3ebdf; font-size: 14px; line-height: 1.8; }
.home-chat__message { display: flex; gap: 13px; margin-bottom: 28px; min-width: 0; }
.home-chat__avatar { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: rgba(244, 199, 125, .12); color: var(--landing-gold); font-size: 11px; font-weight: 600; }
.home-chat__bubble { min-width: 0; max-width: 100%; padding-top: 3px; }
.home-chat__bubble > small { display: block; margin-bottom: 9px; color: #d2c7b7; font-size: 11px; }
.home-chat__text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.9; color: #fff8ed; }
.home-chat__message--user { justify-content: flex-end; }
.home-chat__message--assistant .home-chat__bubble { padding: 14px 18px; border: 1px solid rgba(255, 245, 227, .12); border-radius: 4px 16px 16px; background: rgba(20, 20, 17, .48); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.home-chat__message--user .home-chat__bubble { max-width: 86%; padding: 13px 18px; border: 1px solid rgba(244, 199, 125, .2); border-radius: 16px 16px 4px 16px; background: rgba(49, 40, 26, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.home-chat__message--user small { color: #e7c68f; }
.home-chat__bubble > .home-chat__delivery { margin: 8px 0 0; }
.home-chat__message.is-failed .home-chat__text { color: #ffd1a1; }
.home-chat__copy { display: block; margin-top: 9px; border: 0; padding: 4px 0; background: transparent; color: #cbbba3; font-size: 11px; cursor: pointer; }
.home-chat__media { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.home-chat__media img, .home-chat__media video { max-width: 180px; max-height: 130px; object-fit: contain; border-radius: 10px; }
.home-chat__media span { display: block; overflow-wrap: anywhere; font-size: 11px; color: #d5ccbf; }
.home-chat__typing { color: #e4c28c; font-size: 13px; }
.home-chat__typing::after { content: "..."; display: inline-block; width: 20px; animation: home-chat-pulse 1.4s ease-in-out infinite; }
.home-chat__composer { flex-shrink: 0; width: min(830px, 100%); margin: 0 auto; padding: 0 24px; }
.home-chat__composer .landing-prompt { padding: 14px 18px 8px; border-radius: 18px; border-color: rgba(244, 199, 125, .36); background: rgba(20, 20, 17, .47); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 8px 32px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .06); }
.home-chat__composer .landing-prompt textarea { min-height: 49px; max-height: 112px; font-size: 14px; }
.home-chat__composer .landing-modes button { min-height: 36px; padding: 6px 10px; font-size: 11px; }
.home-chat__composer .landing-attach, .home-chat__composer .landing-send { width: 38px; height: 38px; }
.home-chat__composer .landing-prompt__status { margin-top: 4px; font-size: 11px; }
.home-chat__disclaimer { flex-shrink: 0; margin: 10px 16px 13px; color: #c6bcae; font-size: 10px; text-align: center; line-height: 1.6; }
.home-chat__disclaimer, .home-chat__typing { color: #f3ebdf; text-shadow: 0 1px 4px #000, 0 2px 12px rgba(0, 0, 0, .8); }
.home-chat__resume { display: block; margin: 14px auto 0; padding: 10px 18px; border: 1px solid rgba(244, 199, 125, .3); border-radius: 999px; background: rgba(32, 31, 27, .45); color: var(--landing-gold); backdrop-filter: blur(12px); cursor: pointer; }
.home-chat.is-sidebar-hidden .home-chat__sidebar { display: none; }
.home-chat:not(.is-sidebar-hidden) #homeChatHistoryToggle,
.home-chat:not(.is-sidebar-hidden) .home-chat__heading { visibility: hidden; }
@keyframes home-chat-open { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes home-chat-pulse { 50% { opacity: .35; } }
@media (max-width: 760px) {
  .home-chat { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
  .home-chat__sidebar { width: min(250px, 78%); background: rgba(20, 20, 17, .6); }
  .home-chat__main { grid-column: 1; }
  .home-chat__header { padding: 10px 12px; gap: 9px; }
  .home-chat__messages { padding: 22px 15px; }
  .home-chat__composer { padding: 0 10px; }
  .home-chat__composer .landing-prompt { padding: 12px 10px 6px; }
  .home-chat__composer .landing-prompt__footer { flex-direction: row; align-items: center; gap: 6px; margin-top: 6px; }
  .home-chat__composer .landing-modes { display: flex; flex-wrap: wrap; gap: 4px; }
  .home-chat__composer .landing-modes button { padding: 5px 7px; font-size: 10px; gap: 4px; }
  .home-chat__composer .landing-modes button svg { display: none; }
  .home-chat__composer .landing-prompt__tools { padding: 0; border: 0; gap: 5px; }
  .home-chat__composer .landing-attach, .home-chat__composer .landing-send { width: 34px; height: 34px; }
  .home-chat__disclaimer { font-size: 9px; margin: 8px 12px; }
  .home-chat__message { gap: 8px; }
  .home-chat__text { font-size: 13px; }
  .home-chat__media img, .home-chat__media video { max-width: 140px; }
}
@media (prefers-reduced-motion: reduce) { .home-chat, .home-chat__typing::after { animation: none; } }
@media (max-height: 560px) {
  .home-chat__header { padding-block: 6px; }
  .home-chat__heading small, .home-chat__disclaimer { display: none; }
  .home-chat__composer { padding-bottom: 6px; }
  .home-chat__composer .landing-prompt textarea { min-height: 30px; max-height: 55px; padding-bottom: 0; }
  .home-chat__composer .landing-prompt__status { min-height: 0; }
  .home-chat__composer .landing-prompt__status:empty { display: none; }
  .home-chat__messages { padding-block: 12px; }
}
