/* ======================================
   Rampaga base.css — v1.1
   Назначение: базовые глобальные стили проекта
   ====================================== */

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  height: 100%;
  background: var(--page-background-color, #eef2f6);
  color: var(--text-color, #20262d);
  font-family: var(--font-family-base, sans-serif);
  font-size: var(--font-size-base, 1rem);
  line-height: var(--line-height-base, 1.6);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-skip-ink: auto;
}

img,
picture,
video,
canvas {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

::selection {
  background: var(--accent-soft-color, rgba(22, 119, 200, 0.12));
  color: var(--text-strong-color, #181c22);
}

:focus-visible {
  outline: 2px solid var(--accent-hover-color, #0f6f8f);
  outline-offset: 2px;
}

.layout {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -5rem;
  left: 0.75rem;
  z-index: 2000;
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-md, 0.875rem);
  background: var(--text-strong-color, #181c22);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.16);
  transition: top var(--transition-fast, 150ms ease);

  &:focus,
  &:focus-visible {
    top: 0.75rem;
  }
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-soft-color, rgba(22, 119, 200, 0.12)) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--accent-soft-color, rgba(22, 119, 200, 0.12));
  border-radius: 100vw;
}

:root {
  --exposer-bg: rgba(21, 25, 29, 0.9);
  --exposer-blur: blur(0.3rem);
  --exposer-gutter-x: 0;
  --exposer-gutter-y: 0;
  --exposer-el-size: 46px;
  --exposer-btn: rgba(24, 24, 27, 0.65);
  --exposer-btn-hover: rgba(70, 70, 73, 0.65);
  --exposer-color: rgb(219, 219, 219);
  --exposer-color-hover: rgb(255, 255, 255);
  --exposer-icon: 16px;
  --exposer-radius: 50%;
}

.exposer {
  display: none;
  background-color: var(--exposer-bg);
  backdrop-filter: var(--exposer-blur);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 4001;
}
.exposer.exposer--open {
  display: flex;
}
.exposer--lock {
  overflow: hidden;
}

.exposer__toolbar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: var(--exposer-gutter-y) var(--exposer-gutter-x);
  height: calc(var(--exposer-el-size) + var(--exposer-gutter-y));
  position: absolute;
  right: 0;
  left: 0;
  top: 0;
  z-index: 100;
  pointer-events: none;
}

.exposer__toolbar__row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.exposer__counter {
  display: inline-flex;
  font-weight: normal;
  font-size: 16px;
  color: var(--exposer-color);
  padding-inline: 16px;
}

.e-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--exposer-el-size);
  aspect-ratio: 1;
  background-color: var(--exposer-btn);
  border: 0 none;
  transition: 0.3s ease;
  color: var(--exposer-color);
  pointer-events: all;
}
.e-button:hover {
  color: var(--exposer-color-hover);
  background-color: var(--exposer-btn-hover);
}
.e-button svg {
  width: var(--exposer-icon);
  height: var(--exposer-icon);
}

.exposer__image {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
}

.exposer__inner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(1);
  cursor: grab;
  transition: 0.1s linear;
  will-change: transform;
}

.exposer__inner:active {
  cursor: grabbing;
}

.exposer__image img {
  display: block;
  max-width: 98vw;
  max-height: 98vh;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  will-change: width, height, transform;
}

/* .exposer__image {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.exposer__image img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(1);
  max-width: 98vw;
  max-height: 98vh;
  width: auto;
  height: auto;
  object-fit: contain;
	user-select: none;
  transition: 0.3s ease;
  will-change: width, height, transform;
} */

.exposer__navigation {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #f0f8ff;
  width: calc(var(--exposer-el-size) * 1.1);
  border-radius: var(--exposer-radius);
}

.exposer__navigation::before {
  content: "";
  position: absolute;
  top: -30px;
  right: -20px;
  left: -20px;
  bottom: -30px;
  z-index: 1;
}

