/* Verall — models, chat picker, settings, motion */

.container { width: 100%; max-width: 1200px; }
html { scroll-padding-top: 5.5rem; }
.section, #models, #images, #auto, #deepfakes, #faq {
  scroll-margin-top: 5.5rem;
}
#deepfakes, #auto, .flow, .df-grid {
  max-width: 100%;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 3000;
  background: #fff;
  color: #000;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.skip-link:focus { top: 1rem; }

.nav-cta { white-space: nowrap; flex-shrink: 0; }

/* Mobile nav */
.nav-burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  color: #fff;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.nav-burger svg { width: 18px; height: 18px; }
@media (max-width: 700px) {
  .nav-burger { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 1rem;
    left: 1rem;
    background: #0c0c0c;
    border: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem;
    z-index: 1200;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links a:last-child { border-bottom: none; }
}
@media (max-width: 600px) {
  .nav-cta {
    padding: 0.5rem 0.75rem;
    font-size: 0.68rem;
  }
}

/* Hero model strip — editorial names, no chip boxes */
.hero-models {
  display: block;
  margin: -0.35rem 0 2.1rem;
  max-width: 42rem;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  font-size: 0.92rem;
  line-height: 1.75;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #5c5c5c;
}
.hero-models a,
.hero-models a:visited {
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0;
  font-size: inherit;
  letter-spacing: inherit;
  color: #8d8d8d;
  white-space: nowrap;
  display: inline;
  border-radius: 0;
}
.hero-models a:hover {
  color: #fff;
  opacity: 1;
  transform: none;
}
.hero-models i {
  font-style: normal;
  font-weight: 300;
  color: #3a3a3a;
  margin: 0 0.55rem;
  display: inline;
}

/* Model logo badge */
.model-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  background: #161616;
  border: 1px solid rgba(255,255,255,0.08);
}
.model-logo img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}
.model-logo.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Models grid */
.model-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}
.model-filter {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border);
  background: transparent;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.model-filter:hover,
.model-filter.active {
  color: #fff;
  border-color: rgba(255,255,255,0.28);
}
.model-filter.active { background: rgba(255,255,255,0.06); }

.model-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}
.model-family { margin-top: 2.25rem; }
.model-family .model-grid { margin-top: 0.75rem; }
.model-family-label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0;
}
.banana-hero {
  margin-top: 1.5rem;
  max-width: 36rem;
}
@media (max-width: 980px) {
  .model-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .model-grid { grid-template-columns: 1fr; }
}

