/* ---------- Unochat : dark default + optional light theme ---------- */
:root, html.theme-dark {
  --bg: #212121;
  --bg-soft: #171717;
  --bg-panel: #303030;
  --text: #ececec;
  --text-strong: #f9f9f9;
  --text-muted: #b4b4b4;
  --text-subtle: #8f8f8f;
  --border: #3f3f3f;
  --border-strong: #565656;
  --brand: #ffffff;
  --brand-dark: #e3e3e3;
  --brand-darker: #ffffff;
  --success: #22c55e;
  --accent-soft: #383838;
  --bubble-user: #303030;
  --btn-bg: #ffffff;
  --btn-text: #0d0d0d;
  --btn-bg-hover: #f3f3f3;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.18);
  --shadow-md: 0 6px 20px rgba(0,0,0,.26);
  --shadow-lg: 0 14px 40px rgba(0,0,0,.36);
  --image-gen-bg: #353535;
  --image-gen-text: #f4f4f4;
  --image-gen-border: rgba(255,255,255,.08);
  --image-gen-inset: rgba(255,255,255,.06);
  --image-gen-shadow: rgba(0,0,0,.28);
  --image-gen-halo-core: rgba(255,255,255,.24);
  --image-gen-halo-mid: rgba(255,255,255,.11);
  --image-gen-halo-opacity: .9;
  --font: ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
  color-scheme: dark;
}
html.theme-light {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-panel: #ffffff;
  --text: #1a1a1f;
  --text-strong: #0a0a0a;
  --text-muted: #6b6b72;
  --text-subtle: #a1a1a8;
  --border: #e5e5e8;
  --border-strong: #d1d1d6;
  --brand: #0a0a0a;
  --brand-dark: #1a1a1f;
  --brand-darker: #0a0a0a;
  --success: #22c55e;
  --accent-soft: #f0f0f2;
  --bubble-user: #ececee;
  --btn-bg: #0a0a0a;
  --btn-text: #ffffff;
  --btn-bg-hover: #1a1a1f;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .06);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .10);
  --image-gen-bg: #f0f0ee;
  --image-gen-text: #252525;
  --image-gen-border: rgba(20,20,20,.12);
  --image-gen-inset: rgba(255,255,255,.52);
  --image-gen-shadow: rgba(0,0,0,.08);
  --image-gen-halo-core: rgba(255,255,255,.42);
  --image-gen-halo-mid: rgba(255,255,255,.18);
  --image-gen-halo-opacity: .76;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  min-height: 66px;
  backdrop-filter: saturate(1.4) blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--brand-darker);
}
.brand img { width: 36px; height: 36px; }
.brand-text { line-height: 1; }
.brand-text .b1 { font-weight: 800; letter-spacing: .06em; font-size: 14px; color: var(--text-strong); }
.brand-text .b2 { font-weight: 500; color: var(--text-muted); font-size: 11px; margin-top: 3px; }
nav.primary { display: flex; align-items: center; gap: 28px; }
nav.primary a { font-weight: 500; color: var(--text); font-size: 14px; opacity: .9; }
nav.primary a:hover { color: var(--brand-darker); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.launch-link {
  color: var(--text-strong); font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 999px;
  transition: background .15s, color .15s;
}
.launch-link:hover { background: var(--accent-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 11px 22px; font-weight: 600; font-size: 14px;
  letter-spacing: -0.005em;
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease, color .15s ease, border-color .15s;
  white-space: nowrap;
  position: relative;
}
.btn:active { transform: translateY(1px); }
/* Unochat primary — white glossy on dark */
.btn.primary {
  background: linear-gradient(180deg, #ffffff 0%, #dcdce0 100%);
  color: #0a0a0a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .6),
    inset 0 -1px 0 rgba(0, 0, 0, .1),
    0 6px 20px rgba(0, 0, 0, .35);
}
.btn.primary:hover {
  background: linear-gradient(180deg, #ffffff 0%, #eaeaee 100%);
}
.btn.secondary {
  background: var(--bg-panel); color: var(--text-strong);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.btn.secondary:hover { border-color: var(--border-strong); background: var(--accent-soft); }
.btn.ghost { color: var(--text-strong); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.lg { padding: 14px 28px; font-size: 16px; }
.btn.xl { padding: 18px 34px; font-size: 17px; border-radius: 999px; }
.btn[disabled], .btn.is-loading { pointer-events: none; opacity: .7; cursor: not-allowed; }
.btn.is-loading .btn-label { visibility: hidden; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent;
  animation: btn-spin .7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
.lang-switch { position: relative; }
.lang-switch button.trigger {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-panel);
  color: var(--text); font-size: 13px; display: inline-flex; gap: 6px; align-items: center;
}
.lang-switch button.trigger:hover { border-color: var(--brand); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 6px; box-shadow: var(--shadow-md); min-width: 180px; display: none;
}
.lang-menu.open { display: block; }
.lang-menu button {
  display: block; width: 100%; text-align: left; padding: 8px 12px; border-radius: 10px;
  font-size: 14px; color: var(--text);
}
.lang-menu button:hover { background: var(--accent-soft); }
.lang-menu button.active { color: var(--brand-darker); font-weight: 700; }

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: 40px 0 80px; text-align: center;
  min-height: calc(100vh - 66px); display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.hero-logo {
  display: block; margin: 0 auto 28px; width: 140px; height: auto;
}
.hero h1 {
  font-size: clamp(42px, 6.5vw, 76px);
  line-height: 1.02; font-weight: 800; letter-spacing: -0.04em;
  color: var(--text-strong); margin: 0 0 30px;
}
.hero-access { max-width: 820px; margin: 0 auto 34px; }
.hero-prefix, .hero-suffix {
  font-size: clamp(18px, 1.9vw, 22px); color: var(--text);
  margin: 0 0 16px; font-weight: 500;
}
.hero-suffix { margin-top: 16px; }
.hero .chips-row {
  display: inline-flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center;
  margin-bottom: 10px;
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-panel); font-size: 14.5px; font-weight: 500; color: var(--text-strong);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  transition: transform .15s ease, box-shadow .15s ease;
}
.chip:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0, 0, 0, .06); }
.chip img { width: 18px; height: 18px; object-fit: contain; }
.hero .cta-row { display: inline-flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Section ---------- */
.section { padding: 72px 0; }
.section h2 {
  font-size: clamp(32px, 4vw, 48px); font-weight: 800; letter-spacing: -0.035em;
  margin: 0 0 14px; color: var(--text-strong); text-align: center;
}
.section .section-subtitle { color: var(--text-muted); font-size: 18px; margin-bottom: 56px; text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }

/* ---------- Models grid + funnel ---------- */
.models-funnel { position: relative; padding-bottom: 80px; }
.models-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  align-items: start;
}
.model-group.panel {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 22px; padding: 26px;
  box-shadow: var(--shadow-sm);
}
.model-group h3 {
  font-size: 11px; letter-spacing: .16em; color: var(--text-muted);
  font-weight: 700; margin: 0 0 14px; text-transform: uppercase; text-align: center;
}
.model-group-stack { display: flex; flex-direction: column; gap: 18px; }
.model-card {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.model-card:last-child { margin-bottom: 0; }
.model-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.model-card .left { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: var(--text-strong); }
.model-card .left img { width: 22px; height: 22px; object-fit: contain; }
.model-card .price { color: var(--text-muted); font-size: 13px; font-weight: 500; }

/* Funnel SVG between groups and Plume aggregator */
.funnel {
  width: 100%; height: 120px; color: var(--brand-darker);
  margin: 22px 0 -10px;
}
.uno-card {
  max-width: 360px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 18px 26px; background: var(--bg-panel);
  border: 1px solid var(--border); border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .04);
  transition: transform .2s ease, box-shadow .2s ease;
}
.uno-card:hover { transform: translateY(-2px); box-shadow: 0 28px 60px rgba(0, 0, 0, .10), 0 4px 10px rgba(0, 0, 0, .06); }
.uno-card img { width: 44px; height: 44px; }
.uno-card .mm-name { font-size: 16px; font-weight: 900; letter-spacing: .08em; color: var(--brand-darker); }
.uno-card .mm-price { font-size: 14px; color: var(--success); font-weight: 600; }

@media (max-width: 980px) { .models-grid { grid-template-columns: 1fr 1fr; } .funnel { display:none; } .uno-card { margin-top: 24px; } }
@media (max-width: 620px) { .models-grid { grid-template-columns: 1fr; } }

/* ---------- Features ---------- */
.features-list { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.feature {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 14px;
  transition: transform .2s, box-shadow .2s;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature h4 { margin: 0; font-size: 13px; letter-spacing: .14em; color: var(--brand-darker); font-weight: 700; }
.feature p { margin: 0; color: var(--text-muted); font-size: 15px; line-height: 1.6; }
.feature img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; background: var(--bg-soft); }
@media (max-width: 820px) { .features-list { grid-template-columns: 1fr; } }

/* ---------- Privacy ---------- */
.privacy-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.privacy-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 22px; padding: 26px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.privacy-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.privacy-card h4 { margin: 0 0 10px; color: var(--text-strong); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.privacy-card p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.6; }
@media (max-width: 900px) { .privacy-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .privacy-grid { grid-template-columns: 1fr; } }

/* ---------- Testimonials ---------- */
.tm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tm {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 22px;
  padding: 26px; box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.tm:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.tm .who { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.tm .avatar {
  width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #1a1a1f, #0a0a0a);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
}
.tm .name { font-weight: 700; font-size: 14.5px; color: var(--text-strong); letter-spacing: -0.005em; }
.tm .role { font-size: 12px; color: var(--text-muted); }
.tm .quote { font-size: 14px; line-height: 1.65; color: var(--text); }
@media (max-width: 900px) { .tm-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tm-grid { grid-template-columns: 1fr; } }

/* ---------- As seen on ---------- */
.as-seen { padding: 40px 0 24px; background: var(--bg); }
.as-seen .container { text-align: center; }
.as-seen-label {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 600; margin: 0 0 22px;
}
.as-seen-logos {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 44px 56px;
  transition: opacity .2s;
}
.as-logo {
  font-weight: 800; font-size: 22px; letter-spacing: -0.01em;
  color: var(--text); opacity: .7; transition: opacity .2s;
  font-family: Georgia, 'Times New Roman', serif;
}
.as-logo:hover { opacity: 1; }
.as-logo-tc { font-family: system-ui, -apple-system, sans-serif; font-weight: 900; letter-spacing: -.03em; }
.as-logo-verge { font-weight: 900; letter-spacing: -.02em; font-style: italic; }
.as-logo-ph { font-weight: 700; letter-spacing: -.02em; font-family: system-ui, sans-serif; }
.as-logo-hn {
  color: var(--bg); background: var(--text); padding: 4px 12px;
  border-radius: 4px; font-family: Verdana, sans-serif; font-weight: 700; font-size: 18px;
  opacity: .85;
}
.as-logo-wired { font-family: 'Helvetica', Arial, sans-serif; font-weight: 900; letter-spacing: .08em; }
.as-logo-forbes { font-family: Georgia, serif; font-weight: 900; letter-spacing: -.01em; }
@media (max-width: 700px) { .as-seen-logos { gap: 20px 32px; } .as-logo { font-size: 17px; } }

/* ---------- Featured On (LinkedIn + YouTube grid) ---------- */
.featured-section h2 { margin-bottom: 4px; }
.featured-section .section-subtitle { margin-bottom: 32px; }
.featured-grid {
  display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(200px, auto); align-items: stretch;
}
.fe-card {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; transition: border-color .15s, transform .15s;
  display: flex; flex-direction: column;
}
.fe-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.fe-testimonial { text-decoration: none; color: inherit; padding: 18px 20px; gap: 10px; }
.fe-testimonial:hover { border-color: var(--brand); }
.fe-head { display: flex; align-items: center; gap: 10px; }
.fe-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 44px;
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
}
.fe-who { flex: 1; min-width: 0; }
.fe-name { font-weight: 700; font-size: 15px; color: var(--text-strong); letter-spacing: -.01em; }
.fe-role { font-size: 12.5px; color: var(--text-muted); margin-top: 1px; }
.fe-text { font-size: 14.5px; line-height: 1.55; color: var(--text); margin: 4px 0 0; overflow-wrap: break-word; }

@media (max-width: 900px) {
  .featured-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .featured-grid { grid-template-columns: 1fr; }
}

/* ---------- Tweet carousel (legacy — kept for any leftover usage) ---------- */
.tweets-section h2 { margin-bottom: 28px; }
.tweet-carousel {
  position: relative; margin: 0 -20px;
}
.tweet-track {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px 20px 24px;
  scroll-behavior: smooth; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tweet-track::-webkit-scrollbar { display: none; }
.tweet {
  flex: 0 0 380px; scroll-snap-align: start;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 18px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, transform .15s;
}
.tweet:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.tweet header { display: flex; align-items: center; gap: 10px; }
.tw-avatar {
  width: 44px; height: 44px; border-radius: 50%; color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: 0 0 44px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
}
.tw-who { flex: 1; min-width: 0; }
.tw-name {
  display: flex; align-items: center; gap: 4px;
  font-weight: 700; font-size: 15px; color: var(--text-strong); letter-spacing: -0.01em;
}
.tw-verified { flex: 0 0 16px; }
.tw-handle { font-size: 13.5px; color: var(--text-muted); }
.tw-logo { color: var(--text-strong); opacity: .9; flex: 0 0 18px; }
.tw-text {
  font-size: 15px; line-height: 1.5; color: var(--text); margin: 4px 0 0;
  word-wrap: break-word;
}
.tw-role { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.tw-foot {
  display: flex; gap: 14px; align-items: center; font-size: 12.5px;
  color: var(--text-muted); padding-top: 8px; border-top: 1px solid var(--border); margin-top: 4px;
}
.tw-foot time::after { content: '·'; margin-left: 10px; color: var(--border-strong); }
.tw-stat { display: inline-flex; align-items: center; gap: 3px; }

.tw-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-panel); border: 1px solid var(--border); color: var(--text);
  display: grid; place-items: center; z-index: 5; box-shadow: var(--shadow-md);
  transition: border-color .15s, transform .15s;
}
.tw-nav:hover { border-color: var(--brand); color: var(--brand-darker); transform: translateY(-50%) scale(1.05); }
.tw-nav:disabled { opacity: .3; cursor: not-allowed; }
.tw-nav.prev { left: 0; }
.tw-nav.next { right: 0; }
@media (max-width: 700px) {
  .tweet { flex: 0 0 88vw; }
  .tw-nav { display: none; }
}
/* RTL: flip carousel nav and scroll direction */
html[dir=rtl] .tw-nav.prev { left: auto; right: 0; }
html[dir=rtl] .tw-nav.next { right: auto; left: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(180deg, #1a1a1f 0%, #0a0a0a 100%);
  color: #fff; border-radius: 28px; padding: 72px 32px; text-align: center;
  margin: 56px 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 30px 80px rgba(0,0,0,.20);
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(80% 60% at 50% 0%, rgba(255,255,255,.08) 0%, transparent 60%);
  pointer-events: none;
}
.cta-band img { margin: 0 auto 18px; width: 64px; height: 64px; position: relative; }
.cta-band h3 { margin: 0 0 26px; font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -0.03em; position: relative; }
.cta-band .btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }
/* In light theme, CTA white button stays white on dark band */
.cta-band .btn.primary {
  background: linear-gradient(180deg, #ffffff 0%, #e4e4e8 100%);
  color: #0a0a0a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 0 -1px 0 rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.25);
}
.cta-band .btn.primary:hover { background: linear-gradient(180deg, #ffffff 0%, #f1f1f5 100%); }
.cta-band .btn.secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); box-shadow: none; }
.cta-band .btn.secondary:hover { border-color: #fff; background: rgba(255,255,255,.06); }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0; margin-bottom: 10px;
}
.faq details {
  border-radius: 16px;
  transition: border-color .15s;
}
.faq details:hover { border-color: var(--border-strong); }
.faq summary {
  list-style: none; padding: 20px 22px; font-weight: 600; cursor: pointer; font-size: 15.5px;
  display: flex; justify-content: space-between; gap: 10px; color: var(--text-strong);
  letter-spacing: -0.005em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-weight: 400; font-size: 20px; color: var(--text-muted); }
.faq details[open] summary::after { content: '−'; }
.faq p { padding: 0 20px 20px; margin: 0; color: var(--text-muted); font-size: 15px; line-height: 1.6; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 52px 0 36px; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h5 { font-size: 11px; letter-spacing: .16em; color: var(--text-strong); text-transform: uppercase; font-weight: 700; margin: 0 0 16px; }
.footer-grid a { display: block; color: var(--text-muted); font-size: 14px; padding: 4px 0; }
.footer-grid a:hover { color: var(--brand-darker); }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 13px; display: flex; justify-content: space-between; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* Newsletter band — sits between the link grid and the copyright row */
.footer-newsletter {
  margin-top: 36px;
  padding: 24px 0 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: end;
}
.footer-newsletter .nl-copy h5 { font-size: 11px; letter-spacing: .16em; color: var(--text-strong); text-transform: uppercase; font-weight: 700; margin: 0 0 6px; }
.footer-newsletter .nl-copy p   { margin: 0; color: var(--text-muted); font-size: 14px; max-width: 46ch; }
.footer-newsletter .nl-form     { display: flex; gap: 8px; }
.footer-newsletter .nl-form input {
  flex: 1; min-width: 0;
  padding: 11px 14px; font-size: 14px; line-height: 1.2;
  background: var(--bg); color: var(--text-strong);
  border: 1px solid var(--border); border-radius: 10px;
  outline: none; transition: border-color .15s;
}
.footer-newsletter .nl-form input:focus { border-color: var(--brand); }
.footer-newsletter .nl-form button { white-space: nowrap; padding: 11px 18px; font-size: 14px; }
.footer-newsletter .nl-msg { grid-column: 1 / -1; min-height: 18px; font-size: 13px; }
.footer-newsletter .nl-msg.ok  { color: #2ea043; }
.footer-newsletter .nl-msg.err { color: #f85149; }
@media (max-width: 860px) {
  .footer-newsletter { grid-template-columns: 1fr; align-items: stretch; }
  .footer-newsletter .nl-form { flex-direction: column; }
  .footer-newsletter .nl-form button { width: 100%; }
}

/* ---------- Legal pages ---------- */
.legal-page { max-width: 760px; margin: 0 auto; padding: 60px 24px 80px; }
.legal-page h1 { font-size: clamp(22px, 4vw, 32px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; color: var(--text-strong); }
.legal-page .legal-updated { color: var(--text-muted); font-size: 13px; margin: 0 0 40px; }
.legal-page h2 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; margin: 36px 0 10px; color: var(--text-strong); }
.legal-page p, .legal-page li { font-size: 15px; line-height: 1.7; color: var(--text-muted); }
.legal-page ul { padding-left: 20px; margin: 8px 0 16px; }
.legal-page li { margin-bottom: 6px; }
.legal-page a { color: var(--brand); }
.legal-page a:hover { text-decoration: underline; }

/* ---------- SEO content pages ---------- */
.seo-page { padding: 64px 24px 84px; }
.seo-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
  gap: 44px;
  align-items: center;
  margin-bottom: 64px;
}
.seo-hero-copy {
  grid-template-columns: minmax(0, 860px);
}
.seo-kicker {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 14px;
  text-transform: uppercase;
}
.seo-hero h1 {
  color: var(--text-strong);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  margin: 0 0 18px;
  letter-spacing: 0;
}
.seo-lead {
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.7;
  max-width: 680px;
  margin: 0 0 26px;
}
.seo-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.seo-hero-media {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.seo-hero-media img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; }
.seo-section { margin-top: 64px; }
.seo-section h2 {
  color: var(--text-strong);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  margin: 0 0 14px;
  letter-spacing: 0;
}
.seo-section > p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
  max-width: 780px;
  margin: 0 0 24px;
}
.seo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.seo-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 18px;
}
.seo-item h3 {
  color: var(--text-strong);
  font-size: 17px;
  margin: 0 0 8px;
  letter-spacing: 0;
}
.seo-item p, .seo-item li {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.65;
}
.seo-item p { margin: 0; }
.seo-item ul { margin: 0; padding-left: 18px; }
.seo-link-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--border);
}
.seo-link-list a {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 18px;
  background: var(--bg-soft);
  color: var(--text);
}
.seo-link-list a strong { color: var(--text-strong); display: block; margin-bottom: 4px; }
.seo-link-list a span { color: var(--text-muted); font-size: 14px; line-height: 1.45; }
.seo-link-list a::after { content: "->"; color: var(--text-muted); flex: 0 0 auto; }
.seo-link-list a:hover strong { text-decoration: underline; }
.seo-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.seo-table th, .seo-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  vertical-align: top;
}
.seo-table th { color: var(--text-strong); background: var(--bg-soft); font-size: 12px; text-transform: uppercase; }
.seo-table tr:last-child td { border-bottom: 0; }
@media (max-width: 900px) {
  .seo-hero { grid-template-columns: 1fr; gap: 28px; }
  .seo-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .seo-page { padding: 42px 18px 64px; }
  .seo-grid, .seo-link-list { grid-template-columns: 1fr; }
  .seo-actions .btn { width: 100%; }
  .seo-table { display: block; overflow-x: auto; }
}
.legal-table { width: 100%; border-collapse: collapse; margin: 16px 0 20px; font-size: 14px; }
.legal-table th, .legal-table td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; color: var(--text-muted); }
.legal-table th { background: var(--bg-panel); font-weight: 600; color: var(--text-strong); }
@media (max-width: 560px) { .legal-table { font-size: 12px; } .legal-table th, .legal-table td { padding: 7px 9px; } }

/* ---------- Modals ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: color-mix(in srgb, var(--text-strong) 55%, transparent); backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center; z-index: 50; padding: 20px;
  overflow-y: auto; overscroll-behavior: contain;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-panel); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); max-width: 460px; width: 100%;
  padding: 32px; position: relative;
  margin: auto;
}
.modal.wide { max-width: 1100px; }
.modal .close {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-muted); background: transparent;
}
.modal .close:hover { background: var(--accent-soft); color: var(--brand-darker); }
.modal h3 { margin: 0 0 6px; font-size: 22px; color: var(--brand-darker); font-weight: 800; }
.modal .modal-sub { color: var(--text-muted); margin: 0 0 22px; font-size: 14px; }
.modal .field {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
  outline: none; background: var(--bg-panel); transition: border-color .15s;
}
.modal .field:focus { border-color: var(--brand); }
.modal .btn { width: 100%; margin-top: 12px; }
.modal .divider { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 12px; margin: 16px 0; }
.modal .divider::before, .modal .divider::after { content:''; flex:1; height:1px; background: var(--border); }
.modal .gis-slot {
  display: none;
  width: 100%;
  min-height: 42px;
}
.modal .gis-slot.active {
  display: flex;
  justify-content: center;
}
.modal .gis-slot > div,
.modal .gis-slot iframe { width: 100% !important; }
.modal .gbtn {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  padding: 11px 14px; border-radius: 999px; border: 1px solid var(--border); width: 100%; background: var(--bg-panel); font-weight: 600;
}
.modal .gbtn.is-hidden { display: none; }
.modal .gbtn:hover { background: var(--accent-soft); }
.modal .gbtn svg { width: 18px; height: 18px; }
.modal .terms { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 14px; }
.app-dialog-backdrop { z-index: 95; }
.app-text-dialog { max-width: 430px; }
.app-text-dialog label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.app-text-dialog .field {
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.app-text-dialog .dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.app-text-dialog .dialog-actions .btn { margin-top: 0; }
.app-confirm-dialog .modal-sub {
  margin: 8px 0 0;
  line-height: 1.55;
}

/* ---------- Pricing modal ---------- */
.pricing-head { text-align: center; margin-bottom: 22px; }
.pricing-head h3 { font-size: 28px; }
.billing-toggle {
  display: inline-flex; background: var(--accent-soft); border-radius: 999px;
  padding: 4px; gap: 2px; margin-top: 14px;
}
.billing-toggle button {
  padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-muted);
}
.billing-toggle button.active { background: var(--bg-panel); color: var(--brand-darker); box-shadow: var(--shadow-sm); }
.pricing-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pcard {
  border: 1px solid var(--border); background: var(--bg-panel); border-radius: var(--radius-lg);
  padding: 22px 24px; display: flex; flex-direction: column; gap: 11px; position: relative;
}
.pcard.featured { border-color: var(--brand-darker); box-shadow: var(--shadow-md); }
.pcard .ribbon {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--brand-darker); color: var(--btn-text); padding: 4px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
}
.pcard { background: var(--bg-panel); border-color: var(--border); }
.pcard.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-md); }
.pcard .pname { text-transform: uppercase; letter-spacing: .16em; font-size: 11px; color: var(--brand); font-weight: 700; }
.pcard .ptag { font-size: 18px; font-weight: 700; color: var(--brand-darker); }
.pcard .pprice { font-size: 30px; font-weight: 800; color: var(--brand-darker); line-height: 1; }
.pcard .pprice small { font-size: 13px; font-weight: 500; color: var(--text-muted); display: block; margin-top: 4px; }
.pcard ul { padding-left: 18px; margin: 0; color: var(--text); font-size: 13px; line-height: 1.42; }
.pcard ul li { margin-bottom: 4px; }
.pcard .pcta { margin-top: 2px; }
@media (max-width: 900px) { .pricing-cards { grid-template-columns: 1fr; } }

