:root {
  --bg: #090d14;
  --bg-2: #111827;
  --ink: #f6f0e8;
  --muted: rgba(246, 240, 232, .62);
  --soft: rgba(246, 240, 232, .38);
  --glass: rgba(255, 255, 255, .075);
  --glass-strong: rgba(255, 255, 255, .13);
  --line: rgba(255, 255, 255, .17);
  --line-strong: rgba(255, 255, 255, .28);
  --shadow: 0 24px 80px rgba(0, 0, 0, .42);
  --amber: #f2b15f;
  --ember: #ff7a4f;
  --cyan: #7ed7ff;
  --blue: #5e8cff;
  --good: #78dfb2;
  --warn: #f2b15f;
  --bad: #ff796d;
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --tg-top-offset: 58px;
  --tg-bottom-offset: 18px;
  --page-gap: 12px;
  font-family: Manrope, Avenir Next, Trebuchet MS, Verdana, sans-serif;
}

.telegram-webapp {
  --tg-top-offset: 88px;
}

* { box-sizing: border-box; }

html {
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: var(--bg);
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}

body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -12%, rgba(94, 140, 255, .35), transparent 32%),
    radial-gradient(circle at 92% 8%, rgba(255, 122, 79, .28), transparent 34%),
    linear-gradient(165deg, #070a10 0%, #111827 44%, #15100d 100%);
  overflow: hidden;
  overscroll-behavior: none;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.noise-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 82%);
}

.orb {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(28px);
  opacity: .55;
  animation: float 18s ease-in-out infinite alternate;
}

.orb-one { width: 260px; height: 260px; left: -110px; top: 80px; background: rgba(94, 140, 255, .45); }
.orb-two { width: 240px; height: 240px; right: -120px; top: 260px; background: rgba(242, 177, 95, .38); animation-delay: -5s; }
.orb-three { width: 220px; height: 220px; left: 20%; bottom: -120px; background: rgba(126, 215, 255, .2); animation-delay: -9s; }

@keyframes float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(24px, -34px, 0) scale(1.08); }
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  height: 100dvh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + var(--tg-top-offset)) 14px calc(env(safe-area-inset-bottom, 0px) + var(--tg-bottom-offset));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.app-header {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 0 var(--page-gap);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.dialog-mode .app-header {
  display: none;
}

body.dialog-mode .app-shell {
  padding-top: calc(env(safe-area-inset-top, 0px) + var(--tg-top-offset));
}

.glass-card,
.account-button,
.sync-pill,
.icon-button,
.date-tile,
.chat-tile,
.account-item,
.search {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.055));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 18px 50px rgba(0,0,0,.26);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
}

.account-button {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  color: var(--ink);
  padding: 8px 12px 8px 9px;
  cursor: pointer;
  text-align: left;
}

.account-dot,
.dialog-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #080b10;
  font-weight: 950;
  background: conic-gradient(from 220deg, var(--amber), var(--cyan), var(--blue), var(--amber));
}

.account-dot { width: 38px; height: 38px; border-radius: 15px; font-size: 12px; }
.account-copy { min-width: 0; display: grid; gap: 1px; }
.account-kicker,
.eyebrow {
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 10px;
  font-weight: 900;
}
.account-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }

.sync-pill {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 132px;
  border-radius: 999px;
  padding: 11px 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  overflow: hidden;
}

.sync-pill span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync-led { width: 8px; height: 8px; border-radius: 99px; background: var(--good); box-shadow: 0 0 0 6px rgba(120,223,178,.12); }

.view { display: none; }
.view.active { display: block; animation: rise .28s ease both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 16px 18px 15px;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -52% 18%;
  height: 160px;
  background: radial-gradient(circle, rgba(242,177,95,.35), transparent 65%);
  pointer-events: none;
}

.eyebrow { margin: 0 0 8px; }
h1, h2 { margin: 0; letter-spacing: -.055em; }
h1 { font-size: clamp(32px, 9vw, 48px); line-height: .9; max-width: 360px; }
h2 { font-size: 24px; line-height: 1; }
.hero-copy { position: relative; margin: 10px 0 0; color: var(--muted); line-height: 1.35; max-width: 360px; font-size: 14px; }
.hero-actions { margin-top: 14px; display: flex; gap: 10px; }