.exposer__navigation svg {
  width: calc(var(--exposer-icon) * 2);
  height: calc(var(--exposer-icon) * 2);
}

.exposer__navigation.is-next {
  right: 1vw;
}

.exposer__navigation.is-prev {
  left: 1vw;
}

.exposer__navigation.is-next svg {
  transform: rotate(180deg);
}

.exposer .preloader {
  animation: spin 1s linear infinite;
  border: 5px solid rgb(15, 59, 70);
  border-top: 5px solid rgb(157, 236, 255);
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  height: 35px;
  width: 35px;
  border-radius: 50%;
}

.exposer--loading img {
  opacity: 0;
}

.exposer--loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #1e90ff;
  border-radius: 50%;
  animation: exposerSpinner 1s linear infinite;
}

@keyframes exposerSpinner {
  to {
    transform: rotate(360deg);
  }
}

.share-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 0.9rem;
  /* border: 1px solid var(--border-color, rgba(17, 24, 39, 0.08)); */
  border-radius: var(--radius-pill, 999px);
  background: color-mix(in srgb, var(--surface-subtle-color, #e8eef3) 82%, white);
  color: var(--text-strong-color, #181c22);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  user-select: none;
  transition:
    background-color var(--transition-fast, 150ms ease),
    color var(--transition-fast, 150ms ease),
    border-color var(--transition-fast, 150ms ease),
    transform var(--transition-fast, 150ms ease);

  & svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
    flex: 0 0 auto;
  }

  &:hover,
  &:focus-visible {
    background: #dbe5ec;
    color: var(--text-strong-color, #181c22);
  }

  &:active {
    transform: translateY(1px);
  }
}

.share-button--meta {
  min-height: 2rem;
  padding-inline: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.share-fallback {
  position: fixed;
  z-index: 9999;
  min-width: 220px;
  padding: 0.25rem;
  background: color-mix(in srgb, var(--surface-color, #f7f9fb) 92%, white);
  border: 1px solid var(--border-color, rgba(17, 24, 39, 0.08));
  border-radius: 0.875rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);

  & .share-fallback__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.3rem 0.55rem;
    border: 0;
    border-radius: 0.75rem;
    background: transparent;
    color: var(--text-color, #20262d);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;

    &:hover,
    &:focus-visible {
      background: color-mix(in srgb, var(--surface-subtle-color, #e8eef3) 78%, white);
    }

    & svg {
      width: 22px;
      height: 22px;
      fill: inherit;
    }

    &:active {
      background: #dbe5ec;
    }
  }
}

@media (max-width: 800px) {
  .article-meta {
    & .article-meta__actions {
      width: 100%;
    }
  }

  .share-button--meta {
    min-height: 2.25rem;
  }
}

@media (max-width: 640px) {
  .article-share {
    margin-top: 1.5rem;
  }

  .share-button--after {
    width: 100%;
  }
}

.publisher-panel {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1201;
  width: min(420px, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 1rem);
  border: 1px solid var(--publisher-panel-border-color);
  border-radius: calc(var(--radius-lg) + 0.25rem);
  background: var(--publisher-panel-background);
  box-shadow: var(--publisher-panel-shadow);
  backdrop-filter: var(--publisher-panel-backdrop);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.publisher-panel.is-collapsed {
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem);
}

.publisher-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.875rem;
  border-bottom: 1px solid var(--publisher-panel-border-color);
}

.publisher-panel__head-info {
  min-width: 0;
}

.publisher-panel__eyebrow {
  margin-bottom: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-color);
}

.publisher-panel__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-strong-color);
}

.publisher-panel__meta {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted-color);
}

.publisher-panel__collapse {
  appearance: none;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--publisher-panel-border-color);
  border-radius: var(--radius-pill);
  background: var(--publisher-button-secondary-background);
  color: var(--publisher-button-secondary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.publisher-panel__collapse:hover,
.publisher-panel__fab:hover {
  transform: translateY(-1px);
}

.publisher-panel__collapse svg,
.publisher-panel__fab svg {
  width: 1rem;
  height: 1rem;
}

.publisher-panel__body {
  display: grid;
  gap: 0.75rem;
  padding: 0.875rem;
  overflow: auto;
}

.publisher-panel__summary {
  display: grid;
  gap: 0.28rem;
  padding: 0.75rem;
  border: 1px solid var(--publisher-card-border-color);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--publisher-card-selected-background), transparent 60%), var(--publisher-card-background);
}