/* Trial banner — sits above the pricing grid */
.trial-banner {
  margin: 0 auto 18px; max-width: 880px;
  padding: 14px 18px; border-radius: 14px; gap: 14px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  font-size: 14px; line-height: 1.4;
}
.trial-banner.trial-eligible {
  background: linear-gradient(135deg, rgba(255,90,31,0.10), rgba(255,138,77,0.05));
  border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent);
  color: var(--text-strong);
}
.trial-banner.trial-eligible strong { font-weight: 700; color: var(--brand); display: block; font-size: 16px; }
.trial-banner.trial-eligible span    { color: var(--text-muted); display: block; }
.trial-banner.trial-eligible > div:first-child { flex: 1 1 60%; }
.trial-banner .trial-start-btn { white-space: nowrap; }
.trial-banner.trial-active {
  background: color-mix(in srgb, var(--brand) 18%, var(--bg-panel));
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
  color: var(--text-strong);
  font-weight: 500;
}
.trial-banner.trial-active .trial-tip { color: var(--text-muted); font-size: 13px; }

/* Trial-eligible cards get a softer accent on the "0/mo" price */
.pcard.trial-eligible .trial-zero { color: var(--brand); }
.pcard.trial-eligible .pprice small strong { color: var(--brand-darker); }
@media (max-width: 640px) {
  .trial-banner { flex-direction: column; align-items: flex-start; }
  .trial-banner .trial-start-btn { width: 100%; }
}