.model-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.25rem 1.2rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
  cursor: pointer;
}
.model-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}
.model-card.featured {
  border-color: rgba(255,255,255,0.18);
  background: linear-gradient(180deg, #161616 0%, #111 100%);
}
.model-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}
.model-card h3 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0;
}
.model-card .family {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 300;
  margin-top: 0.15rem;
}
.model-badge {
  margin-left: auto;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  white-space: nowrap;
}
.model-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.5;
  margin: 0;
}
.model-legend {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.55;
  max-width: 58ch;
}
.model-try {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.55;
  margin-top: 0.15rem;
}
a.model-try:hover { opacity: 1; }
.model-card:hover .model-try { opacity: 1; }
.img-row {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #5c5c5c;
}
.img-row a {
  color: #9a9a9a;
  border: none !important;
  background: none !important;
  padding: 0;
  display: inline;
}
.img-row a + a::before {
  content: "·";
  margin: 0 0.65rem;
  color: #3a3a3a;
  font-weight: 300;
}
.img-row a:hover { color: #fff; opacity: 1; }

.chat-empty-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.55rem;
}
.chat-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  width: min(100%, 22rem);
  margin-top: 0;
}
.chat-mode {
  min-height: 44px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.chat-mode.active {
  background: #fff;
  color: #000;
  border-color: #fff;
}
.set-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.set-presets button {
  min-height: 42px;
  border: 1px solid var(--border);
  background: transparent;
  color: #ccc;
  font-size: 0.78rem;
}
.set-presets button:hover {
  border-color: #fff;
  color: #fff;
}
.history-row {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.history-row .history-item {
  flex: 1;
  min-width: 0;
  background: transparent;
  text-align: left;
}
.history-del {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: #666;
  background: transparent;
  border: none;
  font-size: 1.1rem;
}
.history-del:hover { color: #fff; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 90;
}
.sidebar-backdrop.open { display: block; }
.model-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.55rem;
  font-size: 0.84rem;
  letter-spacing: 0;
  color: #eee;
  text-transform: none;
}
.model-meta > span {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  align-items: flex-start;
}
.model-meta em {
  font-style: normal;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
}
.speed-dots { letter-spacing: 0.12em; color: #fff; }
.speed-dots .off { color: #333; }

.models-table .model-cell {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
  font-weight: 400;
}
.models-table .model-cell .model-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.models-table .model-cell .model-logo img { width: 16px; height: 16px; }
.models-table .model-cell .model-logo.photo img { width: 100%; height: 100%; }

#deepfakes .df-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
  width: 100%;
  max-width: 560px;
}
@media (min-width: 900px) {
  #deepfakes .df-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    max-width: 100%;
  }
}
#deepfakes .df-card {
  min-width: 0;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.85rem;
}
#deepfakes .df-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
  gap: 0.35rem;
  align-items: center;
  width: 100%;
}
#deepfakes .df-pair figure { min-width: 0; width: 100%; margin: 0; }
#deepfakes .df-frame {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--border);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 38%, #2a2a2a 0%, #141414 42%, #0a0a0a 100%);
  display: grid;
  place-items: center;
}
#deepfakes .df-frame span {
  width: 38%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #1c1c1c;
  border: 1px solid rgba(255,255,255,0.08);
  display: block;
}
#deepfakes .df-frame.src { filter: grayscale(1) contrast(0.9); }
#deepfakes .df-frame.res { filter: contrast(1.05) saturate(0.7); }
#deepfakes .df-frame.alt { background:
    radial-gradient(ellipse at 45% 42%, #3a3232 0%, #161010 50%, #0a0a0a 100%); }
#deepfakes .df-pair img,
#deepfakes .df-pair video {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.df-frame span {
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #1c1c1c;
  border: 1px solid rgba(255,255,255,0.08);
  display: block;
}
.df-frame.src { filter: grayscale(1) contrast(0.9); }
.df-frame.res { filter: contrast(1.05) saturate(0.7); }
.df-frame.alt { background:
    radial-gradient(ellipse at 45% 42%, #3a3232 0%, #161010 50%, #0a0a0a 100%); }
.df-pair img,
.df-pair video {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* ========== CHAT: model picker ========== */
.picker {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 420px;
}
.picker-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.7rem;
  background: #0c0c0c;
  border: 1px solid rgba(255,255,255,0.12);
  color: #f0f0f0;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s;
  min-height: 48px;
}
.picker-btn:hover,
.picker-open .picker-btn {
  border-color: rgba(255,255,255,0.3);
}
.picker-btn .meta {
  min-width: 0;
  flex: 1;
}
.picker-btn .name {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.picker-btn .sub {
  display: block;
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.picker-caret {
  margin-left: auto;
  width: 14px;
  height: 14px;
  color: #888;
  transition: transform 0.25s var(--ease);
}
.picker-open .picker-caret { transform: rotate(180deg); color: #fff; }

.picker-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  background: #0c0c0c;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  z-index: 60;
  max-height: min(420px, 58vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom center;
  animation: menuIn 0.22s var(--ease);
}
.picker-menu[hidden] { display: none !important; }
@keyframes menuIn {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.picker-search {
  padding: 0.65rem 0.7rem 0.5rem;
  border-bottom: 1px solid var(--border);
}
.picker-search input {
  width: 100%;
  background: #111;
  border: 1px solid var(--border);
  color: #fff;
  padding: 0.55rem 0.7rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
}
.picker-search input:focus {
  outline: none;
  border-color: var(--border-hover);
}
.picker-list {
  overflow-y: auto;
  padding: 0.35rem 0 0.5rem;
}
.picker-group {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.65rem 0.9rem 0.3rem;
}
.picker-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.9rem;
  background: transparent;
  border: none;
  color: #ddd;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}
.picker-item:hover,
.picker-item.active {
  background: rgba(255,255,255,0.05);
  color: #fff;
}
.picker-item .meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}
.picker-item .name {
  display: block;
  font-size: 0.86rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.picker-item .sub {
  display: block;
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 300;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.picker-item .ctx {
  flex-shrink: 0;
  margin-left: 0.5rem;
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.picker-empty {
  padding: 1rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 300;
}

/* Settings drawer */
.settings-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 100vw);
  background: #0a0a0a;
  border-left: 1px solid var(--border);
  z-index: 101;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.38s var(--ease);
}
.settings-drawer.open { transform: translateX(0); }
.settings-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.settings-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.settings-head h2 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}
.settings-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  color: #aaa;
  font-size: 1.2rem;
  line-height: 1;
}
.settings-close:hover { color: #fff; border-color: #fff; }
.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.1rem 1.2rem 2rem;
}
.set-block { margin-bottom: 1.35rem; }
.set-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.55rem;
}
.set-label b {
  color: #fff;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
}
.set-hint {
  font-size: 0.72rem;
  color: #666;
  font-weight: 300;
  margin-top: 0.4rem;
  line-height: 1.4;
}
.set-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  outline: none;
}
.set-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: none;
}
.set-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: none;
}
.set-textarea {
  width: 100%;
  min-height: 88px;
  background: #111;
  border: 1px solid var(--border);
  color: #eee;
  padding: 0.7rem 0.8rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  resize: vertical;
  line-height: 1.5;
}
.set-textarea:focus { outline: none; border-color: var(--border-hover); }
.set-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}
.set-toggle:last-child { border-bottom: none; }
.set-toggle span {
  font-size: 0.88rem;
  color: #ddd;
  font-weight: 300;
}
.switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch i {
  position: absolute;
  inset: 0;
  background: #222;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 99px;
  transition: 0.2s;
}
.switch i::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  background: #888;
  border-radius: 50%;
  transition: 0.2s var(--ease);
}
.switch input:checked + i { background: #fff; border-color: #fff; }
.switch input:checked + i::after { transform: translateX(18px); background: #000; }

.message { animation: msgIn 0.38s var(--ease); }
@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.message.user { max-width: 78%; }
.typing {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  height: 1.2em;
  padding: 0.15rem 0;
}
.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #888;
  animation: typing 1.1s infinite ease-in-out;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.chat-send {
  transition: transform 0.25s var(--ease), opacity 0.25s, background 0.25s;
}
.chat-send:active { transform: scale(0.94); }
.chat-send.sending { pointer-events: none; opacity: 0.55; }

.chat-header .logo-img { height: 40px; }
.chat-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.7rem 1.4rem;
  position: relative;
}
.chat-header-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  justify-self: start;
  min-width: 0;
  grid-column: 1;
}
.chat-header-right {
  display: flex;
  align-items: center;
  justify-self: end;
  grid-column: 3;
}
.header-model {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: #f0f0f0;
  justify-self: center;
  grid-column: 2;
  white-space: nowrap;
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-model .model-logo { width: 22px; height: 22px; border-radius: 5px; }
.header-model .model-logo img { width: 14px; height: 14px; }

.chat-online {
  position: fixed;
  right: 1.25rem;
  bottom: 1.15rem;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  pointer-events: none;
}
.chat-online .dot {
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* n8n-like automation canvas — flex so it never overflows */
.flow {
  margin-top: 2.25rem;
  border: 1px solid var(--border);
  background: #090909;
  overflow: hidden;
  max-width: 100%;
}
.flow-bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #0c0c0c;
  flex-wrap: wrap;
}
.flow-file {
  font-size: 0.78rem;
  color: #ccc;
  letter-spacing: 0.02em;
}
.flow-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #666;
}
.flow-idle {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.flow-actions { margin-left: auto; display: flex; gap: 0.4rem; }
.flow-btn {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border);
  color: #ccc;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.flow-btn:hover { color: #fff; opacity: 1; border-color: #fff; }
.flow-btn.exec { background: #fff; color: #000; border-color: #fff; }
.flow-btn.exec:hover { opacity: 0.85; }
.flow-canvas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.35rem;
  padding: 1.35rem 1rem 1.45rem;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 18px 18px;
  overflow: hidden;
  min-width: 0;
}
.flow-node {
  position: relative;
  flex: 1 1 132px;
  min-width: 0;
  max-width: 180px;
  padding: 0.65rem 0.7rem 0.6rem 0.85rem;
  background: #111;
  border: 1px solid rgba(255,255,255,0.12);
  color: #eee;
  display: block;
}
.flow-node::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}
.flow-node.n1::before { background: #e03a3a; }
.flow-node.n2::before { background: #888; }
.flow-node.n3::before { background: #d97757; }
.flow-node.n4::before { background: #8E83FB; }
.flow-node.n5::before { background: #2AABEE; }
.flow-node.n6::before { background: #fff; }
.flow-node:hover { border-color: #fff; opacity: 1; }
.flow-node b {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 0.15rem;
}
.flow-node em {
  display: block;
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
}
.flow-node small {
  display: block;
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 300;
  margin-top: 0.15rem;
}
.flow-node .nt {
  display: none;
}
.flow-join {
  width: 18px;
  height: 1px;
  background: rgba(255,255,255,0.22);
  flex: 0 0 18px;
}
.flow-join.split { display: none; }
.flow-split {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1 1 132px;
  min-width: 0;
  max-width: 180px;
}
.flow-split .flow-node { max-width: none; flex: 1 1 auto; }
.flow-note {
  padding: 0.7rem 1rem 0.85rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 300;
  border-top: 1px solid var(--border);
}

@media (max-width: 860px) {
  .flow-canvas { height: auto; padding: 1rem 0.85rem 1.1rem; }
  .flow-join { display: none; }
  .flow-node,
  .flow-split {
    flex: 1 1 100%;
    max-width: none;
    width: 100%;
  }
  .flow-actions { margin-left: 0; width: 100%; }
  .flow-btn { flex: 1; justify-content: center; }
  .chat-online { display: none; }
  .chat-header {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    padding: 0.45rem 0.7rem !important;
  }
  .header-model { font-size: 0.78rem; max-width: 46vw; overflow: hidden; }
  .header-model .model-logo { width: 18px; height: 18px; }
}

.settings-btn.active {
  color: #fff;
  border-color: rgba(255,255,255,0.35);
  background: #141414;
}

.input-shell { transition: border-color 0.3s, box-shadow 0.3s; }
.input-shell:focus-within {
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
}

@media (prefers-reduced-motion: reduce) {
  .picker-menu, .message, .model-card, .settings-drawer { animation: none !important; transition: none !important; }
}

.nav-cta-mobile { display: none; }

/* ========== PHONE ========== */
@media (max-width: 700px) {
  html { -webkit-text-size-adjust: 100%; }

  .nav {
    padding: 0.65rem 0.9rem !important;
    padding-top: max(0.65rem, env(safe-area-inset-top)) !important;
  }
  .nav.scrolled { padding: 0.5rem 0.9rem !important; }
  .logo-img { height: 32px !important; }
  .nav-right { gap: 0.4rem !important; }
  .nav-cta { display: none !important; }
  .nav-cta-mobile {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-top: 0.35rem;
    padding: 0.9rem 1rem !important;
    background: #fff;
    color: #000 !important;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: none !important;
  }
  .nav-burger {
    width: 44px;
    height: 44px;
  }
  .lang-switch button {
    min-width: 40px;
    min-height: 44px;
    padding: 0 0.35rem;
  }

  .hero {
    min-height: auto;
    padding: 5.75rem 1.15rem 2.75rem !important;
    padding-left: 1.15rem !important;
  }
  .hero h1 {
    font-size: clamp(1.7rem, 8vw, 2.05rem) !important;
    max-width: none !important;
    line-height: 1.15;
    margin-bottom: 1.1rem;
  }
  .hero-sub {
    font-size: 0.98rem !important;
    max-width: none;
    margin-bottom: 1.35rem;
  }
  .hero-models {
    margin: 0 0 1.35rem !important;
    font-size: 0.82rem;
  }
  .hero-models a { font-size: inherit; }
  .hero-orbs span { filter: blur(48px); opacity: 0.6; }
  .rain-canvas {
    width: 42% !important;
    opacity: 0.22 !important;
  }

  .section { padding: 3.5rem 1.15rem !important; }
  .section-title { font-size: 1.85rem !important; max-width: none; }
  .section-desc { font-size: 0.98rem !important; max-width: none; }
  .feature-card { padding: 1.5rem 1.2rem; }
  .statement { padding: 3.5rem 1.15rem !important; }
  .statement p { font-size: 1.45rem !important; }

  .model-toolbar { gap: 0.4rem; }
  .model-filter { padding: 0.5rem 0.7rem; min-height: 40px; }
  .model-card { padding: 1.1rem 1rem; }
  .models-table-wrap { display: none; }

  .df-pair { display: grid; grid-template-columns: minmax(0,1fr) 16px minmax(0,1fr); }
  .df-arrow { transform: none; padding: 0; }

  .pricing-hero { padding: 6.5rem 1.15rem 2rem !important; }
  .pricing-hero h1 { font-size: 2rem !important; }
  .pricing-grid {
    padding: 0 1.15rem 3rem !important;
    max-width: none !important;
    gap: 1.75rem;
  }
  .price-card { padding: 2.1rem 1.35rem 1.75rem; }
  .price-card.featured { margin-top: 0.5rem; }

  .privacy-strip { padding: 2.5rem 1.15rem !important; }
  .footer { padding: 2.5rem 1.15rem 2rem !important; }

  .acc-wrap,
  .api-wrap { padding: 6.5rem 1.15rem 3rem !important; }
  .acc-wrap h1,
  .api-wrap h1 { font-size: 2rem !important; }
  .key-row { font-size: 0.78rem; }
  pre.code { font-size: 0.75rem; padding: 1rem; }

  .faq-item summary { min-height: 48px; padding: 1.1rem 0; }

  /* Chat */
  .chat-page {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }
  .chat-header {
    padding: 0.45rem 0.7rem !important;
    padding-top: max(0.45rem, env(safe-area-inset-top)) !important;
    gap: 0.45rem;
    min-height: 48px;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
  .header-model { grid-column: 2; justify-self: center; }
  .chat-header-right { grid-column: 3; }
  .chat-header .logo-img { height: 28px !important; }
  .chat-status-text { display: none; }
  .sidebar-toggle {
    width: 44px;
    height: 44px;
    padding: 0;
    align-items: center;
    justify-content: center;
  }
  .chat-layout {
    flex: 1;
    min-height: 0;
    height: auto !important;
  }
  .chat-sidebar {
    top: 0 !important;
    width: min(320px, 88vw) !important;
    padding-top: calc(3.4rem + env(safe-area-inset-top));
    z-index: 92;
  }
  .chat-container {
    padding: 0.75rem 0.85rem 0.7rem !important;
  }
  .chat-input-area {
    padding-top: 0.75rem;
    padding-bottom: max(0.4rem, env(safe-area-inset-bottom));
  }
  .controls-row {
    gap: 0.5rem;
    margin-bottom: 0.55rem;
  }
  .picker { max-width: none; flex: 1 1 auto; }
  .settings-wrap { margin-left: 0; }
  .settings-btn { width: 44px; height: 44px; }
  .picker-btn { min-height: 44px; padding: 0.35rem 0.55rem; }
  .picker-btn .name { font-size: 0.82rem; }
  .picker-menu {
    position: fixed;
    left: 0.6rem;
    right: 0.6rem;
    bottom: max(0.6rem, env(safe-area-inset-bottom));
    top: auto;
    max-height: 68dvh;
    z-index: 90;
    border-radius: 2px;
  }
  .chat-form { gap: 0.5rem; }
  .chat-input {
    font-size: 16px !important;
    min-height: 44px !important;
  }
  .input-shell { min-height: 48px; }
  .chat-send {
    width: 48px !important;
    height: 48px !important;
  }
  .chat-hint { font-size: 0.7rem; margin-top: 0.5rem; }
  .message { max-width: 94%; padding: 0.9rem 1rem; font-size: 0.92rem; }
  .settings-drawer {
    width: 100vw;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .btn-primary,
  .btn-secondary { min-height: 48px; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 1.65rem !important; }
  .lang-switch { font-size: 0.68rem; }
}

@media (hover: none) {
  .model-card:hover,
  .feature-card:hover,
  .price-card:hover { transform: none; }
}

@media (max-width: 800px) {
  .chat-page {
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .chat-layout {
    flex: 1;
    min-height: 0;
    height: auto !important;
  }
  .picker { max-width: none; }
  button, a, .picker-item, .model-filter { touch-action: manipulation; }
}

.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 0.5rem 0.75rem 0.6rem;
  min-height: 100%;
  cursor: text;
}
.chat-empty-head { width: 100%; }
.chat-empty-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.chat-empty-title {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  margin-bottom: 0.45rem;
  font-style: italic;
}
.chat-empty-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 30ch;
  line-height: 1.5;
}
.chat-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 0;
  max-width: 26rem;
}
.chat-suggest button {
  border: 1px solid var(--border);
  padding: 0.55rem 0.85rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  min-height: 40px;
  background: transparent;
  transition: border-color 0.25s, color 0.25s;
}
.chat-suggest button:hover {
  border-color: var(--border-hover);
  color: #fff;
}
.chat-messages:has(.chat-empty) { justify-content: stretch; }

