@font-face {
  font-family: "Radium FG";
  src: url("assets/fonts/radium-fg-bold.ttf") format("truetype");
  font-display: swap;
  font-weight: 700;
}

:root {
  color-scheme: dark;
  --ava-bg: #050505;
  --ava-panel: rgba(13, 13, 14, 0.72);
  --ava-panel-strong: rgba(8, 8, 9, 0.9);
  --ava-text: #f5f3ef;
  --ava-muted: rgba(245, 243, 239, 0.58);
  --ava-faint: rgba(245, 243, 239, 0.34);
  --ava-line: rgba(255, 255, 255, 0.11);
  --ava-line-strong: rgba(255, 255, 255, 0.2);
  --ava-amber: #d89145;
  --ava-amber-bright: #f1b66f;
  --ava-shadow: rgba(0, 0, 0, 0.62);
  --ava-header-height: 78px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--ava-bg);
}

body.ava-premium-home {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ava-text);
  background: var(--ava-bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

button,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ava-amber-bright);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--ava-text);
  background: #050505;
  transition: opacity 0.34s ease, visibility 0.34s ease;
}

.boot-loader[aria-hidden="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-loader[hidden] {
  display: none;
}

.boot-loader strong {
  font: 700 32px/1 "Radium FG", "Segoe UI", sans-serif;
}

.boot-loader small {
  color: var(--ava-faint);
  font-size: 11px;
}

.boot-mark {
  position: relative;
  width: 44px;
  height: 44px;
}

.boot-mark span {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(216, 145, 69, 0.72);
  transform: rotate(45deg);
  animation: ava-boot 1.8s ease-in-out infinite;
}

.boot-mark span + span {
  inset: 12px;
  border-color: rgba(255, 255, 255, 0.54);
  animation-delay: -0.9s;
}

.ava-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: var(--ava-header-height);
  padding:
    max(14px, env(safe-area-inset-top))
    max(28px, env(safe-area-inset-right))
    12px
    max(28px, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.88), rgba(5, 5, 5, 0.22));
  backdrop-filter: blur(14px);
}

.ava-brand {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ava-text);
  text-decoration: none;
}

.ava-brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(216, 145, 69, 0.62);
  color: var(--ava-text);
  background: rgba(9, 9, 10, 0.7);
  font: 700 16px/1 "Radium FG", sans-serif;
}

.ava-brand-copy {
  display: grid;
  gap: 2px;
}

.ava-brand-copy strong {
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
}

.ava-brand-copy small {
  color: var(--ava-faint);
  font-size: 9px;
  line-height: 1;
}

.ava-top-status {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(245, 243, 239, 0.46);
  font-size: 9px;
  font-weight: 700;
}

.ava-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ava-amber-bright);
  box-shadow: 0 0 14px rgba(241, 182, 111, 0.72);
  animation: ava-pulse 2.4s ease-in-out infinite;
}

.ava-menu-toggle {
  justify-self: end;
  display: grid;
  grid-template-columns: repeat(3, 4px);
  gap: 4px;
  width: 42px;
  height: 42px;
  padding: 0;
  place-content: center;
  border: 1px solid var(--ava-line);
  border-radius: 50%;
  color: var(--ava-text);
  background: rgba(11, 11, 12, 0.58);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.ava-menu-toggle span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.ava-menu-toggle:hover {
  border-color: rgba(216, 145, 69, 0.66);
  background: rgba(26, 20, 15, 0.76);
  transform: rotate(8deg);
}

.ava-home-main {
  min-height: 100dvh;
}

.ava-hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: #050505;
}

.ava-hero-art,
.ava-hero-canvas,
.ava-hero-shade,
.ava-film-grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ava-hero-art {
  z-index: -5;
  object-fit: cover;
  object-position: 68% center;
  filter: saturate(0.88) contrast(1.05);
  transform: scale(1.018) translate3d(var(--ava-parallax-x, 0), var(--ava-parallax-y, 0), 0);
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ava-hero-canvas {
  z-index: -3;
  pointer-events: none;
}

.ava-hero-shade {
  z-index: -4;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.98) 0%, rgba(5, 5, 5, 0.9) 29%, rgba(5, 5, 5, 0.48) 50%, rgba(5, 5, 5, 0.08) 73%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.38) 0%, transparent 36%, rgba(5, 5, 5, 0.46) 100%);
}