/* ---------- Fullscreen modal (pricing, etc.) ---------- */
.modal.fullscreen {
  max-width: none !important; width: 100vw; height: 100vh; padding: 0 !important;
  border-radius: 0; background: var(--bg);
  overflow: auto; position: fixed; inset: 0;
}
.modal-backdrop:has(.modal.fullscreen) { padding: 0 !important; background: transparent !important; backdrop-filter: none !important; }
.modal.fullscreen .fs-top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 28px; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.3) blur(8px);
  border-bottom: 1px solid var(--border);
}
.modal.fullscreen .fs-back {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border-radius: 999px; color: var(--text); font-weight: 500; font-size: 14px;
  background: var(--bg-panel); border: 1px solid var(--border);
}
.modal.fullscreen .fs-back:hover { color: var(--brand-darker); border-color: var(--brand); }
.modal.fullscreen .fs-right { display: flex; align-items: center; gap: 8px; }
.modal.fullscreen .fs-body {
  max-width: 1100px; margin: 0 auto; padding: 16px 28px 36px;
}
.modal.fullscreen .fs-title {
  text-align: center; font-size: clamp(24px, 3vw, 34px);
  color: var(--text-strong); font-weight: 800; margin: 0 0 12px; letter-spacing: -0.02em;
}
.modal.fullscreen .fs-toggles {
  display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 16px;
}

/* ---------- Pricing modal overrides (Individual/Team) ---------- */
.pricing-modal .pricing-head { text-align: center; margin-bottom: 18px; }
.pricing-modal .pricing-head h3 { font-size: 28px; color: var(--text-strong); font-weight: 800; margin-bottom: 16px; }
.audience-toggle, .billing-toggle {
  display: inline-flex; background: var(--accent-soft); border-radius: 999px;
  padding: 4px; gap: 2px; margin: 6px 4px;
}
.audience-toggle button, .billing-toggle button {
  padding: 8px 26px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text-muted); background: transparent;
}
.audience-toggle button.active, .billing-toggle button.active { background: var(--bg-panel); color: var(--text-strong); box-shadow: var(--shadow-sm); }
.pricing-modal .pricing-footer { text-align: center; margin-top: 18px; }
.pricing-modal .pricing-footer a { color: var(--text-muted); font-size: 13px; }
.pricing-modal .pricing-footer a:hover { color: var(--brand-darker); }
.pricing-modal .pricing-cards { align-items: start; }
.pricing-modal .pcard .usage { min-height: 54px; }

.pricing-team { grid-template-columns: 1fr 1fr !important; max-width: 820px; margin: 0 auto; }
.team-card {
  background: var(--bg-panel) !important; border: 1px solid var(--border); padding: 26px;
  display: flex; flex-direction: column; gap: 14px;
}
.team-card .team-picker {
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 16px;
}
.team-card .team-picker-label { font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.team-rows { display: flex; flex-direction: column; gap: 8px; }
.team-row { display: flex; gap: 8px; align-items: center; }
.team-row select, .team-row input {
  padding: 8px 10px; border-radius: 8px; background: var(--bg-panel); border: 1px solid var(--border); color: var(--text); font-size: 13px;
}
.team-row select { flex: 1; }
.team-row input { width: 64px; }
.team-row .team-del { width: 28px; height: 28px; border-radius: 6px; color: var(--text-muted); }
.team-row .team-del:hover { color: var(--brand-darker); background: var(--accent-soft); }
.team-add { margin-top: 10px; color: var(--text-muted); font-size: 12px; font-weight: 600; }
.team-add:hover { color: var(--brand-darker); }
.team-total-row { display: flex; justify-content: space-between; align-items: flex-end; font-size: 15px; }
.team-total-row .t-left { font-weight: 700; color: var(--text-strong); }
.team-total-row .t-right { text-align: right; }
.team-total-row #team-total { font-size: 28px; font-weight: 800; color: var(--text-strong); }
.team-total-row .per { font-size: 13px; color: var(--text-muted); margin-left: 4px; }
.team-total-row small { color: var(--text-muted); display: block; }
.team-checks { list-style: none; padding: 0; margin: 6px 0 0; }
.team-checks li { padding: 4px 0 4px 24px; position: relative; font-size: 13.5px; color: var(--text); }
.team-checks li::before { content: '✓'; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

.team-seats-modal {
  max-width: min(720px, 94vw);
  width: min(720px, 94vw);
  max-height: min(760px, 92vh);
  overflow: auto;
}
.team-seats-modal h3 { font-size: 26px; margin-bottom: 8px; }
.team-seats-modal .modal-sub { margin-bottom: 18px; }
.team-seat-groups { display: flex; flex-direction: column; gap: 14px; }
.team-seat-group {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  padding: 14px;
}
.team-seat-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.team-seat-group-head strong {
  color: var(--text-strong);
  font-size: 16px;
  text-transform: capitalize;
}
.team-seat-group-head span {
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
}
.team-seat-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.team-seat-slot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.team-seat-slot > span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}
.team-seat-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: center;
}
.team-seat-input-row:not(:has(.team-seat-disable)) { grid-template-columns: 1fr; }
.team-seat-email {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  font-size: 14px;
}
.team-seat-email:focus {
  border-color: var(--brand);
  outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}
.team-seat-disable {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-panel);
}
.team-seat-disable svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.team-seat-disable:hover {
  color: #ef4444;
  border-color: color-mix(in srgb, #ef4444 45%, var(--border));
}
.team-seat-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}
.team-seat-actions span {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 720px) { .pricing-team { grid-template-columns: 1fr !important; } }

/* ---------- Account / billing page ---------- */
body.account-page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}
.account-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 64px;
}
.account-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 48px;
}
.account-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.account-hero {
  max-width: 740px;
  margin-bottom: 24px;
}
.account-hero span,
.account-kicker {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.account-hero h1 {
  color: var(--text-strong);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
  margin: 10px 0 12px;
}
.account-hero p {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.6;
  max-width: 620px;
}
.account-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 28px;
  margin-bottom: 18px;
}
.account-empty {
  max-width: 580px;
  margin: 72px auto 0;
  text-align: center;
}
.account-empty h1,
.account-panel h2 {
  color: var(--text-strong);
  margin: 0;
}
.account-empty p,
.account-muted {
  color: var(--text-muted);
  line-height: 1.55;
}
.account-plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.account-plan-head h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  text-transform: capitalize;
  margin-top: 6px;
}
.account-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text-strong);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.account-grid > div {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--bg);
}
.account-grid span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 7px;
}
.account-grid strong {
  color: var(--text-strong);
  font-size: 15px;
  text-transform: capitalize;
}
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.account-actions .btn {
  min-width: 180px;
}
.account-danger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.account-danger p {
  color: var(--text-muted);
  margin: 8px 0 0;
  max-width: 560px;
}
.account-newsletter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.account-newsletter h2 { margin: 0 0 6px; }
.account-newsletter p {
  color: var(--text-muted);
  margin: 0 0 12px;
  max-width: 560px;
}
.newsletter-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.newsletter-status .dot {
  width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .6;
}
.newsletter-status.on  { color: #2ea043; }
.newsletter-status.off { color: var(--text-muted); }
.btn.secondary.danger {
  color: #ef4444;
  border-color: color-mix(in srgb, #ef4444 42%, var(--border));
}
.btn.secondary.danger:hover {
  background: color-mix(in srgb, #ef4444 9%, var(--bg-panel));
}
.account-warning {
  border: 1px solid color-mix(in srgb, #f59e0b 45%, var(--border));
  background: color-mix(in srgb, #f59e0b 10%, var(--bg-panel));
  color: var(--text-strong);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}
.cancel-flow-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: color-mix(in srgb, var(--text-strong) 55%, transparent);
  backdrop-filter: blur(8px);
}
.cancel-flow-modal {
  width: min(620px, 94vw);
  max-height: 92vh;
  overflow: auto;
  position: relative;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 30px;
}
.cancel-flow-modal .close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-muted);
}
.cancel-flow-modal .close:hover {
  background: var(--accent-soft);
  color: var(--text-strong);
}
.cancel-step {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.cancel-flow-modal h2 {
  color: var(--text-strong);
  font-size: clamp(26px, 5vw, 38px);
  line-height: 1.08;
  margin: 10px 40px 10px 0;
}
.cancel-flow-modal p {
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 18px;
}
.cancel-reasons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.cancel-reasons button {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--text);
  background: var(--bg);
  font-weight: 700;
}
.cancel-reasons button.active {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, var(--bg-panel));
  color: var(--text-strong);
}
.cancel-feedback {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}
.cancel-feedback:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}
.cancel-offer-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  background: var(--bg);
  margin: 18px 0 20px;
}
.cancel-offer-card strong {
  display: block;
  color: var(--text-strong);
  font-size: 28px;
  margin-bottom: 6px;
}
.cancel-offer-card span {
  color: var(--text-muted);
}
.cancel-offer-card.strong {
  border-color: color-mix(in srgb, var(--brand) 42%, var(--border));
  background: color-mix(in srgb, var(--brand) 9%, var(--bg-panel));
}
.cancel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.cancel-actions .btn {
  min-width: 170px;
}

