:root {
  --vfn-accent: #2f80ed;
  --vfn-accent-hover: #1f6fd1;
  --vfn-bg: #fff;
  --vfn-bg-soft: #f5f7fa;
  --vfn-text: #17202a;
  --vfn-muted: #667085;
  --vfn-border: rgba(23, 32, 42, .12);
  --vfn-shadow: 0 8px 28px rgba(16, 24, 40, .12);
  --vfn-mobile-height: 62px;
}

body.night,
body.dark-mode,
.night-mode {
  --vfn-bg: #17191d;
  --vfn-bg-soft: #202329;
  --vfn-text: #f3f5f7;
  --vfn-muted: #aab2bf;
  --vfn-border: rgba(255, 255, 255, .12);
  --vfn-shadow: 0 8px 28px rgba(0, 0, 0, .4);
}

.vfn-context {
  align-items: center;
  background: var(--vfn-bg);
  border: 1px solid var(--vfn-border);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .04);
  color: var(--vfn-text);
  display: flex;
  gap: 12px;
  margin: 12px 0 18px;
  min-height: 54px;
  padding: 8px 10px;
  position: relative;
  width: 100%;
}

.vfn-context a,
.vfn-mobile a,
.vfn-context button,
.vfn-mobile button,
.vfn-scroll-tools button {
  text-decoration: none !important;
}