.ava-film-grain {
  z-index: -2;
  opacity: 0.16;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.ava-interface {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 24px;
  width: min(720px, calc(100% - 56px));
  min-height: calc(100dvh - var(--ava-header-height));
  margin-left: max(28px, calc((100vw - 1440px) / 2 + 54px));
  padding: calc(var(--ava-header-height) + 26px) 0 76px;
}

.ava-identity {
  display: grid;
  gap: 9px;
}

.ava-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(245, 243, 239, 0.54);
  font-size: 10px;
  font-weight: 700;
}

.ava-identity h1 {
  margin: 0;
  color: #ffffff;
  font: 700 82px/0.9 "Radium FG", "Segoe UI", sans-serif;
  text-shadow: 0 18px 54px rgba(0, 0, 0, 0.5);
}

.ava-identity h1 span {
  color: rgba(245, 243, 239, 0.44);
}

.ava-identity p {
  margin: 0;
  color: rgba(245, 243, 239, 0.72);
  font-size: 17px;
  line-height: 1.35;
}

.berzah-ai-chat {
  display: grid;
  grid-template-rows: auto auto minmax(92px, 1fr) auto auto;
  width: min(690px, 100%);
  min-height: 410px;
  max-height: min(540px, calc(100dvh - 300px));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(17, 17, 18, 0.86), rgba(8, 8, 9, 0.72)),
    rgba(8, 8, 9, 0.78);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.52),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  backdrop-filter: blur(24px) saturate(1.1);
}

.ai-chat-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 2px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-head-avatar {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(216, 145, 69, 0.46);
  border-radius: 50%;
  object-fit: cover;
  background: #090909;
}

.ai-chat-head > div {
  display: grid;
  gap: 2px;
}

.ai-chat-head strong {
  color: var(--ava-text);
  font-size: 12px;
  line-height: 1.1;
}

.ai-chat-head #ai-status {
  color: var(--ava-amber-bright);
  font-size: 9px;
  line-height: 1;
}

.ai-version {
  color: rgba(245, 243, 239, 0.28);
  font-size: 8px;
  font-weight: 700;
}

.ai-character-mood {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 4px 4px;
  overflow: hidden;
  white-space: nowrap;
}

.ai-character-mood span {
  flex: 0 0 auto;
  color: var(--ava-amber-bright);
  font-size: 9px;
  font-weight: 700;
}

.ai-character-mood strong {
  min-width: 0;
  overflow: hidden;
  color: rgba(245, 243, 239, 0.48);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
}

.ai-thread {
  display: grid;
  align-content: end;
  gap: 10px;
  min-height: 92px;
  padding: 10px 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(216, 145, 69, 0.36) transparent;
}

.ai-thread:empty::before {
  content: "Bir soru yaz veya aşağıdaki başlangıçlardan birini seç.";
  align-self: end;
  max-width: 390px;
  color: rgba(245, 243, 239, 0.3);
  font-size: 12px;
  line-height: 1.5;
}

.ai-message {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  width: min(88%, 570px);
}

.ai-message.is-user {
  justify-self: end;
  grid-template-columns: minmax(0, 1fr) auto;
}

.ai-message-avatar {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 50%;
  object-fit: cover;
}

.is-user-avatar {
  display: grid;
  place-items: center;
  color: #0a0a0a;
  background: var(--ava-text);
  font-size: 10px;
  font-weight: 800;
}

.ai-message.is-user .ai-message-avatar {
  grid-column: 2;
}

.ai-message.is-user .ai-message-body {
  grid-column: 1;
  grid-row: 1;
}

.ai-message-body {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px 8px 8px 2px;
  background: rgba(255, 255, 255, 0.055);
}

.ai-message.is-user .ai-message-body {
  border-color: rgba(216, 145, 69, 0.24);
  border-radius: 8px 8px 2px 8px;
  background: rgba(216, 145, 69, 0.12);
}

.ai-message-body > span {
  display: block;
  margin-bottom: 4px;
  color: rgba(245, 243, 239, 0.34);
  font-size: 8px;
  font-weight: 700;
}