@media (max-width: 720px) {
  .account-shell { width: min(100% - 24px, 640px); padding-top: 14px; }
  .account-topbar { margin-bottom: 34px; }
  .account-topbar .brand-text .b2 { display: none; }
  .account-hero h1 { font-size: 36px; }
  .account-panel { padding: 20px; border-radius: 14px; }
  .account-plan-head,
  .account-danger {
    flex-direction: column;
    align-items: stretch;
  }
  .account-grid { grid-template-columns: 1fr; }
  .account-actions .btn,
  .account-danger .btn { width: 100%; }
  .cancel-flow-modal { padding: 24px 18px; }
  .cancel-reasons { grid-template-columns: 1fr; }
  .cancel-actions { flex-direction: column-reverse; }
  .cancel-actions .btn { width: 100%; }
  .cancel-feedback { font-size: 16px; }
}

/* ---------- App shell ---------- */
html, body { height: 100%; }
body:has(.app-shell) { overflow: hidden; overscroll-behavior: none; }
body.app-locked .app-shell {
  pointer-events: none;
  user-select: none;
}
body.app-locked #modal-backdrop {
  pointer-events: auto;
}
.app-shell {
  display: grid; grid-template-columns: 272px 1fr;
  height: 100vh; height: 100dvh;
  width: 100%; max-width: 100vw;
  background: var(--bg); overflow: hidden;
  direction: ltr !important;
}
.app-shell > .sidebar {
  grid-column: 1 !important;
  grid-row: 1;
}
.app-shell > .main-col {
  grid-column: 2 !important;
  grid-row: 1;
}
html[dir=rtl] .app-shell > .sidebar,
html[dir=rtl] .app-shell > .main-col {
  direction: rtl;
}
.sidebar {
  background: var(--bg-soft); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; min-height: 0;
  height: 100%;
}
.sidebar .side-top { padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 10px; flex: 0 0 auto; }
.sidebar .brand { padding: 2px 4px 6px; }
.sidebar .new-chat {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--brand-darker); color: var(--btn-text);
  border-radius: 12px; font-weight: 600; font-size: 14px;
}
.sidebar .new-chat:hover { background: var(--brand-dark); }
.sidebar .side-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; font-size: 14px;
  color: var(--text); text-align: left; cursor: pointer; background: transparent;
}
.sidebar .side-row:hover { background: var(--bg-panel); color: var(--brand-darker); }
.sidebar .side-row svg { flex: 0 0 16px; color: var(--text-muted); }
.sidebar .side-row:hover svg { color: var(--brand-darker); }
.sidebar .scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 0 10px 10px; display: flex; flex-direction: column; gap: 2px;
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
}
.sidebar .scroll::-webkit-scrollbar { width: 8px; }
.sidebar .scroll::-webkit-scrollbar-thumb { background: transparent; border-radius: 10px; }
.sidebar .scroll:hover::-webkit-scrollbar-thumb { background: var(--border-strong); }
.sidebar .group-title {
  padding: 12px 12px 6px; font-size: 11px; letter-spacing: .14em; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  display: flex; align-items: center; justify-content: space-between;
}
.sidebar .group-title button.add {
  width: 22px; height: 22px; border-radius: 50%; color: var(--text-muted);
  display: grid; place-items: center;
}
.sidebar .group-title button.add:hover { background: var(--bg-panel); color: var(--brand-darker); }
.sidebar .item {
  padding: 7px 12px; border-radius: 10px; font-size: 14px; color: var(--text); cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
}
.sidebar .item svg { flex: 0 0 16px; color: var(--text-muted); }
.sidebar .item .chat-drag-handle {
  width: 18px; height: 22px; flex: 0 0 18px;
  display: grid; place-items: center; cursor: grab;
}
.sidebar .item .chat-drag-handle:active { cursor: grabbing; }
.sidebar .item .chat-drag-handle img,
.sidebar .item .chat-drag-handle svg { pointer-events: none; }
.sidebar .item:hover { background: var(--bg-panel); }
.sidebar .item:hover svg { color: var(--brand-darker); }
.sidebar .item.active { background: var(--bg-panel); font-weight: 600; color: var(--brand-darker); }
.sidebar .item .actions { margin-left: auto; display: none; gap: 2px; }
.sidebar .item:hover .actions { display: flex; }
.sidebar .item .actions button {
  width: 22px; height: 22px; border-radius: 6px; color: var(--text-muted);
}
.sidebar .item .actions button:hover { background: var(--accent-soft); color: var(--brand-darker); }
.sidebar .side-search {
  display: flex; align-items: center; gap: 8px; background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 7px 10px; margin: 4px 10px 0;
}
.sidebar .side-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 13px; }
.sidebar .side-search svg { color: var(--text-muted); flex: 0 0 14px; }
.sidebar .upgrade {
  margin: 10px;
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025)),
    var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 10px 22px rgba(0,0,0,.16);
  font-size: 12.5px;
}
.sidebar .upgrade strong {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text-strong);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 750;
}
.sidebar .upgrade strong::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 18%, transparent);
  flex: 0 0 auto;
}
.sidebar .upgrade span {
  display: block;
  color: var(--text-muted);
  line-height: 1.35;
}
.sidebar .upgrade button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 12px;
  line-height: 1.1;
  font-weight: 750;
  box-shadow: var(--shadow-sm);
}
.sidebar .upgrade button:hover { background: var(--btn-bg-hover); }
.sidebar .bottom { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
.sidebar .bottom button { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; font-size: 14px; color: var(--text); text-align: left; }
.sidebar .bottom button:hover { background: var(--bg-panel); color: var(--brand-darker); }

.main-col {
  display: flex; flex-direction: column; min-width: 0; min-height: 0;
  width: 100%; height: 100%; position: relative;
}
.app-header {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.3) blur(6px);
  position: sticky; top: 0; z-index: 5;
}
.model-picker {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg-panel);
  font-size: 14px; font-weight: 600; color: var(--brand-darker); cursor: pointer;
  transition: border-color .15s;
}
.model-picker:hover { border-color: var(--brand); }
.model-picker img { width: 20px; height: 20px; }
.model-picker .chev { opacity: .5; }
.model-picker.top {
  padding: 10px 20px; font-size: 15px; letter-spacing: .05em;
  background: var(--bg-panel); border: 1px solid var(--border);
}
.model-picker.top img { width: 22px; height: 22px; }
.model-picker.top:hover { border-color: var(--brand); color: var(--brand-darker); }
.model-picker.empty {
  padding: 10px 20px; font-size: 15px; letter-spacing: .05em;
  background: var(--bg-panel); margin: 0 auto 28px;
  display: none;
}
.model-picker.empty img { width: 22px; height: 22px; }
.model-picker.empty:hover { border-color: var(--brand); color: var(--brand-darker); }
.main-col.empty .model-picker.empty { display: inline-flex; }
.main-col.empty .model-picker.top { visibility: hidden; }