.panel { border-radius: var(--radius-xl); padding: 14px; margin-top: var(--page-gap); }
.section-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.mini-counter { display: inline-flex; align-items: center; min-height: 30px; border-radius: 999px; padding: 7px 11px; color: var(--soft); background: rgba(255,255,255,.08); font-weight: 900; font-size: 12px; }

.date-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}

.date-grid::-webkit-scrollbar { display: none; }

.date-tile,
.chat-tile,
.account-item,
.icon-button {
  color: var(--ink);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.date-tile:active,
.chat-tile:active,
.account-item:active,
.icon-button:active,
.account-button:active { transform: scale(.985); }

.date-tile {
  flex: 0 0 142px;
  min-height: 98px;
  border-radius: 26px;
  padding: 14px;
  text-align: left;
  scroll-snap-align: start;
}

.date-tile.active,
.chat-tile.active,
.account-item.active {
  border-color: rgba(242,177,95,.62);
  background: linear-gradient(145deg, rgba(242,177,95,.24), rgba(255,255,255,.08));
}

.date-main { font-size: 27px; line-height: .95; font-weight: 950; letter-spacing: -.07em; }
.date-sub { margin-top: 8px; color: var(--muted); font-size: 12px; font-weight: 750; }
.date-foot { margin-top: 12px; color: var(--amber); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }

.chat-grid { display: grid; gap: 11px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stats-tile {
  width: 100%;
  min-height: 118px;
  border-radius: 26px;
  padding: 14px;
  text-align: left;
  color: var(--ink);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.055));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 18px 50px rgba(0,0,0,.26);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  cursor: pointer;
}
.stats-tile:active { transform: scale(.985); }
.stats-tile.success.active {
  border-color: rgba(120,223,178,.55);
  background: linear-gradient(145deg, rgba(120,223,178,.18), rgba(255,255,255,.07));
}
.stats-tile.failed.active {
  border-color: rgba(255,121,109,.55);
  background: linear-gradient(145deg, rgba(255,121,109,.18), rgba(255,255,255,.07));
}
.stats-kicker {
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 10px;
  font-weight: 900;
}
.stats-value {
  margin-top: 16px;
  font-size: clamp(28px, 8vw, 40px);
  line-height: .9;
  font-weight: 950;
  letter-spacing: -.07em;
}
.stats-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.stats-date-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.stats-failed-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.stats-chat-tile {
  min-height: 136px;
}
.chat-tile {
  width: 100%;
  min-height: 148px;
  border-radius: 30px;
  padding: 16px;
  text-align: left;
}
.global-chat-tile {
  min-height: 132px;
}
.chat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.chat-slot { color: var(--amber); font-size: 11px; font-weight: 950; letter-spacing: .16em; text-transform: uppercase; }
.chat-user { margin-top: 15px; font-size: clamp(25px, 8vw, 38px); line-height: .95; font-weight: 950; letter-spacing: -.07em; word-break: break-word; }
.chat-meta { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }

.status-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 7px 10px; font-size: 10px; font-weight: 950; white-space: nowrap; background: rgba(255,255,255,.09); color: var(--soft); max-width: 128px; overflow: hidden; text-overflow: ellipsis; }
.status-pill.good { background: rgba(120,223,178,.15); color: var(--good); }
.status-pill.warn { background: rgba(242,177,95,.16); color: var(--warn); }
.status-pill.bad { background: rgba(255,121,109,.15); color: var(--bad); }
.status-pill.muted { background: rgba(255,255,255,.08); color: var(--soft); }

.dialog-view.active { min-height: calc(100vh - var(--tg-top-offset) - var(--tg-bottom-offset)); }
.stats-view.active { min-height: calc(100vh - var(--tg-top-offset) - var(--tg-bottom-offset)); }
.dialog-shell { display: grid; grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - var(--tg-top-offset) - var(--tg-bottom-offset) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); min-height: 520px; overflow: hidden; border-radius: 32px; }
.stats-shell { min-height: 520px; }
.stats-body {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 16px 12px 20px;
}
.dialog-header { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line); }
.icon-button { width: 42px; height: 42px; border-radius: 16px; display: grid; place-items: center; color: var(--ink); font-size: 27px; line-height: 1; }
.dialog-avatar { width: 42px; height: 42px; border-radius: 16px; font-size: 14px; }
.dialog-title-block { min-width: 0; display: grid; gap: 3px; }
.dialog-title-block strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.dialog-title-block span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }

.event-rail { display: none; }
.event-rail::-webkit-scrollbar { display: none; }
.event-chip { flex: 0 0 auto; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 8px 10px; color: var(--muted); background: rgba(255,255,255,.06); font-size: 11px; font-weight: 850; }

.messages {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 12px 20px;
  background:
    radial-gradient(circle at 8% 5%, rgba(94,140,255,.14), transparent 32%),
    radial-gradient(circle at 82% 90%, rgba(242,177,95,.12), transparent 32%);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.message { max-width: 84%; border: 1px solid var(--line); padding: 11px 13px 8px; border-radius: 22px; line-height: 1.42; white-space: pre-wrap; box-shadow: 0 12px 34px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.16); }
.message.in { align-self: flex-start; color: var(--ink); background: rgba(255,255,255,.11); border-bottom-left-radius: 8px; }
.message.out { align-self: flex-end; color: #120c07; background: linear-gradient(145deg, rgba(242,177,95,.96), rgba(255,122,79,.88)); border-color: rgba(255,222,181,.5); border-bottom-right-radius: 8px; }
.message-text { font-size: 14px; }
.message-time { margin-top: 7px; font-size: 10px; opacity: .62; text-align: right; }
.diagnostic-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 4px;
}
.confirmation-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 4px;
}
.confirmation-kicker {
  align-self: center;
  width: fit-content;
  border: 1px solid rgba(120,223,178,.32);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--good);
  background: rgba(120,223,178,.12);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.confirmation-card {
  border: 1px solid rgba(120,223,178,.35);
  border-radius: 24px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(120,223,178,.12), rgba(255,255,255,.07));
  box-shadow: 0 18px 46px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.16);
}
.diagnostic-kicker {
  align-self: center;
  width: fit-content;
  border: 1px solid rgba(255,121,109,.32);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--bad);
  background: rgba(255,121,109,.12);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.diagnostic-card {
  border: 1px solid rgba(255,121,109,.35);
  border-radius: 24px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(255,121,109,.16), rgba(255,255,255,.07));
  box-shadow: 0 18px 46px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.16);
}
.diagnostic-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.diagnostic-reason {
  color: var(--bad);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: -.02em;
  word-break: break-word;
}
.diagnostic-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}
.diagnostic-shot-link {
  display: block;
  margin-top: 10px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.22);
}
.diagnostic-shot {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: rgba(0,0,0,.28);
}
.empty-state { align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.empty-mark { width: 86px; height: 86px; border-radius: 30px; display: grid; place-items: center; color: #080b10; font-weight: 950; background: conic-gradient(from 230deg, var(--amber), var(--cyan), var(--blue), var(--amber)); box-shadow: 0 28px 70px rgba(0,0,0,.3); transform: rotate(-7deg); }

.sheet-backdrop { position: fixed; inset: 0; z-index: 18; background: rgba(0,0,0,.52); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.account-sheet { position: fixed; z-index: 19; left: 0; right: 0; bottom: 0; width: min(100%, 560px); max-height: min(82vh, 720px); margin: 0 auto; padding: 10px 14px calc(env(safe-area-inset-bottom, 0px) + var(--tg-bottom-offset)); border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 34px 34px 0 0; background: linear-gradient(170deg, rgba(18,24,36,.92), rgba(9,13,20,.94)); box-shadow: 0 -24px 90px rgba(0,0,0,.58), inset 0 1px 0 rgba(255,255,255,.16); backdrop-filter: blur(34px) saturate(1.35); -webkit-backdrop-filter: blur(34px) saturate(1.35); transform: translateY(110%); transition: transform .24s ease; }
.account-sheet.open { transform: translateY(0); }
.sheet-handle { width: 48px; height: 5px; border-radius: 99px; margin: 0 auto 14px; background: rgba(255,255,255,.28); }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sheet-actions { display: flex; align-items: center; gap: 7px; }
.sheet-action-button {
  min-width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255,255,255,.08);
  font-weight: 950;
}
.sheet-action-button.danger {
  color: var(--bad);
  border-color: rgba(255,121,109,.4);
  background: rgba(255,121,109,.13);
}
.sheet-action-button.accent {
  color: #0d1118;
  border-color: rgba(126,215,255,.4);
  background: linear-gradient(135deg, var(--cyan), var(--amber));
}
.sheet-action-button.wide {
  min-width: 148px;
}
.sheet-action-button:disabled {
  opacity: .42;
}
.search { width: 100%; outline: none; color: var(--ink); border-radius: 22px; padding: 14px 15px; background: rgba(255,255,255,.08); }
.search::placeholder { color: rgba(246,240,232,.38); }
.sheet-meta { color: var(--muted); font-size: 12px; font-weight: 850; margin: 12px 2px 9px; }
.account-list { display: grid; gap: 10px; max-height: calc(min(82vh, 720px) - 178px); overflow: auto; padding-bottom: 4px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.account-item { width: 100%; border-radius: 24px; padding: 13px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; text-align: left; }
.account-avatar { width: 42px; height: 42px; border-radius: 16px; display: grid; place-items: center; color: #080b10; font-weight: 950; font-size: 12px; background: linear-gradient(135deg, var(--amber), var(--cyan)); }
.account-name { font-weight: 950; font-size: 17px; letter-spacing: -.035em; }
.account-phone { color: var(--muted); font-size: 12px; margin-top: 2px; }
.account-current { grid-column: 2 / -1; color: var(--soft); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-badge { border-radius: 999px; padding: 6px 8px; color: var(--soft); background: rgba(255,255,255,.08); font-weight: 950; font-size: 11px; }
.account-badge.hot { color: var(--amber); background: rgba(242,177,95,.13); }
.all-account-item {
  border-color: rgba(126,215,255,.42);
  background: linear-gradient(145deg, rgba(126,215,255,.16), rgba(255,255,255,.07));
}
.account-item.delete-selected {
  border-color: rgba(255,121,109,.7);
  background: linear-gradient(145deg, rgba(255,121,109,.22), rgba(255,255,255,.08));
}
.account-item.delete-disabled {
  opacity: .52;
}
.account-sheet.delete-mode .account-item:not(.delete-disabled) .account-badge {
  min-width: 30px;
  text-align: center;
  color: var(--bad);
  background: rgba(255,121,109,.12);
}

.add-account-modal {
  position: fixed;
  z-index: 20;
  left: 50%;
  top: 50%;
  width: min(calc(100% - 16px), 560px);
  max-height: min(88vh, 860px);
  transform: translate(-50%, -46%) scale(.96);
  opacity: 0;
  pointer-events: none;
  border-radius: 34px;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  overflow: auto;
  overscroll-behavior: contain;
  transition: transform .2s ease, opacity .2s ease;
}
.add-account-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.add-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.add-status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.08);
  color: var(--soft);
  font-size: 12px;
  font-weight: 950;
}
.add-status-pill.good { background: rgba(120,223,178,.15); color: var(--good); }
.add-status-pill.warn { background: rgba(242,177,95,.16); color: var(--warn); }
.add-status-pill.bad { background: rgba(255,121,109,.15); color: var(--bad); }
.add-account-body {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-bottom: 6px;
}
.add-form-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.04em;
}
.add-account-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}
.add-input {
  font-size: 16px;
}
.add-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.add-account-shot-wrap {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.24);
}
.add-account-shot {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  background: rgba(0,0,0,.25);
}

@media (min-width: 720px) {
  :root { --tg-top-offset: 24px; }
  .telegram-webapp { --tg-top-offset: 32px; }
  .date-tile { flex-basis: 154px; }
  .chat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dialog-shell { height: calc(100vh - 44px); }
}

@media (max-width: 380px) {
  :root { --tg-top-offset: 62px; --page-gap: 10px; }
  .telegram-webapp { --tg-top-offset: 92px; }
  .app-shell { padding-left: 10px; padding-right: 10px; }
  h1 { font-size: 36px; }
  .stats-grid { grid-template-columns: 1fr; }
  .date-tile { min-height: 104px; }
  .chat-user { font-size: 25px; }
  .sync-pill { max-width: 108px; }
}