.ai-message-body p {
  margin: 0;
  color: rgba(245, 243, 239, 0.88);
  font-size: 13px;
  line-height: 1.48;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.ai-message.is-loading .ai-message-body p {
  animation: ava-thinking 1.5s ease-in-out infinite;
}

.ai-chip-row {
  display: flex;
  gap: 6px;
  padding: 4px 4px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ai-chip-row::-webkit-scrollbar {
  display: none;
}

.ai-chip-row button {
  flex: 0 0 auto;
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  color: rgba(245, 243, 239, 0.6);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font-size: 10px;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.ai-chip-row button:hover {
  color: var(--ava-text);
  border-color: rgba(216, 145, 69, 0.38);
  background: rgba(216, 145, 69, 0.08);
}

.ai-form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-height: 88px;
  padding: 10px 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(3, 3, 4, 0.76);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.ai-form:focus-within {
  border-color: rgba(216, 145, 69, 0.46);
  background: rgba(4, 4, 5, 0.9);
}

.ai-form textarea {
  width: 100%;
  height: 32px;
  min-height: 32px;
  max-height: 132px;
  padding: 4px 2px;
  overflow-y: auto;
  border: 0;
  color: var(--ava-text);
  background: transparent;
  outline: none;
  resize: none;
  font-size: 14px;
  line-height: 1.5;
}

.ai-form textarea::placeholder {
  color: rgba(245, 243, 239, 0.3);
}

.ai-form-actions {
  display: flex;
  align-items: center;
  min-height: 34px;
}

.ai-deep-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 9px 0 4px;
  border: 0;
  color: rgba(245, 243, 239, 0.44);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.ai-toggle-track {
  position: relative;
  display: block;
  width: 30px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ai-toggle-track i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(245, 243, 239, 0.52);
  transition: transform 0.2s ease, background 0.2s ease;
}

.ai-deep-toggle.is-active {
  color: var(--ava-amber-bright);
}

.ai-deep-toggle.is-active .ai-toggle-track {
  border-color: rgba(216, 145, 69, 0.66);
  background: rgba(216, 145, 69, 0.18);
}

.ai-deep-toggle.is-active .ai-toggle-track i {
  background: var(--ava-amber-bright);
  transform: translateX(12px);
}

.ai-icon-button,
#ai-send {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.ai-icon-button {
  margin-left: auto;
  color: rgba(245, 243, 239, 0.42);
  background: transparent;
  font-size: 17px;
}

.ai-icon-button:hover {
  color: var(--ava-text);
}

#ai-send {
  margin-left: 5px;
  color: #17100a;
  background: var(--ava-text);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  font-size: 18px;
  font-weight: 800;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

#ai-send:hover {
  color: #090704;
  background: var(--ava-amber-bright);
  transform: translateY(-1px);
}

#ai-send:disabled,
.ai-form button:disabled,
.ai-form textarea:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.ava-bottom-line {
  position: absolute;
  left: max(28px, calc((100vw - 1440px) / 2 + 54px));
  right: max(28px, calc((100vw - 1440px) / 2 + 54px));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(245, 243, 239, 0.3);
  font-size: 8px;
  font-weight: 700;
}

.ava-bottom-line nav {
  display: flex;
  gap: 18px;
}

.ava-bottom-line a {
  color: rgba(245, 243, 239, 0.42);
  text-decoration: none;
  transition: color 0.18s ease;
}

.ava-bottom-line a:hover {
  color: var(--ava-amber-bright);
}

.ava-menu {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100dvh;
  overflow: hidden;
  color: var(--ava-text);
  background: #070707;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-12px);
  transition:
    opacity 0.38s ease,
    visibility 0.38s ease,
    transform 0.46s cubic-bezier(0.18, 0.8, 0.18, 1);
}

.ava-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.ava-menu canvas,
.ava-menu-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ava-menu canvas {
  z-index: -2;
}

.ava-menu-shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 7, 7, 0.98), rgba(7, 7, 7, 0.78) 46%, rgba(7, 7, 7, 0.34)),
    radial-gradient(circle at 78% 42%, rgba(216, 145, 69, 0.12), transparent 32%);
}

.ava-menu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 78px;
  padding:
    max(16px, env(safe-area-inset-top))
    max(28px, env(safe-area-inset-right))
    12px
    max(28px, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(245, 243, 239, 0.58);
  font-size: 10px;
  font-weight: 700;
}

.ava-menu-head button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--ava-line);
  border-radius: 50%;
  color: var(--ava-text);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font-size: 25px;
  font-weight: 300;
}

.ava-menu-layout {
  align-self: center;
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(480px, 1.28fr);
  gap: 56px 90px;
  width: min(1240px, calc(100% - 56px));
  max-height: calc(100dvh - 170px);
  margin: 0 auto;
}

.ava-menu-intro {
  align-self: center;
  display: grid;
  gap: 12px;
}