.model-menu {
  position: fixed; background: var(--bg-panel);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 10px; width: 340px; max-height: 440px; overflow: auto; z-index: 40;
  display: none;
}
.model-menu.open { display: block; }
.model-menu .mm-group { padding: 6px 8px 4px; font-size: 10px; letter-spacing: .16em; color: var(--text-muted); text-transform: uppercase; font-weight: 700; }
.model-menu .mm-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.model-menu .mm-item:hover { background: var(--accent-soft); }
.model-menu .mm-item img { width: 20px; height: 20px; object-fit: contain; }
.model-menu .mm-item.active { background: var(--accent-soft); color: var(--brand-darker); font-weight: 700; }
html.theme-dark .model-picker img,
html.theme-dark .model-menu .mm-item img,
html.theme-dark .hero-model-menu .mm-item img {
  background: #ffffff;
  border-radius: 7px;
  padding: 3px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.10);
}
html.theme-dark .app-header {
  background: color-mix(in srgb, #212121 88%, transparent);
}
html.theme-dark .model-picker,
html.theme-dark .model-menu,
html.theme-dark .hero-model-menu {
  background: #2f2f2f;
  border-color: #3f3f3f;
}
html.theme-dark .model-menu .mm-item:hover,
html.theme-dark .hero-model-menu .mm-item:hover,
html.theme-dark .model-menu .mm-item.active,
html.theme-dark .hero-model-menu .mm-item.active {
  background: #383838;
}

.chat-body {
  flex: 1 1 auto; min-height: 0; width: 100%; overflow-y: auto; overflow-x: hidden;
  padding: 20px 20px 10px; display: flex; flex-direction: column; gap: 22px;
  scroll-behavior: smooth;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.chat-empty { max-width: 720px; margin: 80px auto; text-align: center; color: var(--text-muted); }
.chat-empty h2 { color: var(--brand-darker); margin-bottom: 10px; font-size: 28px; font-weight: 800; }
.msg { max-width: 820px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
/* User: right-aligned gray pill */
.msg.user { align-items: flex-end; }
.msg.user .bubble {
  background: var(--accent-soft); color: var(--text); padding: 10px 16px;
  border-radius: 20px; max-width: 78%; min-width: 0; font-size: 15px; line-height: 1.5;
  white-space: pre-wrap; overflow-wrap: break-word; word-break: normal;
}
.msg.user .bubble img.attach { max-width: 280px; border-radius: 12px; margin-top: 6px; }
.msg.assistant .bubble img.attach.gen { max-width: 520px; width: 100%; border-radius: 14px; display:block; margin: 4px 0; }
.image-gen-loader {
  width: min(100%, 520px);
  aspect-ratio: 1 / 1;
  min-height: 300px;
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: clamp(22px, 5vw, 34px);
  background: var(--image-gen-bg);
  border: 1px solid var(--image-gen-border);
  color: var(--image-gen-text);
  box-shadow: inset 0 1px 0 var(--image-gen-inset), 0 18px 44px var(--image-gen-shadow);
  isolation: isolate;
}
.image-gen-loader::before {
  content: '';
  position: absolute;
  width: 74%;
  height: 48%;
  left: 14%;
  top: 10%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, var(--image-gen-halo-core) 0%, var(--image-gen-halo-mid) 38%, rgba(255, 255, 255, 0) 74%);
  filter: blur(18px);
  opacity: var(--image-gen-halo-opacity);
  transform: translate3d(0, 0, 0) scale(.95);
  animation: image-halo-drift 5.8s ease-in-out infinite;
}
.image-gen-title {
  position: relative;
  z-index: 2;
  font-size: clamp(22px, 3.3vw, 32px);
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: 0;
}
.image-gen-field {
  position: absolute;
  z-index: 1;
  left: clamp(18px, 3.8vw, 34px);
  right: clamp(18px, 3.8vw, 34px);
  top: clamp(82px, 17%, 108px);
  bottom: clamp(42px, 9%, 68px);
  display: grid;
  grid-template-columns: repeat(33, minmax(0, 1fr));
  grid-template-rows: repeat(23, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  column-gap: clamp(4px, 1.05vw, 10px);
  row-gap: clamp(4px, .82vw, 8px);
  opacity: .96;
}
.image-gen-field span {
  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: 50%;
  background: currentColor;
  opacity: var(--dot-opacity);
  animation: image-dots-breathe 2.4s ease-in-out infinite;
  animation-delay: var(--dot-delay);
}
/* Assistant: plain text left, no bubble */
.msg.assistant { align-items: stretch; min-width: 0; }
.msg.assistant .bubble {
  color: var(--text); font-size: 15.5px; line-height: 1.7;
  max-width: 100%; min-width: 0; background: transparent; padding: 0;
  overflow-wrap: break-word; word-break: normal;
}
.msg.assistant .bubble p { margin: 0 0 12px; }
.msg.assistant .bubble p:last-child { margin-bottom: 0; }
.msg.assistant .bubble h1, .msg.assistant .bubble h2, .msg.assistant .bubble h3 {
  color: var(--brand-darker); margin: 18px 0 10px; font-weight: 700; letter-spacing: -0.01em;
}
.msg.assistant .bubble h1 { font-size: 24px; }
.msg.assistant .bubble h2 { font-size: 20px; }
.msg.assistant .bubble h3 { font-size: 17px; }
.msg.assistant .bubble h1:first-child, .msg.assistant .bubble h2:first-child, .msg.assistant .bubble h3:first-child { margin-top: 0; }
.msg.assistant .bubble ul, .msg.assistant .bubble ol { margin: 6px 0 12px; padding-left: 24px; }
.msg.assistant .bubble li { margin: 3px 0; }
.msg.assistant .bubble a { color: var(--brand-dark); text-decoration: underline; }
.msg.assistant .bubble strong { font-weight: 700; color: var(--brand-darker); }
.msg.assistant .bubble pre {
  background: #1a1a1e; color: #f5f5f6;                /* inside dark code block */ padding: 14px 16px; border-radius: 12px;
  overflow-x: auto; font-size: 13px; margin: 10px 0;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.msg.assistant .bubble code { background: var(--accent-soft); padding: 2px 6px; border-radius: 6px; font-size: 13.5px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.msg.assistant .bubble pre code { background: transparent; padding: 0; }
.msg.assistant .bubble blockquote { border-left: 3px solid var(--border); padding-left: 14px; color: var(--text-muted); margin: 10px 0; }
.msg.assistant .bubble hr { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }
.msg.assistant .bubble .md-table-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--border); border-radius: 10px; }
.msg.assistant .bubble table { width: 100%; border-collapse: collapse; font-size: 14px; }
.msg.assistant .bubble th, .msg.assistant .bubble td {
  padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top;
}
.msg.assistant .bubble th { background: var(--bg-soft); font-weight: 700; color: var(--brand-darker); }
.msg.assistant .bubble tbody tr:last-child td { border-bottom: 0; }
.msg.assistant .bubble tbody tr:hover { background: var(--bg-soft); }
.msg .actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin-top: -2px; min-height: 30px;
  opacity: .42; transform: translateY(-1px);
  transition: opacity .08s ease, transform .08s ease;
}
.msg.assistant:last-child .actions { opacity: .72; }
.msg:hover .actions, .msg:focus-within .actions {
  opacity: 1; transform: translateY(0);
}
.msg .actions button {
  position: relative;
  width: 30px; height: 30px; border-radius: 8px; color: var(--text-muted); background: transparent;
  display: grid; place-items: center;
}
.msg .actions button:hover { color: var(--brand-darker); background: var(--accent-soft); }
.msg .actions button.active { color: var(--brand-darker); background: var(--accent-soft); }
.msg .actions button:disabled { opacity: .35; cursor: default; }
.msg .actions button:disabled:hover { color: var(--text-muted); background: transparent; }
.msg .actions button svg { width: 15px; height: 15px; }
.msg .actions .version-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 30px;
  margin-inline-end: 5px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.msg .actions .version-nav button {
  width: 24px;
  height: 24px;
  border-radius: 7px;
}
.msg .actions .version-nav svg { width: 14px; height: 14px; }
.msg .actions button[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translate(-50%, 0);
  opacity: 0;
  pointer-events: none;
  z-index: 90;
  max-width: min(260px, 70vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--text-strong);
  color: var(--bg);
  box-shadow: var(--shadow-md);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.msg .actions button[data-tooltip]::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  z-index: 91;
  border: 5px solid transparent;
  border-top-color: var(--text-strong);
}
.msg .actions button[data-tooltip]:hover::after,
.msg .actions button[data-tooltip]:focus-visible::after {
  opacity: 1;
}
.msg .actions button[data-tooltip]:hover::before,
.msg .actions button[data-tooltip]:focus-visible::before {
  opacity: 1;
}

.composer-wrap { flex: 0 0 auto; padding: 10px 20px 18px; background: var(--bg); }
.composer {
  max-width: 820px; margin: 0 auto; display: flex; align-items: flex-end; gap: 10px;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 18px; padding: 10px 10px 10px 16px;
  box-shadow: var(--shadow-sm); transition: border-color .15s;
}
.composer:focus-within { border-color: var(--brand); }
.composer textarea {
  flex: 1; border: 0; outline: 0; resize: none; background: transparent;
  padding: 8px 0; max-height: 200px; min-height: 24px; font-size: 16px; line-height: 1.5;
  color: inherit;
}
.composer .tools { display: flex; gap: 4px; align-items: center; }
.composer .tool {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  color: var(--text-muted); background: transparent;
}
.composer .tool:hover { color: var(--brand-darker); background: var(--accent-soft); }
.composer .tool.active { color: var(--brand-darker); background: var(--accent-soft); }
.composer .send {
  width: 38px; height: 38px; border-radius: 50%; background: var(--brand-darker); color: var(--btn-text);
  display: grid; place-items: center;
}
.composer .send:hover { background: var(--brand-dark); }
.composer .send:disabled { background: #c8c3be; cursor: not-allowed; }

.composer-hint { max-width: 820px; margin: 8px auto 0; font-size: 12px; color: var(--text-muted); text-align: center; }

@media (max-width: 820px) {
  /* App-shell / sidebar mobile rules live in the main responsive block below
     (grid-template-columns: 0 1fr + transform). Keeping display:none here
     would strip the sidebar from the grid, collapsing main-col to column 1
     (the 0-wide track). */
  .model-menu { left: 16px; right: 16px; width: auto; }
}

/* ---------- Toasts ---------- */
.toast-layer { position: fixed; bottom: 22px; right: 22px; z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--brand-darker); color: var(--btn-text); padding: 10px 16px; border-radius: 999px;
  box-shadow: var(--shadow-md); font-size: 14px; font-weight: 500;
  animation: slide-in .18s ease-out;
}

/* ---------- Sidebar retract ---------- */
.sidebar-toggle {
  position: fixed; top: 14px; left: 14px; z-index: 30;
  width: 36px; height: 36px; border-radius: 10px; display: none;
  align-items: center; justify-content: center; background: var(--bg-panel); color: var(--text);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.sidebar-toggle:hover { color: var(--brand-darker); border-color: var(--brand); }
.app-shell.sidebar-closed { grid-template-columns: 0 1fr !important; }
.app-shell.sidebar-closed .sidebar { transform: translateX(-100%); opacity: 0; pointer-events: none; }
.app-shell.sidebar-closed .sidebar-toggle { display: flex; }
/* When sidebar is retracted, make room in the header for the floating hamburger */
.app-shell.sidebar-closed .app-header { padding-left: 64px; }
.app-shell .sidebar { transition: transform .22s ease, opacity .2s ease; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  color: var(--text-muted); background: transparent;
}
.icon-btn:hover { color: var(--brand-darker); background: var(--accent-soft); }

/* ---------- Language modal: grouped, searchable, flags ---------- */
.lang-modal { max-width: 640px !important; padding: 24px 22px !important; }
.lang-modal .search {
  width: 100%; padding: 12px 14px; border-radius: 12px; outline: none;
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  font-size: 14px; margin: 10px 0 6px;
}
.lang-modal .search:focus { border-color: var(--brand); }
.lang-modal .scroll { max-height: 58vh; overflow-y: auto; padding: 4px 2px 2px; }
.lang-modal .group-title {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-muted); margin: 14px 4px 6px; display: flex; align-items: center; gap: 6px; font-weight: 700;
}
.lang-modal .lang-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px;
}
.lang-modal .lang-grid button {
  padding: 10px 12px; border-radius: 12px; font-size: 13.5px; text-align: left;
  color: var(--text); background: transparent; border: 1px solid transparent;
  transition: border-color .15s, background .15s;
  display: flex; align-items: center; gap: 10px;
}
.lang-modal .lang-grid button:hover { border-color: var(--border); background: var(--accent-soft); }
.lang-modal .lang-grid button.active { border-color: var(--brand); background: var(--accent-soft); color: var(--brand-darker); font-weight: 700; }
.lang-modal .lang-grid .flag { font-size: 22px; line-height: 1; }
.lang-modal .lang-grid .names { display: flex; flex-direction: column; gap: 1px; overflow: hidden; min-width: 0; }
.lang-modal .lang-grid .nat { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-modal .lang-grid .eng { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.lang-modal .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.lang-modal .chip-btn {
  padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--accent-soft); color: var(--text-muted); border: 1px solid transparent;
}
.lang-modal .chip-btn:hover { color: var(--brand-darker); border-color: var(--border); }
.lang-modal .chip-btn.active { color: var(--brand-darker); border-color: var(--brand); background: var(--bg-panel); }
.lang-modal .empty-hit { color: var(--text-muted); padding: 20px; text-align: center; font-size: 13px; }

/* ---------- Composer overrides (Auto model + centered empty) ---------- */
.composer {
  flex-direction: column !important; align-items: stretch !important; padding: 10px 14px !important;
  gap: 6px !important;
}
.composer textarea { padding: 6px 4px !important; }
.composer-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%;
}
.composer-bar .left, .composer-bar .right { display: flex; align-items: center; gap: 4px; }
.composer .send {
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand-darker); color: var(--btn-text);
  display: grid; place-items: center; flex: 0 0 auto;
}
.composer .send:disabled { background: var(--border-strong); color: var(--text-subtle); cursor: not-allowed; }
.composer .model-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--text); font-size: 13px; font-weight: 500;
  border: 1px solid var(--border);
}
.composer .model-pill:hover { border-color: var(--brand); color: var(--brand-darker); }
.composer .model-pill img { width: 16px; height: 16px; object-fit: contain; }
.composer .model-pill svg.chev { opacity: .5; }

.main-col.empty { justify-content: center; }
.main-col.empty .app-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5; border-bottom: 0;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.main-col.empty .chat-body { flex: 0 0 auto; overflow: visible; padding-bottom: 0; padding-top: 0; }
.main-col.empty .chat-empty { margin: 0 auto; }
.main-col.empty .composer-wrap { padding-top: 4px; }
.main-col.empty .composer-hint { display: none; }
.main-col { position: relative; }

/* ---------- Drag & drop sidebar ---------- */
.sidebar .item.dragging { opacity: .45; }
.sidebar .item.drop-target { background: var(--accent-soft); outline: 2px dashed var(--brand); outline-offset: -2px; }

/* ---------- Theme toggle button ---------- */
.theme-toggle {
  padding: 8px 12px; border-radius: 999px; background: var(--bg-panel);
  border: 1px solid var(--border); color: var(--text); font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand-darker); }