.vfn-back,
.vfn-primary {
  align-items: center;
  border: 0;
  border-radius: 7px;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  gap: 7px;
  justify-content: center;
  line-height: 1.2;
  min-height: 38px;
  padding: 0 12px;
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.vfn-back {
  background: var(--vfn-bg-soft);
  color: var(--vfn-text) !important;
}

.vfn-back:hover,
.vfn-back:focus-visible {
  background: var(--vfn-border);
}

.vfn-back span {
  font-size: 20px;
  line-height: 1;
}

.vfn-primary {
  background: var(--vfn-accent);
  color: #fff !important;
  cursor: pointer;
  font-weight: 600;
}

.vfn-primary:hover,
.vfn-primary:focus-visible {
  background: var(--vfn-accent-hover);
  color: #fff !important;
}

.vfn-back:active,
.vfn-primary:active,
.vfn-mobile a:active,
.vfn-mobile button:active {
  transform: translateY(1px);
}

.vfn-breadcrumbs {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  gap: 0;
  list-style: none;
  margin: 0 !important;
  min-width: 0;
  overflow: hidden;
  padding: 0 !important;
}

.vfn-breadcrumbs li {
  align-items: center;
  color: var(--vfn-muted);
  display: inline-flex;
  flex: 0 1 auto;
  font-size: 13px;
  min-width: 0;
  white-space: nowrap;
}

.vfn-breadcrumbs li:not(:last-child)::after {
  color: var(--vfn-muted);
  content: "›";
  flex: 0 0 auto;
  font-size: 17px;
  margin: 0 8px;
  opacity: .7;
}

.vfn-breadcrumbs a,
.vfn-breadcrumbs span {
  color: inherit !important;
  display: block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vfn-breadcrumbs a:hover,
.vfn-breadcrumbs a:focus-visible {
  color: var(--vfn-accent) !important;
}

.vfn-breadcrumbs li[aria-current="page"] {
  color: var(--vfn-text);
  font-weight: 600;
  min-width: 40px;
}

.vfn-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
}

.vfn-mobile {
  display: none;
}

.vfn-scroll-tools {
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
  z-index: 1030;
}

.vfn-scroll-tools.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.vfn-scroll-tools button {
  align-items: center;
  background: var(--vfn-bg);
  border: 1px solid var(--vfn-border);
  border-radius: 50%;
  box-shadow: var(--vfn-shadow);
  color: var(--vfn-text);
  cursor: pointer;
  display: flex;
  font-size: 18px;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.vfn-scroll-tools button:hover,
.vfn-scroll-tools button:focus-visible {
  background: var(--vfn-accent);
  color: #fff;
}

.vfn-scroll-tools button:disabled {
  cursor: default;
  opacity: .38;
}

.vfn-back:focus-visible,
.vfn-primary:focus-visible,
.vfn-breadcrumbs a:focus-visible,
.vfn-mobile a:focus-visible,
.vfn-mobile button:focus-visible,
.vfn-scroll-tools button:focus-visible {
  outline: 3px solid rgba(47, 128, 237, .28);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  body.vfn-has-mobile-bar {
    padding-bottom: calc(var(--vfn-mobile-height) + env(safe-area-inset-bottom)) !important;
  }

  #forum-cont .tag_page_nav,
  #forum-cont .wo_page_hdng_menu,
  #forum-cont .wow_big_head_link {
    display: none !important;
  }

  .vfn-context {
    border-left: 0;
    border-radius: 0;
    border-right: 0;
    gap: 8px;
    margin: 6px 0 12px;
    min-height: 48px;
    padding: 6px 2px;
  }

  .vfn-context .vfn-back {
    min-height: 40px;
    padding: 0 10px;
  }

  .vfn-context .vfn-back b {
    display: none;
  }

  .vfn-context .vfn-back span {
    font-size: 24px;
  }

  .vfn-breadcrumbs li {
    display: none;
  }

  .vfn-breadcrumbs li:nth-last-child(-n+2) {
    display: inline-flex;
  }

  .vfn-context[data-vfn-mobile-crumb="current"] .vfn-breadcrumbs li:not(:last-child) {
    display: none;
  }

  .vfn-breadcrumbs a,
  .vfn-breadcrumbs span {
    max-width: 42vw;
  }

  .vfn-actions .vfn-primary {
    min-height: 40px;
    padding: 0 10px;
  }

  .vfn-mobile {
    align-items: stretch;
    background: var(--vfn-bg);
    border-top: 1px solid var(--vfn-border);
    bottom: 0;
    box-shadow: 0 -6px 24px rgba(16, 24, 40, .1);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    left: 0;
    min-height: calc(var(--vfn-mobile-height) + env(safe-area-inset-bottom));
    padding: 5px max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left));
    position: fixed;
    right: 0;
    transform: translateY(0);
    transition: transform .2s ease, opacity .2s ease;
    z-index: 1050;
  }

  .vfn-mobile a,
  .vfn-mobile button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--vfn-muted) !important;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font-family: inherit;
    gap: 1px;
    justify-content: center;
    min-height: 48px;
    min-width: 44px;
    overflow: hidden;
    padding: 2px 3px;
  }

  .vfn-mobile a:hover,
  .vfn-mobile button:hover,
  .vfn-mobile a:focus-visible,
  .vfn-mobile button:focus-visible {
    background: var(--vfn-bg-soft);
    color: var(--vfn-text) !important;
  }

  .vfn-mobile span {
    font-size: 22px;
    font-weight: 500;
    line-height: 24px;
  }

  .vfn-mobile small {
    display: block;
    font-size: 10px;
    line-height: 13px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vfn-mobile .is-primary {
    color: var(--vfn-accent) !important;
    font-weight: 600;
  }

  .vfn-keyboard-open .vfn-mobile {
    opacity: 0;
    pointer-events: none;
    transform: translateY(110%);
  }

  .vfn-keyboard-open.vfn-has-mobile-bar {
    padding-bottom: 0 !important;
  }

  .vfn-scroll-tools {
    bottom: calc(var(--vfn-mobile-height) + env(safe-area-inset-bottom) + 12px);
    right: max(12px, env(safe-area-inset-right));
  }

  body:not(.vfn-has-mobile-bar) .vfn-scroll-tools {
    bottom: 12px;
  }

  .vfn-keyboard-open .vfn-scroll-tools {
    bottom: 12px;
  }
}

@media (max-width: 420px) {
  .vfn-context .vfn-actions {
    display: none;
  }

  .vfn-breadcrumbs a,
  .vfn-breadcrumbs span {
    max-width: 56vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vfn-context *,
  .vfn-mobile,
  .vfn-scroll-tools {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media print {
  .vfn-context,
  .vfn-mobile,
  .vfn-scroll-tools {
    display: none !important;
  }
}
