/* The single site frame shared by every Velmora page. */
:root {
  --ve-shell-width: 1300px;
  --ve-shell-gutter: clamp(16px, 2vw, 26px);
}

html {
  min-width: 320px;
  background: #070b12;
}

body.ve-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

.ve-container {
  width: 100%;
  max-width: var(--ve-shell-width);
  margin-inline: auto;
  padding-inline: var(--ve-shell-gutter);
}

.ve-top-banner {
  padding: 8px var(--ve-shell-gutter);
  color: var(--ve-text-muted);
  background: rgba(12, 18, 30, .85);
  border-bottom: 1px solid rgba(212, 163, 115, .15);
  font-size: 12px;
  text-align: center;
}

.ve-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7, 12, 18, .95);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.ve-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 56px;
  padding-block: 6px;
}

.ve-main-wrapper {
  min-height: 72vh;
  flex: 1 0 auto;
  padding-block: 36px 52px;
}

.ve-page-container {
  position: relative;
}

.ve-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Shared button ergonomics; page themes still control primary/secondary colors. */
.ve-btn {
  min-height: 44px;
  gap: 8px;
  text-align: center;
  line-height: 1.25;
  text-wrap: balance;
}

.ve-btn .ve-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.ve-btn:disabled,
.ve-btn[aria-disabled="true"] {
  cursor: not-allowed;
  filter: grayscale(.45);
  opacity: .52;
  pointer-events: none;
}

/* One pagination system shared by Library, Author and Search pages. */
.ve-pagination {
  display: flex;
  width: min(100%, 680px);
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 46px auto 24px;
  padding: 14px;
  overflow: hidden;
  flex-wrap: nowrap;
  white-space: nowrap;
  background: rgba(8, 14, 23, .72);
  border: 1px solid rgba(154, 121, 71, .2);
  border-radius: 8px;
}

.ve-pagination > a,
.ve-pagination > span {
  display: inline-flex;
  min-width: 40px;
  min-height: 42px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  overflow: hidden;
  color: #e8c797;
  background: #101825;
  border: 1px solid rgba(154, 121, 71, .42);
  border-radius: 5px;
  font-family: var(--ve-font-serif);
  text-align: center;
  text-decoration: none;
  text-overflow: clip;
}

.ve-pagination > a {
  position: relative;
  isolation: isolate;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

.ve-pagination > a:hover,
.ve-pagination > a:focus-visible {
  outline: none;
  border-color: rgba(216, 190, 159, .72);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .34), 0 0 18px rgba(91, 168, 255, .08);
}

.ve-pagination > .is-current {
  color: #15120d;
  background: #c7a36c;
  border-color: #dfc28e;
  font-weight: 800;
}

.ve-pagination-label-short {
  display: none;
}

.ve-global-footer {
  flex: 0 0 auto;
  padding-block: 60px 28px;
  color: var(--ve-text-muted);
  background: #06090e;
  border-top: 1px solid rgba(255, 255, 255, .06);
  font-size: 13.5px;
  line-height: 1.7;
}

.ve-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  margin-bottom: 48px;
}

.ve-footer-legal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 24px;
  color: #9aa5b4;
  border-top: 1px solid rgba(255, 255, 255, .05);
  font-size: 12px;
}

.ve-global-footer a:hover {
  color: var(--ve-heading) !important;
}

@media (max-width: 720px) {
  html,
  body.ve-body {
    background: #050910;
    overscroll-behavior-y: none;
  }

  body.ve-body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
    overflow-x: hidden;
  }

  .ve-header .ve-header-inner {
    padding-inline: var(--ve-shell-gutter) !important;
  }

  .ve-main-wrapper {
    padding-block: 16px 32px;
  }

  .ve-btn {
    min-height: 48px;
  }

  .ve-pagination {
    width: 100%;
    gap: clamp(3px, 1vw, 6px);
    margin: 32px auto 18px;
    padding: 8px 6px;
  }

  .ve-pagination > a,
  .ve-pagination > span {
    width: 0;
    min-width: 0;
    min-height: 44px;
    flex: 1 1 0;
    padding: 6px 2px;
    font-size: clamp(13px, 3.7vw, 16px);
  }

  .ve-pagination > .ve-pagination-direction {
    flex-grow: 1.35;
  }

  .ve-pagination-label-full { display: none; }
  .ve-pagination-label-short { display: inline; }

  .ve-hero-actions,
  .ve-book-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 9px !important;
  }

  .ve-hero-actions .ve-btn,
  .ve-book-actions .ve-btn {
    width: 100%;
    justify-content: center;
  }

  .ve-hero-actions > .ve-btn:not(.ve-btn-mobile-wide),
  .ve-book-actions > .ve-btn:not(.ve-btn-mobile-wide) {
    padding-inline: 9px !important;
    font-size: 12px !important;
    white-space: nowrap;
  }

  .ve-btn-mobile-wide {
    grid-column: 1 / -1;
  }

  #ve-section-nav-btns {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px !important;
  }

  #ve-section-counter-badge {
    grid-column: 1 / -1;
  }

  #ve-section-nav-btns .ve-btn {
    width: 100%;
    justify-content: center;
  }

  #ve-section-nav-btns > .ve-btn:nth-child(2):last-child {
    grid-column: 1 / -1;
  }

  .ve-global-footer {
    padding-block: 42px 24px;
  }

  .ve-footer-grid {
    gap: 30px;
    margin-bottom: 34px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .ve-pagination > a:hover {
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ve-pagination > a {
    transition: none;
  }
}

@media (max-width: 359px) {
  .ve-hero-actions,
  .ve-book-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .ve-hero-actions > .ve-btn,
  .ve-book-actions > .ve-btn {
    grid-column: 1;
  }
}