/* ---------- Language picker modal ---------- */
.lang-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 10px;
}
.lang-grid button {
  padding: 10px 14px; border-radius: 10px; font-size: 14px; text-align: left;
  color: var(--text); background: var(--bg-panel); border: 1px solid var(--border);
  transition: border-color .15s, background .15s;
  display: flex; flex-direction: column; gap: 2px;
}
.lang-grid button:hover { border-color: var(--brand); }
.lang-grid button.active { border-color: var(--brand-darker); background: var(--accent-soft); color: var(--brand-darker); font-weight: 700; }
.lang-grid button .code { font-size: 11px; color: var(--text-muted); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.lang-grid button.active .code { color: var(--brand); }
@keyframes slide-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------- Spinner ---------- */
.spinner { width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--brand-darker); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Typing indicator ---------- */
.typing { display: inline-flex; gap: 4px; align-items: center; color: var(--text-muted); }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: bob 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%,60%,100%{ transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes image-dots-breathe {
  0%, 100% { transform: scale(.84); }
  45% { transform: scale(1.08); }
}
@keyframes image-halo-drift {
  0%, 100% { transform: translate3d(-2%, -4%, 0) scale(.9); }
  30% { transform: translate3d(22%, 2%, 0) scale(1.08); }
  62% { transform: translate3d(38%, 24%, 0) scale(.98); }
  82% { transform: translate3d(8%, 18%, 0) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .image-gen-loader::before,
  .image-gen-field span { animation: none; }
}

/* ===================================================================
   Responsive rules
   =================================================================== */

/* Tablet (<= 1024px): tighten chip/container padding */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  nav.primary { gap: 18px; }
  .app-shell { grid-template-columns: 240px 1fr; }
}

/* Small tablet / large phone (<= 820px) */
@media (max-width: 820px) {
  /* Landing: stack funnel columns, chips wrap */
  .models-grid { grid-template-columns: 1fr 1fr; }
  .funnel { display: none; }
  .uno-card { margin-top: 28px; }
  .hero h1 { font-size: clamp(32px, 7vw, 44px); }
  .hero-prefix, .hero-suffix { font-size: clamp(16px, 4vw, 18px); }
  .chip { padding: 8px 14px; font-size: 14px; }
  .chip img { width: 16px; height: 16px; }
  nav.primary a:nth-child(3), nav.primary a:nth-child(5) { display: none; } /* keep Home, Features, Pricing */

  .image-gen-loader {
    border-radius: 26px;
    min-height: 280px;
  }
  .image-gen-field {
    top: 74px;
    bottom: 34px;
  }

  /* App: sidebar takes itself out of flow on mobile — block layout for shell. */
  .app-shell {
    display: block !important;
    grid-template-columns: none !important;
    width: 100vw; max-width: 100vw; overflow: hidden;
  }
  .main-col {
    width: 100vw !important; max-width: 100vw !important; min-width: 0;
    height: 100vh; height: 100dvh;
  }
  /* Keep the app menu on the left for every locale. */
  .sidebar {
    position: fixed !important; top: 0; left: 0; right: auto; bottom: 0; width: 280px;
    z-index: 45; transform: translateX(-100%); opacity: 0; pointer-events: none;
    transition: transform .22s ease, opacity .2s ease;
  }
  .app-shell.sidebar-open .sidebar {
    transform: translateX(0); opacity: 1; pointer-events: auto;
    box-shadow: var(--shadow-lg);
  }
  .app-shell.sidebar-open::after {
    content: ''; position: fixed; inset: 0 0 0 280px;
    background: rgba(0,0,0,.35); z-index: 44;
  }
  .sidebar-toggle { display: flex !important; }
  /* Always leave room for the floating hamburger in mobile header */
  .app-header { padding-left: 64px !important; }

  /* Pricing modal on mobile */
  .modal.fullscreen .fs-body { padding: 14px 16px 40px; }
  .modal.fullscreen .fs-title { font-size: clamp(20px, 5vw, 26px); margin-bottom: 12px; }
  .modal.fullscreen .fs-toggles { gap: 4px; margin-bottom: 14px; }
  .pricing-cards { grid-template-columns: 1fr !important; }
  .pricing-team { grid-template-columns: 1fr !important; }

  /* App header: transparent strip — each button becomes its own floating pill,
     matching the hamburger toggle look (panel bg, border, shadow). */
  .app-header .btn.secondary { display: none; }
  .app-header {
    padding: 10px 12px !important; gap: 8px;
    position: fixed !important; top: 0; left: 0; right: 0; z-index: 30;
    background: transparent !important; border-bottom: 0 !important;
    backdrop-filter: none !important; pointer-events: none;
  }
  .app-header > * { pointer-events: auto; }
  .main-col { padding-top: 60px; }
  .main-col.empty .app-header { position: fixed !important; background: transparent !important; }
  /* Every interactive element in the header gets the floating-pill look */
  .app-header .model-picker.top,
  .app-header .theme-toggle,
  .app-header #auth-btn {
    background: var(--bg-panel); border: 1px solid var(--border); color: var(--text);
    box-shadow: var(--shadow-sm); border-radius: 10px;
  }
  .model-picker.top {
    padding: 7px 12px; font-size: 14px; gap: 6px;
    max-width: calc(100vw - 250px); min-width: 0;
    border-radius: 999px !important;
  }
  .model-picker.top img { width: 18px; height: 18px; flex: 0 0 18px; }
  .model-picker.top #mp-top-label {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
  }
  /* Square-rounded like the hamburger — keeps a consistent 36×36 hit target */
  .app-header .theme-toggle,
  .app-header #auth-btn {
    width: 36px; height: 36px; padding: 0 !important;
    display: grid; place-items: center;
  }
  .app-header #auth-btn #auth-label { display: none; }

  /* Language modal: wider grid cells on small screens */
  .lang-modal { max-width: 96vw !important; }
  .lang-modal .lang-grid { grid-template-columns: 1fr; }

  /* Composer: full width on mobile, fill color to distinguish on light bg */
  .composer { border-radius: 16px; background: var(--accent-soft) !important; }
  html.theme-light .composer { background: #f1f1f3 !important; border-color: #e0e0e4 !important; }
  html.theme-light .composer:focus-within { background: #ffffff !important; }
  .composer-wrap { padding: 10px 12px 14px; }
  .composer .tool { width: 34px; height: 34px; }
  .composer .send { width: 32px; height: 32px; }

  /* Prevent iOS Safari from zooming into inputs on focus.
     Safari only zooms if the input's computed font-size < 16px. */
  .composer textarea, #prompt, #hero-prompt, #search-input,
  #email-field, #pw-field, #lang-search, .team-row input, .team-seat-email, input.field {
    font-size: 16px !important;
  }
}

/* Phone (<= 600px) */
@media (max-width: 600px) {
  .site-header .inner { height: 56px; }
  .site-header { min-height: 56px; }
  .site-header .container { padding: 0 12px; }
  .site-header .brand { min-width: 0; flex: 1 1 auto; gap: 8px; }
  .brand img { width: 30px; height: 30px; }
  .brand-text .b1 { font-size: 13px; }
  .brand-text .b2 { display: none; }
  .site-header nav.primary { display: none; }
  .site-header .header-actions { flex: 0 0 auto; gap: 6px; }
  .site-header .theme-toggle {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
  }
  .site-header #lang-trigger { width: 48px; }
  .launch-link {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1;
    padding: 8px 10px;
  }

  /* Landing hero */
  .hero { padding: 24px 0 56px; min-height: auto; }
  .hero-logo { width: 110px; margin-bottom: 22px; }
  .hero h1 { font-size: clamp(28px, 9vw, 36px); margin-bottom: 20px; }
  .hero-access { margin-bottom: 24px; }
  .hero .chips-row { gap: 8px; }
  .chip { padding: 6px 12px; font-size: 13px; }
  .chip img { width: 14px; height: 14px; }
  .btn.xl { padding: 14px 22px; font-size: 15px; }

  /* Section padding */
  .section { padding: 44px 0; }
  .section h2 { font-size: clamp(24px, 7vw, 32px); }
  .models-grid { grid-template-columns: 1fr; }
  .privacy-grid { grid-template-columns: 1fr; }
  .tm-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* App */
  .msg.user .bubble { max-width: 86%; font-size: 14.5px; }
  .msg.assistant .bubble { font-size: 15px; line-height: 1.65; }
  .chat-body { padding: 16px 14px 10px; }
  .msg { max-width: 100%; gap: 8px; }

  /* Header model pill — shrink label on phone */
  .model-picker.top { padding: 7px 12px; font-size: 13px; letter-spacing: .03em; }
  .model-picker.top span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Composer */
  .composer { padding: 8px 10px !important; }
  .composer textarea { font-size: 16px; /* prevent iOS zoom */ }
  .composer-hint { display: none; }

  /* Model menu — full-width sheet anchored at bottom */
  .model-menu {
    position: fixed !important;
    left: 8px !important; right: 8px !important; top: auto !important; bottom: 8px !important;
    width: auto !important; max-width: none !important;
    max-height: 72vh !important;
  }

  /* Modals */
  .modal { padding: 22px 18px !important; max-width: 94vw !important; }
  .modal h3 { font-size: 20px; }
  .modal .modal-sub { margin-bottom: 16px; }
  .modal .gbtn { padding: 10px 12px; font-size: 14px; }
  .modal .field { padding: 11px 12px; font-size: 16px; /* avoid iOS zoom */ }
  .modal .divider { margin: 12px 0; }
  .modal .terms { font-size: 11px; margin-top: 10px; }

  /* Pricing fullscreen on phone */
  .modal.fullscreen .fs-top { padding: 10px 14px; }
  .modal.fullscreen .fs-body { padding: 18px 14px 40px; }
  .audience-toggle button, .billing-toggle button { padding: 8px 16px; font-size: 13px; }
  .pcard { padding: 20px 18px; }
  .team-card { padding: 20px 18px; }
  .team-seats-modal { max-height: 88vh; }
  .team-seat-slots { grid-template-columns: 1fr; }
  .team-seat-actions { flex-direction: column; align-items: stretch; }
  .team-seat-actions .btn { width: 100%; }

  /* Toasts */
  .toast-layer { bottom: 90px; right: 14px; left: 14px; }
  .toast { text-align: center; }
}