.publisher-panel__summary-label {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted-color);
}

.publisher-panel__summary-title {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-strong-color);
}

.publisher-panel__summary-note {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-soft-color);
}

.publisher-panel__notice {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--publisher-note-border-color);
  border-radius: var(--radius-md);
  background: var(--publisher-note-background);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-soft-color);
}

.publisher-panel__notice[hidden] {
  display: none;
}

.publisher-panel__notice--success {
  border-color: color-mix(in srgb, var(--publisher-success-color) 18%, transparent);
  background: var(--publisher-success-background);
  color: var(--publisher-success-color);
}

.publisher-panel__notice--error {
  border-color: color-mix(in srgb, var(--publisher-error-color) 18%, transparent);
  background: var(--publisher-error-background);
  color: var(--publisher-error-color);
}

.publisher-panel__notice--info {
  border-color: color-mix(in srgb, var(--publisher-pending-color) 18%, transparent);
  background: var(--publisher-pending-background);
  color: var(--publisher-pending-color);
}

.publisher-panel__channels {
  display: grid;
  gap: 0.55rem;
}

.publisher-panel__channel {
  display: grid;
  gap: 0.45rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--publisher-card-border-color);
  border-radius: var(--radius-md);
  background: var(--publisher-card-background);
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

.publisher-panel__channel[data-selected="1"] {
  background: var(--publisher-card-selected-background);
  border-color: var(--publisher-card-selected-border-color);
}

.publisher-panel__channel[data-state="failed"] {
  border-color: color-mix(in srgb, var(--publisher-error-color) 22%, var(--publisher-card-border-color));
}

.publisher-panel__channel[data-state="sent"] {
  border-color: color-mix(in srgb, var(--publisher-success-color) 24%, var(--publisher-card-border-color));
}

.publisher-panel__channel-top,
.publisher-panel__channel-middle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.publisher-panel__channel-info {
  min-width: 0;
}

.publisher-panel__channel-name {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-strong-color);
}

.publisher-panel__channel-caption {
  margin-top: 0.12rem;
  font-size: 0.74rem;
  line-height: 1.28;
  color: var(--text-muted-color);
}

.publisher-panel__badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.26rem 0.62rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  line-height: 1;
  font-weight: 700;
  user-select: none;
  background: var(--publisher-idle-background);
  color: var(--publisher-idle-color);
}

.publisher-panel__badge--idle {
  background: var(--publisher-idle-background);
  color: var(--publisher-idle-color);
}

.publisher-panel__badge--pending,
.publisher-panel__badge--queued {
  background: var(--publisher-pending-background);
  color: var(--publisher-pending-color);
}

.publisher-panel__badge--success {
  background: var(--publisher-success-background);
  color: var(--publisher-success-color);
}

.publisher-panel__badge--error {
  background: var(--publisher-error-background);
  color: var(--publisher-error-color);
}

.publisher-panel__badge--disabled {
  background: var(--publisher-disabled-background);
  color: var(--publisher-disabled-color);
}

.publisher-panel__toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  cursor: pointer;
  user-select: none;
}

.publisher-panel__toggle-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.publisher-panel__toggle-ui {
  position: relative;
  width: 2.5rem;
  height: 1.45rem;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--publisher-switch-background);
  transition: background var(--transition-fast);
}

