:root {
  --home-sidebar: 272px;
  --home-red: #b50909;
  --home-red-dark: #920707;
  --home-soft: #f7f2f2;
  --home-line: #eadede;
  --home-ink: #211d1d;
}

body.uaash-chat-home-page { height: 100dvh; overflow: hidden; color: var(--home-ink); background: #fff; }
body.uaash-chat-home-page #container { height: 100dvh; min-height: 0; }
body.uaash-chat-home-page > #container > .uaash-header,
body.uaash-chat-home-page > #container > .uaash-footer { display: none; }
body.uaash-chat-home-page #uaash-main,
body.uaash-chat-home-page #uaash-page { height: 100%; min-height: 0; overflow: hidden; }

.uaash-chat-home { height: 100%; min-height: 0; display: grid; grid-template-columns: var(--home-sidebar) minmax(0, 1fr); background: #fff; }
.uaash-home-sidebar { position: relative; z-index: 20; min-width: 0; padding: 18px 12px; display: flex; flex-direction: column; background: #f7f4f4; border-right: 1px solid var(--home-line); }
.uaash-home-sidebar__brand { min-height: 48px; padding: 0 10px; display: flex; align-items: center; gap: 11px; color: var(--home-ink); font-size: 17px; }
.uaash-home-mark, .uaash-home-ai { display: grid; place-items: center; color: #fff; background: var(--home-red); border-radius: 50%; }
.uaash-home-mark { width: 34px; height: 34px; flex: 0 0 34px; font-size: 14px; }
.uaash-home-new { min-height: 46px; margin-top: 14px; padding: 0 13px; display: flex; align-items: center; gap: 12px; color: #fff !important; background: var(--home-red); border-radius: 8px; font-size: 14px; font-weight: 700; transition: background .18s ease; }
.uaash-home-new:hover { background: var(--home-red-dark); }
.uaash-home-functions { margin-top: 18px; display: grid; gap: 3px; }
.uaash-home-functions a { min-height: 46px; padding: 0 13px; display: flex; align-items: center; gap: 13px; color: #312b2b !important; border-radius: 8px; font-size: 14px; font-weight: 600; transition: color .16s ease, background .16s ease; }
.uaash-home-functions a:hover { color: var(--home-red) !important; background: #eee6e6; }
.uaash-home-functions i { width: 20px; color: #716565; text-align: center; }
.uaash-home-workspace { min-width: 0; min-height: 0; display: grid; grid-template-rows: 64px minmax(0, 1fr); }
.uaash-home-topbar { min-width: 0; padding: 0 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid transparent; }
.uaash-home-topbar > strong { color: var(--home-ink); font-size: 17px; letter-spacing: 0; }
.uaash-home-menu { visibility: hidden; justify-self: start; }
.uaash-home-language { justify-self: end; height: 36px; padding: 3px; display: grid; grid-template-columns: repeat(3, minmax(38px, 1fr)); border: 1px solid #dfd2d2; border-radius: 7px; background: #fff; }
.uaash-home-language a { min-width: 38px; padding: 0 8px; display: grid; place-items: center; color: #817474 !important; border-radius: 5px; font-size: 12px; font-weight: 800; }
.uaash-home-language a.is-active { color: #fff !important; background: var(--home-red); }
.uaash-home-stage { min-width: 0; min-height: 0; position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.uaash-home-welcome { width: min(760px, calc(100% - 40px)); margin: auto; padding-bottom: 30px; text-align: center; }
.uaash-home-ai { width: 48px; height: 48px; margin: 0 auto 22px; font-size: 19px; box-shadow: 0 8px 24px rgba(181,9,9,.16); }
.uaash-home-welcome h1 { margin: 0; color: var(--home-ink) !important; font-family: inherit !important; font-size: 30px; font-weight: 650; line-height: 1.3; letter-spacing: 0 !important; }
.uaash-home-suggestions { max-width: 640px; margin: 34px auto 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.uaash-home-suggestions button { min-height: 64px; padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #3b3434; background: #fff; border: 1px solid var(--home-line); border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; text-align: left; transition: border-color .16s ease, background .16s ease; }
.uaash-home-suggestions button:hover { color: var(--home-red); background: #fffafa; border-color: #d7bebe; }
.uaash-home-suggestions i { color: #9f8f8f; font-size: 11px; }
.uaash-home-composer-wrap { width: min(820px, calc(100% - 40px)); margin: 0 auto; padding-bottom: 18px; }
.uaash-home-composer-wrap > p { margin: 0 0 8px; color: #968a8a; font-size: 11px; text-align: center; }
.uaash-home-composer { min-height: 112px; padding: 14px 14px 10px; display: grid; grid-template-rows: minmax(38px, auto) 42px; background: var(--home-soft); border: 1px solid #e2d6d6; border-radius: 22px; box-shadow: 0 8px 28px rgba(62,27,27,.07); }
.uaash-home-composer:focus-within { border-color: rgba(181,9,9,.35); box-shadow: 0 8px 28px rgba(62,27,27,.07), 0 0 0 2px rgba(181,9,9,.06); }
.uaash-home-composer textarea { width: 100%; min-height: 38px; max-height: 150px; padding: 3px 6px; resize: none; overflow-y: auto; color: var(--home-ink); background: transparent; border: 0; outline: 0; font: inherit; font-size: 16px; line-height: 1.5; }
.uaash-home-composer textarea::placeholder { color: #998d8d; }
.uaash-home-composer__tools { display: grid; grid-template-columns: 42px 1fr 42px 42px; align-items: center; gap: 7px; }
.uaash-home-icon { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; color: #3d3636 !important; background: transparent; border: 0; border-radius: 50%; font-size: 16px; transition: color .16s ease, background .16s ease; }
.uaash-home-icon:hover { color: var(--home-red) !important; background: #ebe3e3; }
.uaash-home-mic { color: var(--home-red) !important; }
.uaash-home-submit { color: #fff !important; background: var(--home-red); }
.uaash-home-submit:hover { color: #fff !important; background: var(--home-red-dark); }
.uaash-home-submit:disabled { color: #9b9090 !important; background: #ddd5d5; }
.uaash-home-backdrop { display: none; }

@media (max-width: 900px) {
  .uaash-chat-home { grid-template-columns: 1fr; }
  .uaash-home-sidebar { position: fixed; inset: 0 auto 0 0; width: min(320px, 86vw); padding-top: calc(18px + env(safe-area-inset-top)); background: #fff; box-shadow: 18px 0 55px rgba(48,18,18,.2); transform: translateX(-105%); transition: transform .24s ease; }
  .uaash-home-sidebar.is-open { transform: translateX(0); }
  .uaash-home-backdrop { position: fixed; z-index: 15; inset: 0; width: 100%; height: 100%; display: block; background: rgba(36,22,22,.28); border: 0; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
  .uaash-home-backdrop[hidden] { display: none; }
  .uaash-home-workspace { grid-template-rows: calc(58px + env(safe-area-inset-top)) minmax(0, 1fr); }
  .uaash-home-topbar { padding: env(safe-area-inset-top) 12px 0; grid-template-columns: 118px minmax(0, 1fr) 118px; background: rgba(255,255,255,.96); }
  .uaash-home-menu { visibility: visible; }
  .uaash-home-topbar > strong { justify-self: center; white-space: nowrap; }
  .uaash-home-language { width: 118px; height: 34px; padding: 3px; grid-template-columns: repeat(3, 1fr); border-radius: 18px; }
  .uaash-home-language a { min-width: 0; padding: 0; border-radius: 14px; }
}

@media (max-width: 600px) {
  .uaash-home-topbar { grid-template-columns: 108px minmax(0, 1fr) 108px; padding-inline: 8px; }
  .uaash-home-language { width: 108px; }
  .uaash-home-welcome { width: calc(100% - 30px); padding-bottom: 16px; }
  .uaash-home-ai { width: 42px; height: 42px; margin-bottom: 18px; }
  .uaash-home-welcome h1 { font-size: 25px; }
  .uaash-home-suggestions { margin-top: 26px; grid-template-columns: 1fr; gap: 7px; }
  .uaash-home-suggestions button { min-height: 48px; }
  .uaash-home-composer-wrap { width: calc(100% - 20px); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .uaash-home-composer { min-height: 108px; border-radius: 24px; }
}

@media (max-height: 650px) {
  .uaash-home-ai { display: none; }
  .uaash-home-suggestions { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .uaash-home-sidebar { transition: none; }
}