/* Tiny phone (<= 380px) */
@media (max-width: 380px) {
  .footer-grid { grid-template-columns: 1fr; }
  nav.primary { gap: 10px; }
  nav.primary a { font-size: 12px; }
  .hero h1 { font-size: 26px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}

/* (The old "Plume v2 glassy composer" override block was removed
   in favor of the Unochat pill composer defined lower in this file.) */

/* Hero input (landing core CTA) */
.hero-input {
  width: 100%; max-width: 820px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 24px; padding: 14px 12px 10px 18px;
  transition: box-shadow .15s ease, border-color .15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 36px rgba(0,0,0,.28);
}
.hero-input:hover { border-color: var(--border-strong); }
.hero-input:focus-within {
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 36px rgba(0,0,0,.28);
}
.hero-input textarea {
  appearance: none; -webkit-appearance: none;
  width: 100%; border: 0 !important; outline: 0 !important; resize: none; background: transparent;
  font-family: inherit; font-size: 15.5px; line-height: 1.4; color: var(--text);
  padding: 8px 4px; max-height: 200px; min-height: 28px;
  box-shadow: none !important;
}
.hero-input textarea:focus,
.hero-input textarea:focus-visible,
.hero-input textarea:active {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}
.hero-input textarea::-moz-focus-inner { border: 0; }
.hero-input textarea::placeholder { color: var(--text-subtle); }
.hero-input-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hero-input-bar .left, .hero-input-bar .right { display: flex; align-items: center; gap: 4px; }
.hero-input-bar .icon-btn {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  color: var(--text); background: transparent;
  transition: background .15s, color .15s;
}
.hero-input-bar .icon-btn:hover { color: var(--text-strong); background: var(--accent-soft); }
.hero-auto-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 999px;
  background: var(--accent-soft); color: var(--text-strong); font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); cursor: pointer; transition: border-color .15s, background .15s;
}
.hero-auto-chip:hover { border-color: var(--brand); background: var(--bg-panel); }
.hero-auto-chip img { width: 18px; height: 18px; object-fit: contain; }
.hero-auto-chip .chev { opacity: .5; }
html.theme-dark .hero-input .hero-auto-chip { display: none; }
.hero-model-menu {
  position: absolute; bottom: calc(100% + 8px); right: 0;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 8px; width: 300px; max-height: 380px; overflow-y: auto;
  z-index: 20; display: none;
}
.hero-model-menu.open { display: block; }
.hero-model-menu .mm-group {
  padding: 6px 8px 4px; font-size: 10px; letter-spacing: .16em; color: var(--text-muted);
  text-transform: uppercase; font-weight: 700;
}
.hero-model-menu .mm-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px;
  cursor: pointer; font-size: 13px; color: var(--text);
}
.hero-model-menu .mm-item:hover { background: var(--accent-soft); }
.hero-model-menu .mm-item.active { background: var(--accent-soft); color: var(--brand-darker); font-weight: 700; }
.hero-model-menu .mm-item img { width: 18px; height: 18px; object-fit: contain; }
.hero-input-bar .right { position: relative; }
.hero-cta-btn { margin: 14px auto 0; display: inline-block; min-width: 160px; }
.hero-input-bar .send {
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: var(--accent-soft); color: var(--text-subtle);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: none;
  transition: transform .1s ease, box-shadow .15s ease;
}
.hero-input-bar .send:not(:disabled) {
  background: linear-gradient(180deg, #ffffff 0%, #e3e3e3 100%); color: #0d0d0d;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 3px 10px rgba(0,0,0,.35);
}
.hero-input-bar .send:hover:not(:disabled) { transform: scale(1.05); box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 4px 14px rgba(0,0,0,.45); }
.hero-input-bar .send:disabled { cursor: default; }

.how-rows {
  max-width: 840px; margin: 28px auto 0; display: flex; flex-direction: column; gap: 10px;
}
.how-row {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-start;
}
.how-row .how-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--bg-panel); border: 1px solid var(--border);
  color: var(--text-muted); flex-shrink: 0;
}
.how-row .how-icon svg { width: 17px; height: 17px; }
.chip.sm {
  padding: 6px 12px; font-size: 13px; font-weight: 500;
  background: var(--bg-panel); color: var(--text-strong);
  box-shadow: none;
}
.chip.sm img { width: 14px; height: 14px; }
.chip.sm:hover { transform: none; box-shadow: 0 2px 6px rgba(0,0,0,.05); }
button.chip.sm.model-chip {
  font-family: inherit; cursor: pointer; border: 1px solid var(--border);
  transition: border-color .15s, background-color .15s, transform .1s, box-shadow .15s;
}
button.chip.sm.model-chip:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.08); }
button.chip.sm.model-chip.active {
  background: var(--text-strong); color: var(--bg-panel);
  border-color: var(--text-strong);
}
@media (max-width: 720px) {
  .how-rows { margin-top: 20px; gap: 8px; padding: 0 12px; }
  .how-row { gap: 6px; }
  .how-row .how-icon { width: 30px; height: 30px; border-radius: 9px; }
  .how-row .how-icon svg { width: 15px; height: 15px; }
  .chip.sm { padding: 5px 10px; font-size: 12px; }
  .chip.sm img { width: 13px; height: 13px; }
}

.hero-suggestions {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-top: 22px; max-width: 720px; margin-left: auto; margin-right: auto;
}
.hero-suggestions .sug {
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-panel); color: var(--text-strong); font-size: 13.5px; font-weight: 500;
  box-shadow: 0 1px 2px rgba(0,0,0,.04); cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.hero-suggestions .sug:hover { transform: translateY(-1px); border-color: var(--border-strong); box-shadow: 0 4px 10px rgba(0,0,0,.06); }

/* ---------- Unochat landing typography (dark-only) ---------- */
.hero h1 { color: var(--text-strong); letter-spacing: -0.04em; font-size: clamp(42px, 6.5vw, 76px); line-height: 1.02; }
.section h2 { color: var(--text-strong); letter-spacing: -0.035em; font-size: clamp(32px, 4vw, 48px); text-align: center; }
.section .section-subtitle { text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }
.brand-text .b1 { color: var(--text-strong); letter-spacing: .06em; }
.brand-text .b2 { color: var(--text-muted); }
.launch-link { color: var(--text-strong); font-size: 14px; }

/* ---------- Chat page: "Ready when you are." + pill composer ---------- */
.chat-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 24px 20px;
}
.chat-empty .ready {
  color: var(--text-strong); font-weight: 500;
  font-size: clamp(32px, 4.4vw, 56px); letter-spacing: -0.02em;
  margin: 0 0 32px; line-height: 1.1;
}

/* When the chat is empty, center the heading + composer together as a hero group */
.main-col.empty .composer-wrap { padding: 0 24px 40px; background: transparent; }
.main-col.empty .composer-hint { display: none; }

/* Dark pill composer — matches the screenshot: rounded pill, white send button */
.composer-wrap {
  position: sticky; bottom: 0;
  padding: 16px 24px 24px;
  background: linear-gradient(180deg, transparent 0%, var(--bg) 40%);
  z-index: 5;
}
.composer {
  max-width: 820px; margin: 0 auto;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 14px 12px 10px 18px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 36px rgba(0,0,0,.28);
  transition: border-color .15s, box-shadow .15s;
}
.composer:focus-within {
  border-color: color-mix(in srgb, var(--text-strong) 28%, var(--border));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--text-strong) 6%, transparent), 0 10px 36px rgba(0,0,0,.32);
}
.composer textarea {
  flex: 1; min-height: 28px; max-height: 200px;
  background: transparent; border: 0; outline: none; resize: none;
  color: var(--text); font-size: 15.5px;
  padding: 8px 4px; line-height: 1.4;
}
.composer textarea::placeholder { color: var(--text-subtle); }
.composer-bar {
  display: flex; align-items: center; gap: 6px; padding: 0;
  width: 100%; justify-content: space-between;
}
.composer-bar .left, .composer-bar .right { display: flex; align-items: center; gap: 4px; }
.composer-bar .tool {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text);
  background: transparent; border: 0;
  transition: background .15s, color .15s;
}
.composer-bar .tool:hover { background: var(--accent-soft); color: var(--text-strong); }
/* Screenshot shows only attach + voice + send — hide web and model pill */
.composer-bar #tool-web, .composer-bar .model-pill { display: none; }
.composer-bar .send {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #dcdce0 100%); color: #0a0a0a;
  border: 0; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 3px 10px rgba(0,0,0,.35);
  transition: box-shadow .15s, transform .1s;
}
.composer-bar .send:hover:not(:disabled) { transform: scale(1.05); box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 4px 14px rgba(0,0,0,.45); }
.composer-bar .send:disabled { background: var(--accent-soft); color: var(--text-subtle); cursor: not-allowed; box-shadow: none; }

/* Hide the full-composer attach previews row inside the pill shape — they stack above */
#attach-previews:empty { display: none; }

/* Dashboard / Plume-app artefacts removed — if markup leaks through we hide it */
.dash-main, .word-preview, .app-redirect-modal, .empty-app-badge { display: none !important; }

/* ---------- Light-theme overrides ---------- */
html.theme-light body { background: #ffffff; color: #1a1a1f; }
html.theme-light .hero h1 { color: #0a0a0a; }
html.theme-light .section h2 { color: #0a0a0a; }
html.theme-light .brand-text .b1 { color: #0a0a0a; }
html.theme-light .brand-text .b2 { color: #6b6b72; }
html.theme-light .launch-link { color: #0a0a0a; }
/* Flip the white-glossy buttons to dark-glossy on light bg */
html.theme-light .btn.primary {
  background: linear-gradient(180deg, #2a2a2e 0%, #0a0a0a 100%);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 -1px 0 rgba(0,0,0,.2), 0 1px 2px rgba(0,0,0,.04), 0 6px 16px rgba(0,0,0,.12);
}
html.theme-light .btn.primary:hover { background: linear-gradient(180deg, #3a3a40 0%, #151518 100%); }
html.theme-light .composer-bar .send {
  background: linear-gradient(180deg, #2a2a2e 0%, #0a0a0a 100%); color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 3px 10px rgba(0,0,0,.2);
}
html.theme-light .composer-bar .send:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 4px 14px rgba(0,0,0,.28); }
html.theme-light .composer-bar .send:disabled { background: var(--accent-soft); color: var(--text-subtle); box-shadow: none; }
html.theme-light .hero-input-bar .send {
  background: #ececee; color: #a1a1a8;
  box-shadow: none;
}
html.theme-light .hero-input-bar .send:not(:disabled) {
  background: linear-gradient(180deg, #2a2a2e 0%, #0a0a0a 100%); color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 4px 14px rgba(0,0,0,.2);
}
html.theme-light .hero-input-bar .send:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 6px 20px rgba(0,0,0,.28); }
html.theme-light .hero-input {
  background: #f4f4f5; border-color: #e5e5e8;
  box-shadow: 0 8px 24px rgba(0,0,0,.05);
}
html.theme-light .hero-input:focus-within {
  background: #ffffff; border-color: #e5e5e8;
  box-shadow: 0 8px 24px rgba(0,0,0,.05);
}
html.theme-light .composer {
  background: #f4f4f5; border-color: #e5e5e8; box-shadow: none;
}
html.theme-light .composer:focus-within {
  background: #ffffff; border-color: #d1d1d6;
  box-shadow: 0 0 0 3px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
}
html.theme-light .composer textarea { color: #1a1a1f; }
html.theme-light .composer textarea::-webkit-scrollbar { width: 6px; }
html.theme-light .composer textarea::-webkit-scrollbar-thumb {
  background: #d1d1d6; border-radius: 10px;
}
html.theme-light .composer textarea::-webkit-scrollbar-track { background: transparent; }

/* ---------- Hidden-budget lock banner ---------- */
.lock-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; margin: 10px 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--brand-darker) 12%, var(--bg-panel));
  border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--border));
  color: var(--text); font-size: 13px; line-height: 1.4;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.lock-banner[hidden] { display: none; }
.lock-banner .lock-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #f59e0b; box-shadow: 0 0 0 0 rgba(245,158,11,.55);
  animation: lock-pulse 1.6s ease-in-out infinite; flex: 0 0 8px;
}
.lock-banner .lock-text { flex: 1; }
.lock-banner .lock-upgrade {
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: #fff; color: #311a17; cursor: pointer;
}
@keyframes lock-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(245,158,11,.55); }
  70%  { box-shadow: 0 0 0 8px rgba(245,158,11,0); }
  100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); }
}

/* ---------- Upgrade halo (header + sidebar card) ---------- */
.upgrade-halo {
  position: relative;
  animation: upgrade-halo 1.8s ease-in-out infinite;
}
@keyframes upgrade-halo {
  0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 48%, transparent); }
  50%     { box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand) 0%, transparent); }
}