.publisher-panel__toggle-thumb {
  position: absolute;
  top: 0.16rem;
  left: 0.16rem;
  width: 1.13rem;
  height: 1.13rem;
  border-radius: 50%;
  background: var(--publisher-switch-thumb);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  transition: transform var(--transition-fast);
}

.publisher-panel__toggle-input:checked + .publisher-panel__toggle-ui {
  background: var(--publisher-switch-active-background);
}

.publisher-panel__toggle-input:checked + .publisher-panel__toggle-ui .publisher-panel__toggle-thumb {
  transform: translateX(1.03rem);
}

.publisher-panel__toggle-input:focus-visible + .publisher-panel__toggle-ui {
  outline: 2px solid color-mix(in srgb, var(--accent-color) 45%, transparent);
  outline-offset: 2px;
}

.publisher-panel__toggle-text {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-soft-color);
}

.publisher-panel__channel-note {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--publisher-note-border-color);
  border-radius: var(--radius-sm);
  background: var(--publisher-note-background);
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--text-soft-color);
}

.publisher-panel__channel-note[hidden] {
  display: none;
}

.publisher-panel__channel-action,
.publisher-panel__button,
.publisher-panel__fab {
  appearance: none;
  border: 1px solid transparent;
  font: inherit;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    opacity var(--transition-fast);
}

.publisher-panel__channel-action {
  min-height: 1.9rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--publisher-button-secondary-background);
  color: var(--publisher-button-secondary-color);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.publisher-panel__channel-action:hover,
.publisher-panel__button:hover,
.publisher-panel__fab:hover {
  transform: translateY(-1px);
}

.publisher-panel__footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.publisher-panel__button {
  min-height: 2.45rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
}

.publisher-panel__button--primary {
  background: var(--publisher-button-primary-background);
  color: var(--publisher-button-primary-color);
}

.publisher-panel__button--secondary {
  background: var(--publisher-button-secondary-background);
  color: var(--publisher-button-secondary-color);
}

.publisher-panel__button--ghost {
  border-color: var(--publisher-card-border-color);
  background: var(--publisher-button-ghost-background);
  color: var(--publisher-button-ghost-color);
}

.publisher-panel__button.is-active {
  border-color: var(--publisher-card-selected-border-color);
  background: var(--publisher-card-selected-background);
}

.publisher-panel__button:disabled,
.publisher-panel__button.is-loading,
.publisher-panel__channel-action:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.publisher-panel__jobs {
  display: grid;
  gap: 0.5rem;
  max-height: 11rem;
  padding-top: 0.2rem;
  overflow: auto;
  border-top: 1px solid var(--publisher-panel-border-color);
}

.publisher-panel__jobs-empty {
  padding: 0.4rem 0;
  font-size: 0.8125rem;
  color: var(--text-muted-color);
}

.publisher-panel__jobs-list {
  display: grid;
  gap: 0.625rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.publisher-panel__job {
  padding: 0.62rem 0.7rem;
  border: 1px solid var(--publisher-card-border-color);
  border-radius: var(--radius-sm);
  background: var(--publisher-note-background);
}

.publisher-panel__job-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.publisher-panel__job-channel {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-strong-color);
}

.publisher-panel__job-status {
  font-size: 0.78rem;
  color: var(--text-muted-color);
}

.publisher-panel__job-meta,
.publisher-panel__job-note {
  font-size: 0.79rem;
  line-height: 1.45;
  color: var(--text-soft-color);
}

.publisher-panel__job-note {
  margin-top: 0.2rem;
}

