:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --g: rgba(255, 255, 255, .97);
  --gb: rgba(55, 45, 96, .12);
  --ink: #211a3a;
  --mut: #756f86;
  --vio: #6952dc;
  --pink: #d94f8f;
  --cy: #168cac;
  --gold: #ad751b;
  --up: #087c58;
  --dn: #c23b55;
  --a1: .12;
}

html {
  color-scheme: light !important;
  background: var(--bg);
}

body {
  background-color: var(--bg);
  color: var(--ink);
}

button,
a,
input,
select {
  color-scheme: light;
}

.glass,
.ib,
.bell {
  box-shadow: 0 8px 24px rgba(37, 29, 75, .045);
}

/* Keep scrolling responsive in Telegram's embedded browser. */
.glass,
.ib,
.dock,
.cb button {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.sum .arc,
.sum::after,
.ban svg,
.ban::after,
.av::before {
  animation: none !important;
}

.bell svg,
.play svg,
.dock .i {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(452px, calc(100% - 24px));
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 2px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  padding: 5px;
  border: 1px solid rgba(199, 215, 228, .7);
  border-radius: 22px;
  background: rgba(250, 253, 255, .94);
  box-shadow: 0 8px 26px rgba(35, 70, 102, .12), inset 0 1px 0 #fff;
  backdrop-filter: blur(8px) saturate(130%) !important;
  -webkit-backdrop-filter: blur(8px) saturate(130%) !important;
  isolation: isolate;
  view-transition-name: nav-dock;
}

.dock button {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  height: 56px;
  padding: 5px 2px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  color: #536c81;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: transform .16s ease, color .18s ease, background .18s ease, box-shadow .18s ease;
}

.dock button svg,
.dock button .i {
  width: 21px;
  height: 21px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transform: none;
  filter: none;
  color: inherit;
}

.dock button.on,
.dock button[aria-current="page"] {
  color: #176e9f;
  font-weight: 700;
  background: #e4eef7;
  box-shadow: none;
}

.dock button.on svg,
.dock button[aria-current="page"] svg {
  color: #1684b5;
  fill: none;
  filter: none;
  transform: none;
}

.dock button:active {
  transform: scale(.94);
}

.dock button:focus-visible {
  outline: 2px solid #3eabd1;
  outline-offset: -2px;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root) { animation: 130ms ease-out both page-fade-out; }
::view-transition-new(root) { animation: 200ms ease-out both page-fade-in; }
::view-transition-old(nav-dock),
::view-transition-new(nav-dock) { animation-duration: 180ms; }

@keyframes page-fade-out { to { opacity: .55; } }
@keyframes page-fade-in { from { opacity: .55; } }

@media (prefers-reduced-motion: reduce) {
  .dock button { transition: none; }
  ::view-transition-old(root),
  ::view-transition-new(root),
  ::view-transition-old(nav-dock),
  ::view-transition-new(nav-dock) { animation: none; }
}

html[data-fast-nav] .card,
html[data-fast-nav] .sum,
html[data-fast-nav] .ov,
html[data-fast-nav] .id,
html[data-fast-nav] .list .r {
  animation: none !important;
}

html[data-fast-nav] .ring .v {
  animation: none !important;
  stroke-dashoffset: var(--o);
}

html[data-fast-nav] .bar i {
  animation: none !important;
  width: var(--w);
}

.play svg {
  width: 20px;
  height: 20px;
}

.play svg .filled {
  fill: currentColor;
  stroke: none;
}

.theme-status {
  padding: 4px 12px;
  border: 1px solid var(--gb);
  border-radius: 999px;
  color: var(--vio);
  background: rgba(105, 82, 220, .08);
  font-size: 12px;
}