/* ---------- Sign-in modal ---------- */
.modal-backdrop:has(.auth-modal) {
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 3vw, 48px);
  background: color-mix(in srgb, var(--bg) 86%, rgba(0,0,0,.72));
  backdrop-filter: blur(10px);
}
.auth-modal {
  --auth-bg: #151515;
  --auth-panel: #202020;
  --auth-muted: #858a99;
  --auth-border: rgba(255,255,255,.09);
  --auth-strong: #f7f7f8;
  --auth-text: #f0f0f2;
  --auth-chip-bg: rgba(24,24,24,.44);
  --auth-icon-bg: #181818;
  --auth-review-bg: rgba(19,19,20,.82);
  --auth-button-border: rgba(245,245,247,.72);
  --auth-button-hover: rgba(255,255,255,.045);
  --auth-field-bg: rgba(255,255,255,.035);
  --auth-focus: rgba(255,255,255,.08);
  --auth-shadow: 0 22px 72px rgba(0,0,0,.52);
  width: min(920px, calc(100vw - 72px));
  max-width: 920px;
  height: min(520px, calc(100dvh - 56px));
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(320px, .86fr) minmax(360px, 1fr);
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  background: var(--auth-bg);
  color: var(--auth-strong);
  border: 1px solid rgba(255,255,255,.04);
  box-shadow: var(--auth-shadow);
}
html.theme-light .modal-backdrop:has(.auth-modal) {
  background: rgba(246,247,249,.82);
}
html.theme-light .auth-modal {
  --auth-bg: #ffffff;
  --auth-panel: #f5f6f8;
  --auth-muted: #72747d;
  --auth-border: rgba(10,10,12,.09);
  --auth-strong: #111114;
  --auth-text: #34343a;
  --auth-chip-bg: rgba(255,255,255,.82);
  --auth-icon-bg: #ffffff;
  --auth-review-bg: rgba(255,255,255,.9);
  --auth-button-border: rgba(17,17,20,.56);
  --auth-button-hover: rgba(10,10,12,.045);
  --auth-field-bg: rgba(10,10,12,.03);
  --auth-focus: rgba(10,10,12,.08);
  --auth-shadow: 0 22px 64px rgba(15,23,42,.16);
  border-color: rgba(10,10,12,.08);
}
.auth-modal svg path:not([fill]) {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.auth-proof {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  justify-items: center;
  gap: 24px;
  min-width: 0;
  min-height: 0;
  padding: 32px 34px 28px;
  background: var(--auth-panel);
  border-right: 1px solid var(--auth-border);
  overflow: hidden;
}
.auth-proof::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 36%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--auth-panel) 0%, transparent), color-mix(in srgb, var(--auth-panel) 86%, transparent) 46%, var(--auth-panel));
  pointer-events: none;
}
.auth-proof.auth-proof-minimal {
  justify-content: center;
  gap: 64px;
}
.auth-proof.auth-proof-minimal::after {
  display: none;
}
.auth-proof p {
  margin: 0 0 10px;
  text-align: center;
  color: var(--auth-muted);
  font-size: 12px;
  font-weight: 500;
}
.auth-ai-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 24px;
  border: 1px solid var(--auth-border);
  background: var(--auth-chip-bg);
  color: var(--auth-strong);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--auth-strong) 2%, transparent);
}
.auth-ai-pill span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 650;
}
.auth-ai-pill img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}
.auth-ai-pill img[src$=".svg"] {
  filter: invert(1) brightness(1.15);
  opacity: .95;
}
html.theme-light .auth-ai-pill img[src$=".svg"] {
  filter: none;
}
.auth-proof-top,
.auth-proof-mid,
.auth-proof-bottom {
  position: relative;
  z-index: 1;
}
.browser-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.browser-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--auth-icon-bg);
  border: 1px solid var(--auth-border);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--auth-strong) 5%, transparent), 0 10px 18px rgba(0,0,0,.12);
}
.browser-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.auth-proof-bottom {
  align-self: end;
  width: 100%;
  text-align: center;
}
.auth-proof-bottom h4 {
  margin: 0 0 12px;
  color: var(--auth-strong);
  font-size: clamp(20px, 1.65vw, 24px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
}
.auth-review-carousel {
  width: min(100%, 286px);
  margin: 0 auto;
  overflow: hidden;
}
.auth-review-track {
  display: flex;
  width: 300%;
  animation: auth-review-slide 15s ease-in-out infinite;
  will-change: transform;
}
.auth-review {
  flex: 0 0 calc(100% / 3);
  min-height: 126px;
  padding: 13px 14px;
  border-radius: 8px;
  text-align: left;
  background: var(--auth-review-bg);
  border: 1px solid var(--auth-border);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--auth-strong) 3%, transparent);
  overflow: hidden;
}
.auth-review .stars {
  color: #ffd12f;
  font-size: 14px;
  line-height: 1;
  margin-bottom: 9px;
  letter-spacing: 1px;
}
.auth-review strong {
  display: block;
  margin-bottom: 6px;
  color: var(--auth-strong);
  font-size: 12.5px;
}
.auth-review p {
  margin: 0;
  text-align: left;
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.4;
}
.auth-review span {
  display: block;
  margin-top: 10px;
  text-align: right;
  color: var(--auth-muted);
  font-size: 11px;
}
.auth-review-progress {
  position: relative;
  width: 46px;
  height: 3px;
  margin: 10px auto 0;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--auth-strong) 10%, transparent);
}
.auth-review-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: color-mix(in srgb, var(--auth-strong) 58%, transparent);
  transform-origin: left;
  animation: auth-review-progress 5s linear infinite;
}
@keyframes auth-review-slide {
  0%, 28% { transform: translateX(0); }
  34%, 62% { transform: translateX(-33.3333%); }
  68%, 94% { transform: translateX(-66.6667%); }
  100% { transform: translateX(0); }
}
@keyframes auth-review-progress {
  0% { transform: scaleX(0); opacity: .45; }
  88% { transform: scaleX(1); opacity: .85; }
  100% { transform: scaleX(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-review-track,
  .auth-review-progress::after {
    animation: none;
  }
}
.auth-entry {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 40px 42px 34px;
  background: var(--auth-bg);
}
.modal .auth-close {
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  color: #a3a7b2;
  border-radius: 50%;
}
.modal .auth-close svg {
  width: 24px;
  height: 24px;
}
.modal .auth-close:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}
.auth-entry-inner {
  width: min(100%, 400px);
  text-align: center;
}
.auth-modal h3 {
  margin: 0 0 10px;
  color: var(--auth-strong);
  font-size: clamp(25px, 2vw, 32px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
}
.auth-modal .modal-sub {
  margin: 0 0 22px;
  color: var(--auth-text);
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.35;
}
.auth-options,
.email-login-form {
  display: grid;
  gap: 12px;
}
.email-login-form[hidden],
.auth-options[hidden] {
  display: none;
}
.auth-modal .gis-slot.active {
  min-height: 64px;
}
.auth-modal .gis-slot.active + .gbtn.is-hidden {
  display: none;
}
.auth-modal .auth-provider,
.auth-modal .gbtn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 10px 18px;
  border: 1.25px solid var(--auth-button-border);
  border-radius: 12px;
  background: transparent;
  color: var(--auth-strong);
  font-size: clamp(14px, 1.05vw, 16px);
  font-weight: 650;
  letter-spacing: 0;
  transition: background .16s ease, border-color .16s ease, transform .08s ease;
}
.auth-modal .auth-provider:hover,
.auth-modal .gbtn:hover {
  background: var(--auth-button-hover);
  border-color: var(--auth-strong);
}
.auth-modal .auth-provider:active,
.auth-modal .gbtn:active {
  transform: translateY(1px);
}
.auth-modal .auth-provider > svg {
  position: absolute;
  left: 22px;
  width: 18px;
  height: 18px;
}
.auth-modal .field {
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.25px solid var(--auth-button-border);
  background: var(--auth-field-bg);
  color: var(--auth-strong);
  font-size: 15px;
  font-weight: 600;
}
.auth-modal .field::placeholder {
  color: color-mix(in srgb, var(--auth-muted) 72%, transparent);
}
.auth-modal .field:focus {
  border-color: var(--auth-strong);
  box-shadow: 0 0 0 3px var(--auth-focus);
}
.auth-modal .email-actions {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
}
.auth-modal .email-actions .btn {
  min-height: 46px;
  margin-top: 0;
  border-radius: 12px;
}
.auth-back {
  display: grid;
  place-items: center;
  min-height: 46px;
  border: 1px solid var(--auth-button-border);
  border-radius: 12px;
  color: var(--auth-strong);
  background: var(--auth-field-bg);
}
.auth-back:hover {
  background: var(--auth-button-hover);
  border-color: var(--auth-strong);
}
.auth-back svg {
  width: 22px;
  height: 22px;
}
.auth-modal .terms {
  max-width: 390px;
  margin: 20px auto 0;
  color: var(--auth-muted);
  font-size: 11.5px;
  line-height: 1.38;
  text-align: center;
}
.auth-modal .terms a {
  color: color-mix(in srgb, var(--auth-strong) 58%, var(--auth-muted));
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-modal .terms a:hover {
  color: var(--auth-strong);
}

@media (max-width: 980px) {
  .auth-modal {
    display: flex;
    flex-direction: column;
    width: min(600px, calc(100vw - 32px));
    height: auto;
    max-height: calc(100dvh - 32px);
    min-height: 0;
    overflow-y: auto;
  }
  .auth-proof {
    display: flex;
    flex: 0 0 auto;
    gap: 14px;
    padding: 22px 24px 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
  }
  .auth-proof::after {
    display: none;
  }
  .auth-proof p {
    margin-bottom: 8px;
    font-size: 13px;
  }
  .auth-ai-pill {
    min-height: 34px;
    gap: 12px;
    padding: 7px 13px;
  }
  .auth-ai-pill span {
    gap: 6px;
    font-size: 14px;
  }
  .auth-ai-pill img {
    width: 16px;
    height: 16px;
  }
  .browser-row {
    gap: 8px;
  }
  .browser-icon {
    width: 34px;
    height: 34px;
  }
  .browser-icon img {
    width: 23px;
    height: 23px;
  }
  .auth-proof-bottom h4 {
    margin-bottom: 8px;
    font-size: 21px;
  }
  .auth-review-carousel {
    width: min(100%, 260px);
    transform: none;
  }
  .auth-review {
    min-height: 0;
    padding: 12px;
  }
  .auth-review .stars {
    margin-bottom: 8px;
    font-size: 15px;
    letter-spacing: 1px;
  }
  .auth-review strong {
    margin-bottom: 4px;
    font-size: 13px;
  }
  .auth-review p {
    display: -webkit-box;
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .auth-review span {
    display: none;
  }
  .auth-entry {
    position: static;
    min-height: 0;
    padding: 34px 32px 30px;
  }
  .modal .auth-close {
    position: absolute;
    top: 14px;
    right: 14px;
  }
}

@media (max-width: 640px) {
  .modal-backdrop:has(.auth-modal) {
    padding: 10px;
  }
  .auth-modal {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 20px);
    padding: 0 !important;
    border-radius: 18px;
  }
  .auth-proof {
    display: none;
  }
  .auth-entry {
    min-height: 0;
    padding: 32px 20px 24px;
  }
  .auth-entry-inner {
    width: 100%;
  }
  .auth-modal h3 {
    margin-bottom: 8px;
    font-size: clamp(24px, 7vw, 30px);
  }
  .auth-modal .modal-sub {
    margin-bottom: 18px;
    font-size: 14px;
  }
  .auth-options,
  .email-login-form {
    gap: 10px;
  }
  .auth-modal .auth-provider,
  .auth-modal .gbtn {
    min-height: 48px;
    padding: 10px 16px 10px 52px;
    justify-content: center;
    border-radius: 12px;
    font-size: clamp(15px, 4.2vw, 16px);
  }
  .auth-modal .auth-provider > svg {
    left: 20px;
    width: 20px;
    height: 20px;
  }
  .auth-modal .field {
    min-height: 48px;
    padding: 13px 14px;
    font-size: 16px;
  }
  .auth-modal .email-actions {
    grid-template-columns: 48px 1fr;
    gap: 10px;
  }
  .auth-modal .email-actions .btn,
  .auth-back {
    min-height: 48px;
    border-radius: 12px;
  }
  .auth-modal .terms {
    margin-top: 14px;
    font-size: 11px;
  }
}

@media (max-height: 560px) and (min-width: 641px) {
  .auth-modal {
    height: calc(100dvh - 32px);
  }
  .auth-proof {
    padding-top: 24px;
    padding-bottom: 20px;
  }
  .auth-review {
    min-height: 112px;
  }
  .auth-entry {
    padding-top: 34px;
    padding-bottom: 28px;
  }
}