.publisher-panel__fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1200;
  width: 3.15rem;
  height: 3.15rem;
  border-radius: 50%;
  background: var(--publisher-button-primary-background);
  color: var(--publisher-button-primary-color);
  box-shadow: var(--publisher-panel-shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (width <= 720px) {
  .publisher-panel {
    right: 0.75rem;
    bottom: 0.75rem;
    width: min(100%, calc(100vw - 1rem));
    max-height: calc(100dvh - 0.75rem);
  }

  .publisher-panel__head,
  .publisher-panel__body {
    padding-inline: 0.875rem;
  }

}

@media (width <= 520px) {
  .publisher-panel {
    right: 0.5rem;
    bottom: 0.5rem;
    width: calc(100vw - 1rem);
    max-height: calc(100dvh - 0.5rem);
  }

  .publisher-panel__channel-top,
  .publisher-panel__channel-middle {
    flex-direction: column;
    align-items: stretch;
  }

  .publisher-panel__toggle {
    justify-content: space-between;
  }

  .publisher-panel__footer {
    grid-template-columns: 1fr;
  }
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.625rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  background: var(--surface-color);
  color: var(--text-soft-color);
  text-decoration: none;
  cursor: pointer;
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--surface-subtle-color);
  color: var(--text-strong-color);
  border-color: var(--border-color);
  transform: translateY(-1px);
}

.theme-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
}

.theme-toggle__text {
  font-size: var(--font-size-caption);
  line-height: 1;
  white-space: nowrap;
}

.theme-toggle--icon {
  width: 2rem;
  padding: 0;

  & .theme-toggle__text {
    display: none;
  }
}

.mobile-bottom-bar {
  position: fixed;
  left: 50%;
  bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  z-index: 1100;
  width: min(calc(100% - 1.5rem), 27rem);
  padding: 0 0.25rem;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.09));
  border-radius: var(--radius-pill, 999px);
  background: color-mix(in srgb, var(--surface-color, #20252d) 24%, #111 76%);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%);
}

.mobile-bottom-bar--v2 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.25rem;
}