.ava-menu-intro small {
  color: var(--ava-amber-bright);
  font-size: 9px;
  font-weight: 700;
}

.ava-menu-intro strong {
  color: #ffffff;
  font: 700 66px/0.95 "Radium FG", sans-serif;
}

.ava-menu-intro p {
  max-width: 330px;
  margin: 0;
  color: rgba(245, 243, 239, 0.48);
  font-size: 14px;
  line-height: 1.55;
}

.ava-menu-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
  gap: 0 28px;
}

.ava-menu-links a {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  min-height: 74px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--ava-text);
  text-decoration: none;
}

.ava-menu-links a > span {
  color: rgba(245, 243, 239, 0.26);
  font-size: 8px;
  font-weight: 700;
}

.ava-menu-links a > strong {
  color: rgba(245, 243, 239, 0.82);
  font-size: 20px;
  font-weight: 560;
  transition: color 0.2s ease, transform 0.25s ease;
}

.ava-menu-links a > small {
  color: rgba(245, 243, 239, 0.26);
  font-size: 9px;
}

.ava-menu-links a:hover > strong {
  color: var(--ava-amber-bright);
  transform: translateX(5px);
}

.ava-menu-feature {
  grid-column: 2;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 24px;
  padding: 20px 22px;
  overflow: hidden;
  border: 1px solid rgba(216, 145, 69, 0.34);
  border-radius: 8px;
  color: var(--ava-text);
  text-decoration: none;
  background: rgba(216, 145, 69, 0.08);
}

.ava-menu-feature > span,
.ava-menu-feature > small {
  color: rgba(245, 243, 239, 0.44);
  font-size: 9px;
}

.ava-menu-feature > strong {
  color: #ffffff;
  font-size: 23px;
}

.ava-menu-feature > b {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  color: var(--ava-amber-bright);
  font-size: 25px;
}

.ava-menu-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 62px;
  padding:
    12px
    max(28px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(28px, env(safe-area-inset-left));
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(245, 243, 239, 0.25);
  font-size: 8px;
}

.ava-menu-footer nav {
  display: flex;
  gap: 16px;
}

.ava-menu-footer a {
  color: rgba(245, 243, 239, 0.38);
  text-decoration: none;
}

body.is-menu-open {
  overflow: hidden;
}

body.is-ai-thinking .ava-live-dot {
  animation-duration: 0.7s;
}

body.is-red-zone .ava-hero-art {
  filter: saturate(0.35) contrast(1.2);
}

@keyframes ava-boot {
  0%,
  100% {
    opacity: 0.34;
    transform: rotate(45deg) scale(0.84);
  }
  50% {
    opacity: 1;
    transform: rotate(135deg) scale(1);
  }
}

