:root {
  --bg0: #000308;
  --bg1: #0a1538;
  --bg2: #050a14;
  --card: #1a222c;
  --card2: #232d38;
  --card3: #2a333d;
  --text: #ffffff;
  --muted: #8e96a0;
  --link: #4c82fb;
  --orange: #f08246;
  --blue: #4b89dc;
  --radius-lg: 20px;
  --radius-md: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow-x: hidden; }
body {
  font-family: var(--font);
  background: var(--bg0);
  background-image: linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 35%, var(--bg0) 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.view { display: none; min-height: 100vh; }
.view.active { display: block; }

.view-pending {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  background: #000;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}
.view-pending.active { display: flex; }
.pending-wrap {
  max-width: 340px;
  text-align: center;
  color: #fff;
}
.pending-wrap .logo-img { margin: 0 auto 24px; display: block; border-radius: 12px; }
.pending-wrap h1 { font-size: 22px; font-weight: 700; margin-bottom: 14px; }
.pending-wrap p { font-size: 15px; line-height: 1.5; color: #9aa3ad; margin-bottom: 12px; }
.pending-hint { font-size: 13px !important; color: #6b7280 !important; }
.pending-link {
  display: inline-block;
  margin-top: 20px;
  color: #4590ff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}

.app { max-width: 430px; margin: 0 auto; min-height: 100vh; position: relative; }

.ico { width: 22px; height: 22px; display: block; flex-shrink: 0; }
.ico-24 { width: 24px; height: 24px; }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 6px;
  padding-top: max(14px, env(safe-area-inset-top));
}
.logo-r {
  width: 36px; height: 36px; background: #fff; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: #000; letter-spacing: -0.04em;
}
.logo-img {
  width: 36px; height: 36px; border-radius: 10px;
  display: block; object-fit: cover; flex-shrink: 0;
}
.topbar-right { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  background: none; border: none; color: var(--text); cursor: pointer;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; padding: 0;
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: #3d4650;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: #fff; text-decoration: none;
}

.screen-title {
  font-size: 34px; font-weight: 700; letter-spacing: -0.03em;
  padding: 4px 20px 18px; line-height: 1.1;
}
.screen-nav { padding: 0 20px 8px; }
.back-btn {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.08); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* Home balance card */
.balance-card {
  background: var(--card); border-radius: var(--radius-lg);
  margin: 0 16px 12px; padding: 20px 18px 8px;
}
#view-home { padding-bottom: 110px; overflow-x: hidden; }
#view-transactions.view-tx {
  display: none;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding-bottom: 0;
  background: transparent;
}
#view-transactions.view-tx.active { display: flex; }
.balance-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; gap: 12px; }
.balance-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding-top: 4px;
}
.balance-amount {
  font-size: 34px; font-weight: 700; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 6px;
}
.balance-amount .chev { opacity: .7; width: 18px; height: 18px; }
.balance-iban {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
}
.balance-meta {
  display: flex; align-items: center; gap: 8px; color: var(--muted);
  font-size: 14px; margin-top: 8px;
}
.eu-flag {
  width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(180deg, #003399 0%, #003399 100%);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 8px; color: #fc0;
}
.card-menu {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.06); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.iban-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.iban-pill-ico { width: 16px; height: 16px; display: block; opacity: .95; }

/* Transactions rows */
.tx-list { display: flex; flex-direction: column; }
.tx-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; min-height: 68px;
}
.tx-item + .tx-item { border-top: 1px solid rgba(255,255,255,.05); }
.tx-item-btn {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 14px 0; min-height: 68px;
  border: none; background: none; color: inherit; font: inherit;
  text-align: left; cursor: pointer;
}
.tx-item-btn + .tx-item,
.tx-item + .tx-item-btn,
.tx-item-btn + .tx-item-btn { border-top: 1px solid rgba(255,255,255,.05); }
.tx-clickable:active { opacity: .88; }
.tx-pending .tx-amount-pending { color: #f08246; }
.tx-sub-pending { color: #f08246 !important; }
.help-item-pending .tx-sub-pending { color: #f08246 !important; }
.tx-card .tx-item + .tx-item { border-top: none; padding-top: 16px; }
.tx-card .tx-item { padding: 16px 0; }
.tx-card .tx-item:first-child { padding-top: 4px; }
.tx-card .tx-item:last-child { padding-bottom: 8px; }

.tx-icon-wrap { position: relative; width: 44px; height: 44px; flex-shrink: 0; }
.tx-icon-img {
  width: 44px; height: 44px; border-radius: 50%; display: block; object-fit: cover;
}
.tx-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -0.02em;
}
.tx-avatar--teal { background: #1f9e8f; }
.tx-avatar--green { background: #3c9f5f; }
.tx-avatar--blue { background: #3d6fd8; }
.tx-avatar--grey { background: #4a5560; }
.tx-icon.sm { width: 28px; height: 28px; font-size: 10px; position: absolute; }
.tx-icon.pos-br { right: -2px; bottom: -2px; }
.tx-icon.pos-tl { left: -2px; top: -2px; }
.tx-icon.ma { background: var(--orange); }
.tx-icon.dm { background: #8b5a2b; }
.tx-icon.transfer { background: var(--blue); }
.tx-icon.invest { background: #5b8def; }
.tx-icon.eth { background: #627eea; }
.tx-icon.btc { background: #f7931a; color: #fff; font-size: 16px; }
.tx-icon.bnb { background: #f3ba2f; color: #000; }
.tx-icon.coinbase { background: #fff; color: #0052ff; font-size: 18px; font-weight: 800; }
.tx-icon.mercuryo { background: #2d3e50; }
.tx-icon.topup { background: #4a90d9; }
.tx-icon.tabac { background: #fff; color: #c00; font-size: 9px; text-align: center; line-height: 1.1; }
.tx-icon.post { background: #e4002b; color: #fff; font-size: 7px; font-weight: 800; text-align: center; line-height: 1.05; padding: 2px; }
.tx-icon.juline { background: #e85d4c; }
.tx-icon.transport { background: #7b68ee; }
.tx-icon.hyperu { background: #fff; color: #e30613; font-weight: 900; font-size: 16px; }
.tx-icon.bricolage { background: #e30613; color: #fff; font-size: 11px; font-weight: 800; }
.tx-icon.delivery { background: #3d9a5f; }
.tx-icon.doc { background: #3d4f63; color: #a8c4e8; }
.tx-icon.eu { background: #003399; font-size: 14px; }

.tx-badge {
  position: absolute; right: -1px; bottom: -1px; width: 18px; height: 18px;
  border-radius: 50%; background: #1a222c; border: 2px solid var(--card);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: #fff; font-weight: 700;
}
.tx-badge.dark { background: #111; border-color: var(--card); }
.tx-badge.blocked { color: #8e96a0; font-size: 11px; }

.tx-body { flex: 1; min-width: 0; }
.tx-line1 {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.tx-line2 {
  margin-top: 3px;
}
.tx-line3 {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}
.tx-title {
  font-size: 15px; font-weight: 600; line-height: 1.25;
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tx-title.wrap { white-space: normal; }
.tx-sub { font-size: 13px; color: var(--muted); line-height: 1.35; flex: 1; min-width: 0; }
.tx-meta-bold { font-weight: 600; color: var(--text); }
.tx-meta-normal { font-weight: 400; color: var(--muted); }
.tx-amount { font-size: 15px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.tx-amount.failed { color: var(--muted); text-decoration: line-through; }
.tx-amount-sec { font-size: 12px; color: var(--muted); white-space: nowrap; flex-shrink: 0; text-align: right; }

.show-all {
  display: block; width: 100%; text-align: center; padding: 18px 0 10px;
  color: #fff; font-weight: 600; font-size: 15px;
  background: none; border: none; cursor: pointer; font-family: inherit;
}

/* Transactions page */
.tx-topbar { padding-bottom: 4px; }
.tx-header-row {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 0 8px 10px;
}
.tx-back-btn {
  width: 44px; height: 44px; border: none; background: none;
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.tx-header-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.tx-header-spacer { width: 44px; }
.tx-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 20px 12px;
  padding: 10px 14px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.tx-filter-pill .ico { width: 18px; height: 18px; opacity: .9; }
.tx-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.tx-scroll::-webkit-scrollbar { display: none; }
.tx-page-title { font-size: 34px; font-weight: 700; padding: 8px 20px 14px; letter-spacing: -0.03em; }
.months {
  flex-shrink: 0;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0 16px 12px;
  scrollbar-width: none;
  background: transparent;
  border: none;
}
.month-anchor {
  height: 1px; margin: 0; padding: 0; visibility: hidden; pointer-events: none;
}
.months::-webkit-scrollbar { display: none; }
.month-pill {
  flex-shrink: 0; padding: 8px 14px; border-radius: 999px; border: none;
  background: transparent; color: var(--muted); font-size: 15px;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.month-pill.active { background: #fff; color: #000; font-weight: 600; }

.tx-content { padding: 4px 16px 32px; }
.date-group { margin-bottom: 22px; }
.date-header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0 4px 10px; font-size: 15px; font-weight: 600;
}
.tx-card { background: var(--card); border-radius: var(--radius-md); padding: 0 16px; }

/* Profile */
.view-profil {
  background: #1c252e; background-image: none;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
.view-profil.active { display: flex; }
.profile-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 16px 20px 0;
}
.profile-close {
  background: none; border: none; color: #fff; cursor: pointer;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
}
.profile-user { padding: 8px 24px 28px; }
.profile-user h2 { font-size: 28px; font-weight: 700; line-height: 1.15; margin-bottom: 8px; }
.profile-user p { color: var(--muted); font-size: 15px; }
.menu-card {
  background: var(--card3); border-radius: var(--radius-md);
  margin: 0 16px 14px; overflow: hidden;
}
.menu-item {
  display: flex; align-items: center; gap: 14px; padding: 17px 18px;
  color: #fff; text-decoration: none; border: none; background: none;
  width: 100%; font-size: 16px; font-family: inherit; cursor: pointer; text-align: left;
}
.menu-item + .menu-item { border-top: 1px solid rgba(255,255,255,.06); }
.menu-icon {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: none; overflow: hidden;
}
.menu-icon img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; }
.menu-icon svg { width: 20px; height: 20px; color: #fff; }
.menu-icon--circle {
  background: rgba(255,255,255,.08);
}
.profile-footer {
  margin-top: auto;
  text-align: center;
  padding: 24px 20px max(32px, env(safe-area-inset-bottom));
  color: var(--muted); font-size: 13px; line-height: 1.6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.profile-footer a { color: var(--link); text-decoration: none; margin-left: 0; }
.view-profil .avatar {
  width: 44px;
  height: 44px;
  font-size: 13px;
  background: #4a5560;
}

/* Help */
.view-aide {
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.help-list-card { margin-bottom: 16px; }
.help-header { padding: 0 16px; padding-top: max(8px, env(safe-area-inset-top)); }
.help-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding-top: 4px; }
.past-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--card2); border: none; color: #fff;
  padding: 11px 16px; border-radius: 14px; font-size: 15px; font-weight: 500;
  cursor: pointer; font-family: inherit; margin-left: auto; flex-shrink: 0;
}
.past-btn-ico-wrap {
  width: 28px; height: 28px; border-radius: 8px; background: #2f6fed;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.past-btn-ico { width: 18px; height: 18px; object-fit: contain; display: block; }
.help-title { font-size: 28px; font-weight: 700; line-height: 1.2; padding: 8px 0 20px; letter-spacing: -0.02em; }
.search-bar {
  margin: 0 16px 22px; background: var(--card2); border-radius: 999px;
  display: flex; align-items: center; gap: 12px; padding: 15px 18px;
}
.search-bar input {
  flex: 1; background: none; border: none; color: #fff; font-size: 16px; outline: none;
}
.search-bar input::placeholder { color: var(--muted); }
.section-label {
  padding: 0 20px 10px; color: var(--muted); font-size: 12px;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 500;
}
.help-card {
  background: var(--card); border-radius: var(--radius-md);
  margin: 0 16px 18px; overflow: hidden;
}
.help-item {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  color: #fff; text-decoration: none; border: none; background: none;
  width: 100%; font-size: 16px; font-family: inherit; cursor: pointer; text-align: left;
}
.help-item + .help-item { border-top: 1px solid rgba(255,255,255,.06); }
.help-item .chev { margin-left: auto; color: var(--muted); font-size: 18px; }
.help-icon {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: none; overflow: hidden;
}
.help-icon img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: block; }
.help-icon svg { width: 22px; height: 22px; }
.help-bottom {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; padding: 12px 16px 28px;
  background: linear-gradient(transparent, var(--bg0) 45%);
  z-index: 10;
}
.help-bottom-inline {
  margin: 0 16px 28px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.help-bottom-inner {
  background: var(--card2); border-radius: 20px; padding: 16px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.help-bottom span { font-size: 14px; color: var(--muted); line-height: 1.35; flex: 1; min-width: 0; }
.btn-contact {
  background: #3d7cf5; border: none; color: #fff; padding: 13px 18px;
  border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer;
  white-space: nowrap; font-family: inherit; flex-shrink: 0;
}

/* Help categories page */
.help-cat-title { font-size: 22px; font-weight: 700; text-align: center; padding: 12px 20px 20px; }
.help-cat-card { margin-top: 8px; }

/* FAQ article */
.view-article {
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: transparent;
}
.view-article.active { display: flex; }
.article-page-title {
  font-size: 22px; font-weight: 700; line-height: 1.25;
  padding: 0 20px 14px; letter-spacing: -0.02em;
}
.article-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.article-scroll::-webkit-scrollbar { display: none; }
.article-body {
  padding: 0 20px 8px;
  font-size: 15px; line-height: 1.55;
}
.article-body h3 { font-size: 17px; font-weight: 700; margin: 22px 0 10px; }
.article-body h3:first-of-type { margin-top: 4px; }
.article-body p { color: rgba(255,255,255,.92); margin-bottom: 14px; }
.article-body a { color: var(--link); text-decoration: none; }
.article-card {
  background: var(--card); border-radius: var(--radius-md);
  margin: 0 16px 20px; padding: 20px 18px; font-size: 15px; line-height: 1.55;
}
.article-card h3 { font-size: 17px; font-weight: 700; margin: 20px 0 10px; }
.article-card h3:first-child { margin-top: 0; }
.article-card p { color: rgba(255,255,255,.92); margin-bottom: 12px; }
.article-card a { color: var(--link); text-decoration: none; }
.feedback-card {
  background: var(--card2); border-radius: var(--radius-md);
  margin: 8px 16px 18px; padding: 16px 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.feedback-card span { font-size: 15px; }
.feedback-btns { display: flex; gap: 12px; }
.feedback-btn {
  background: none; border: none; color: var(--link); cursor: pointer;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; padding: 0;
}

/* Chat — Revolut Support (capture) */
.view-chat {
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  background: #1a222e;
}
.view-chat.active {
  display: flex;
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  z-index: 200;
}
.chat-top {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  padding: 10px 12px 8px;
  padding-top: max(10px, env(safe-area-inset-top));
  flex-shrink: 0;
  background: #1a222e;
}
.chat-close {
  width: 40px; height: 40px;
  border: none; background: transparent; color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.chat-top-spacer { width: 40px; height: 40px; justify-self: end; }
.chat-header-bar { text-align: center; padding: 0 4px; }
.chat-header-bar h2 { font-size: 17px; font-weight: 700; color: #fff; line-height: 1.2; }
.chat-header-bar p { font-size: 12px; color: #9aa3ad; margin-top: 2px; line-height: 1.2; }
.chat-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  background: #1a222e;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 16px 16px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.chat-date {
  text-align: center; color: #9aa3ad; font-size: 13px; font-weight: 500;
  margin: 8px 0 18px;
}
.chat-row {
  display: flex; align-items: flex-end; gap: 8px; margin-bottom: 12px;
}
.chat-row.user { justify-content: flex-end; }
.chat-row.support { justify-content: flex-start; }
.chat-avatar-r {
  width: 28px; height: 28px; border-radius: 50%; background: #fff; color: #111;
  font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; letter-spacing: -0.04em; margin-bottom: 2px;
}
.chat-bubble {
  position: relative; max-width: 78%; border-radius: 16px;
  padding: 11px 12px 8px; font-size: 15px; line-height: 1.35; color: #fff;
}
.chat-row.user .chat-bubble {
  background: #3a4352; border-bottom-right-radius: 6px;
}
.chat-row.user .chat-bubble::after { display: none; }
.chat-user-line { display: block; }
.chat-user-text {
  display: block; white-space: pre-wrap; word-break: break-word;
}
.chat-user-time {
  display: block; text-align: right; font-size: 11px; color: #9aa3ad; margin-top: 6px;
}
.chat-row.support .chat-bubble {
  background: #2c3545; border-bottom-left-radius: 6px;
}
.chat-row.support .chat-bubble::after { display: none; }
.chat-assistant-label { display: none; }
.chat-support-content { display: block; }
.chat-support-text { color: #fff; word-break: break-word; font-weight: 400; }
.chat-bubble-time {
  text-align: right; font-size: 11px; color: #9aa3ad; margin-top: 6px;
}
.chat-typing {
  background: #2c3545; border-radius: 16px; padding: 12px 16px;
  display: inline-flex; gap: 5px; align-items: center;
}
.chat-typing::after { display: none; }
.chat-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: #9aa3ad;
  animation: chat-dot 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot {
  0%, 80%, 100% { opacity: .35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}
.chat-input-bar {
  position: relative;
  flex-shrink: 0;
  z-index: 30;
  width: 100%;
  padding: 8px 14px max(12px, env(safe-area-inset-bottom));
  background: #1a222e;
  border-top: 1px solid rgba(255,255,255,.06);
  box-sizing: border-box;
}
.chat-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #2c3545;
  border-radius: 22px;
  padding: 6px 8px 6px 16px;
  min-height: 48px;
  border: none;
  width: 100%;
  box-sizing: border-box;
}
.chat-input input {
  flex: 1 1 auto;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 16px;
  line-height: 1.3;
  font-family: inherit;
  min-width: 0;
  width: 100%;
  height: 36px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}
.chat-input input::placeholder { color: #8e96a0; }
.chat-icon-btn { display: none; }
.chat-send-btn {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: transparent; color: #8e96a0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0; flex: 0 0 40px;
  -webkit-tap-highlight-color: transparent;
}
.chat-send-btn:not(:disabled) { color: #fff; }
.chat-send-btn:disabled { opacity: .55; cursor: default; }
.chat-support-text p { margin: 0 0 8px; }
.chat-support-text p:last-child { margin-bottom: 0; }
.chat-support-text p:empty,
.chat-support-text div:empty { display: none; }
.chat-support-text > p:has(> br:only-child):first-child,
.chat-support-text > div:has(> br:only-child):first-child,
.chat-support-text > br:first-child {
  display: none;
}
.chat-support-text ul, .chat-support-text ol { margin: 8px 0; padding-left: 20px; }
.chat-support-text li { margin: 4px 0; }
.chat-support-text a { color: #6ea8ff; text-decoration: underline; }
.chat-support-text b, .chat-support-text strong { font-weight: 700; }
.chat-support-text h3 { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: #fff; }
.chat-support-text blockquote {
  margin: 8px 0; padding-left: 10px; border-left: 3px solid rgba(255,255,255,.25);
}
.chat-support-text mark { background: #fff59d; color: #111; padding: 0 2px; border-radius: 2px; }
.chat-support-text hr { border: none; border-top: 1px solid rgba(255,255,255,.2); margin: 10px 0; }
.chat-edited { font-size: 11px; color: #8e96a0; margin-left: 4px; }
.chat-send-btn:not(:disabled):active { opacity: .75; }

body.chat-open {
  overflow: hidden;
  height: 100%;
}
body.chat-open .bottom-nav {
  display: none !important;
}

/* Bottom nav */
.bottom-nav {
  position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 28px); max-width: 398px;
  background: rgba(28, 36, 45, .96); backdrop-filter: blur(16px);
  border-radius: 999px; display: flex; padding: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
  z-index: 50;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 8px 4px; border: none; background: none; color: var(--muted);
  font-family: inherit; cursor: pointer; border-radius: 999px; min-width: 0;
}
.nav-item.active { background: rgba(255,255,255,.12); color: #fff; }
.nav-item svg,
.nav-item .nav-ico { width: 24px; height: 24px; display: block; object-fit: contain; color: inherit; }
.nav-label {
  font-size: 9px; font-weight: 600; line-height: 1.1; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 100%; letter-spacing: -0.01em;
}

.empty-msg { padding: 32px 20px; text-align: center; color: var(--muted); font-size: 14px; }