.mobile-bottom-bar__item {
  appearance: none;
  min-width: 0;
  min-height: 3rem;
  padding: 0.4rem;
  border: 0;
  border-radius: 1rem;
  background: transparent;
  color: color-mix(in srgb, var(--text-strong-color, #f3f6fa) 72%, transparent);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  text-decoration: none;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--transition-fast, 150ms ease),
    color var(--transition-fast, 150ms ease),
    transform var(--transition-fast, 150ms ease),
    opacity var(--transition-fast, 150ms ease);
}

.mobile-bottom-bar__item:active {
  transform: translateY(1px) scale(0.985);
}

.mobile-bottom-bar__item:hover,
.mobile-bottom-bar__item:focus-visible,
.mobile-bottom-bar__item.is-active {
  background: color-mix(in srgb, white 10%, transparent);
  color: var(--text-strong-color, #f3f6fa);
}

.mobile-bottom-bar__icon {
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
  color: currentColor;
}

.mobile-bottom-bar__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.mobile-bottom-bar__item--share {
  color: var(--text-strong-color, #f3f6fa);
}

.mobile-bottom-bar__item--share .mobile-bottom-bar__share-core {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: var(--radius-round, 50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, white 14%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.16);
  transition:
    background-color var(--transition-fast, 150ms ease),
    transform var(--transition-fast, 150ms ease),
    box-shadow var(--transition-fast, 150ms ease);
}

.mobile-bottom-bar__item--share .mobile-bottom-bar__icon {
  width: 1.5rem;
  height: 1.5rem;
}

.mobile-bottom-bar__item--share:hover .mobile-bottom-bar__share-core,
.mobile-bottom-bar__item--share:focus-visible .mobile-bottom-bar__share-core,
.mobile-bottom-bar__item--share.is-active .mobile-bottom-bar__share-core {
  background: color-mix(in srgb, white 20%, transparent);
}

.mobile-bottom-bar__item--share:active .mobile-bottom-bar__share-core {
  transform: scale(0.97);
}

.pagination {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm, 0.5rem);
  padding: calc(var(--index) * 1.05);
  letter-spacing: 0.05rem;
  color: var(--text-color);

  & .pagination__link {
    color: var(--text-color);
    display: flex;
    align-items: center;
    padding-inline: calc(var(--index) * 1.05);
    column-gap: calc(var(--space-sm, 0.5rem));
    transition: color var(--transition-base);

    &:hover {
      color: var(--accent-color);
    }

    &:first-child:hover .pagination--icon {
      animation: fly-left 0.6s ease forwards;
    }

    &:last-child:hover .pagination--icon {
      animation: fly-right 0.6s ease forwards;
    }

    &.is-disabled {
      visibility: hidden;
    }
  }

  & .pagination--icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
      transform 0.4s ease,
      opacity 0.4s ease;
    will-change: transform, opacity;
    font-size: var(--icon-size);
  }

  & .pagination__center {
    position: relative;
    flex: 0 0 auto;
  }

  & .pagination__page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-height: 2.75rem;
    padding: 0.625rem var(--space-md);
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--surface-muted-color);
    color: var(--text-color);
    white-space: nowrap;
    flex-shrink: 1;
    user-select: none;
    cursor: pointer;
    transition:
      background-color var(--transition-base),
      color var(--transition-base),
      transform var(--transition-base);

    &:hover {
      color: var(--accent-color);
    }

    &:focus-visible {
      outline: 2px solid var(--accent-color);
      outline-offset: 2px;
    }
  }

  & .pagination__page-current,
  & .pagination__page-total,
  & .pagination__page-sep {
    line-height: 1;
  }

  & .pagination__page-chevron {
    display: inline-flex;
    transition: transform var(--transition-base);
    transform-origin: center;
    position: absolute;
    bottom: -12px;
    width: 26px;
    height: 26px;
    background-color: var(--surface-muted-color);
    border-radius: var(--radius-round);
    padding: 0.25rem;
  }

  &.is-open .pagination__page-chevron {
    transform: rotate(180deg);
  }

  & .pagination__panel {
    position: absolute;
    left: 50%;
    top: calc(100% + 1rem);
    z-index: 20;
    width: max-content;
    min-width: min(22rem, calc(100vw - 2rem));
    max-width: min(28rem, calc(100vw - 2rem));
    transform: translateX(-50%);
    border: 1px solid color-mix(in srgb, var(--text-color) 10%, transparent);
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--surface-color, #1e2229) 94%, transparent);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
    padding: 0.75rem;
    backdrop-filter: blur(8px);
  }

  & .pagination__pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
  }

  & .pagination__page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-pill);
    color: var(--text-color);
    background: transparent;
    border: 1px solid var(--accent-soft-color);
    transition:
      background-color var(--transition-base),
      color var(--transition-base),
      transform var(--transition-base);

    &:hover {
      color: var(--accent-color);
      background: color-mix(in srgb, var(--accent-color) 12%, transparent);
    }

    &.is-active {
      background: var(--accent-color);
      color: var(--accent-contrast, #fff);
      pointer-events: none;
    }
  }

  & .pagination__dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    opacity: 0.55;
    user-select: none;
  }

  @media (width <= 550.98px) {
    .pagination--icon {
      width: 40px;
      height: 40px;
    }

    .pagination--text {
      display: none !important;
    }

    .pagination__page-number {
      min-height: 2.5rem;
      padding-inline: 0.875rem;
    }

    .pagination__panel {
      min-width: min(18rem, calc(100vw - 1.5rem));
      max-width: min(22rem, calc(100vw - 1.5rem));
      padding: 0.625rem;
    }

    .pagination__page-link {
      min-width: 2.125rem;
      min-height: 2.125rem;
      padding: 0.4rem 0.55rem;
    }
  }
}

@keyframes fly-left {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  49% {
    transform: translateX(-1.5em);
    opacity: 0;
  }
  50% {
    transform: translateX(1.5em);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fly-right {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  49% {
    transform: translateX(1.5em);
    opacity: 0;
  }
  50% {
    transform: translateX(-1.5em);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}