@keyframes ava-pulse {
  0%,
  100% {
    opacity: 0.56;
    transform: scale(0.84);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes ava-thinking {
  0%,
  100% {
    opacity: 0.44;
  }
  50% {
    opacity: 1;
  }
}

@media (max-height: 820px) and (min-width: 761px) {
  .ava-interface {
    gap: 17px;
    padding-top: calc(var(--ava-header-height) + 18px);
  }

  .ava-identity h1 {
    font-size: 66px;
  }

  .ava-identity p {
    font-size: 14px;
  }

  .berzah-ai-chat {
    min-height: 370px;
    max-height: 470px;
  }
}

@media (max-width: 980px) {
  .ava-hero-art {
    object-position: 63% center;
    opacity: 0.86;
  }

  .ava-hero-shade {
    background:
      linear-gradient(90deg, rgba(5, 5, 5, 0.98) 0%, rgba(5, 5, 5, 0.88) 42%, rgba(5, 5, 5, 0.44) 72%),
      linear-gradient(180deg, rgba(5, 5, 5, 0.3), transparent 36%, rgba(5, 5, 5, 0.58));
  }

  .ava-interface {
    width: min(680px, calc(100% - 42px));
    margin-left: 28px;
  }

  .ava-bottom-line {
    left: 28px;
    right: 28px;
  }

  .ava-menu-layout {
    grid-template-columns: minmax(190px, 0.56fr) minmax(420px, 1.44fr);
    gap: 38px;
  }

  .ava-menu-intro strong {
    font-size: 52px;
  }
}

@media (max-width: 760px) {
  :root {
    --ava-header-height: 66px;
  }

  body.ava-premium-home {
    overflow-y: auto;
  }

  .ava-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: var(--ava-header-height);
    padding:
      max(10px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      8px
      max(14px, env(safe-area-inset-left));
  }

  .ava-top-status {
    display: none;
  }

  .ava-menu-toggle {
    grid-column: 2;
  }

  .ava-brand-mark {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .ava-hero {
    align-items: start;
    min-height: 100svh;
    overflow: visible;
  }

  .ava-hero-art {
    position: fixed;
    height: 100svh;
    object-position: 64% top;
    opacity: 0.72;
  }

  .ava-hero-canvas,
  .ava-hero-shade,
  .ava-film-grain {
    position: fixed;
    height: 100svh;
  }

  .ava-hero-shade {
    background:
      linear-gradient(180deg, rgba(5, 5, 5, 0.2) 0%, rgba(5, 5, 5, 0.3) 28%, rgba(5, 5, 5, 0.86) 56%, #050505 100%),
      linear-gradient(90deg, rgba(5, 5, 5, 0.72), rgba(5, 5, 5, 0.12) 72%);
  }

  .ava-interface {
    gap: 16px;
    width: calc(100% - 24px);
    min-height: 100svh;
    margin: 0 auto;
    padding: calc(var(--ava-header-height) + 30px) 0 72px;
  }

  .ava-identity {
    min-height: 112px;
    align-content: end;
  }

  .ava-kicker {
    font-size: 8px;
  }

  .ava-identity h1 {
    font-size: 54px;
  }

  .ava-identity p {
    font-size: 14px;
  }

  .berzah-ai-chat {
    grid-template-rows: auto auto minmax(120px, 1fr) auto auto;
    min-height: 500px;
    max-height: none;
    padding: 10px;
    background: rgba(10, 10, 11, 0.82);
    backdrop-filter: blur(22px) saturate(1.04);
  }

  .ai-chat-head {
    min-height: 42px;
    padding-bottom: 9px;
  }

  .ai-head-avatar {
    width: 33px;
    height: 33px;
  }

  .ai-version {
    display: none;
  }

  .ai-character-mood {
    padding-top: 10px;
  }

  .ai-thread {
    min-height: 140px;
    max-height: 280px;
  }

  .ai-message {
    width: 94%;
  }

  .ai-message-body p {
    font-size: 12px;
  }

  .ai-chip-row {
    margin-right: -10px;
    padding-right: 10px;
  }

  .ai-form {
    min-height: 84px;
  }

  .ai-deep-toggle {
    padding-right: 4px;
  }

  .ava-bottom-line {
    left: 16px;
    right: 16px;
    bottom: max(14px, env(safe-area-inset-bottom));
  }

  .ava-bottom-line nav {
    gap: 12px;
  }

  .ava-menu {
    overflow-y: auto;
  }

  .ava-menu-head {
    position: sticky;
    top: 0;
    z-index: 4;
    min-height: 66px;
    padding:
      max(10px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      8px
      max(14px, env(safe-area-inset-left));
    background: rgba(7, 7, 7, 0.72);
    backdrop-filter: blur(18px);
  }

  .ava-menu-layout {
    align-self: start;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    width: calc(100% - 28px);
    max-height: none;
    padding: 34px 0;
  }

  .ava-menu-intro {
    gap: 8px;
  }

  .ava-menu-intro strong {
    font-size: 44px;
  }

  .ava-menu-intro p {
    max-width: 280px;
    font-size: 12px;
  }

  .ava-menu-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .ava-menu-links a {
    min-height: 62px;
    padding: 16px 0;
  }

  .ava-menu-links a > strong {
    font-size: 18px;
  }

  .ava-menu-feature {
    grid-column: 1;
    padding: 17px;
  }

  .ava-menu-feature > strong {
    font-size: 19px;
  }

  .ava-menu-footer {
    align-items: flex-start;
    flex-direction: column;
    padding:
      14px
      max(14px, env(safe-area-inset-right))
      max(18px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
  }
}

@media (max-width: 390px) {
  .ava-brand-copy small {
    display: none;
  }

  .ava-identity {
    min-height: 96px;
  }

  .ava-identity h1 {
    font-size: 48px;
  }

  .berzah-ai-chat {
    min-height: 486px;
  }

  .ai-deep-toggle > span:last-child {
    font-size: 9px;
  }

  .ava-bottom-line > span {
    display: none;
  }

  .ava-bottom-line nav {
    width: 100%;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
