/* Shared styles used by both the main app (style.css) and standalone pages (pages.css) */

/* ── Global tooltip ──
 * Any element with [data-tooltip="..."] gets a hover popup. Defaults to a
 * pill shown BELOW the element. Add data-tooltip-pos="top" to flip it above
 * (useful for elements near the bottom of the viewport or floating on top of
 * content like in-page component icons). The host needs `position: relative`
 * (or already-positioned) for the popup to anchor correctly.
 */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e2433;
  color: #e5e7eb;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 10010;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-tooltip-pos="top"]:hover::after {
  top: auto;
  bottom: calc(100% + 6px);
}

* {
  scrollbar-color: #3a3f4b #1a1e27;
}

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

::-webkit-scrollbar-track {
  background: #1a1e27;
}

::-webkit-scrollbar-thumb {
  background: #3a3f4b;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4a5060;
}

/* User dropdown menu */
.user-menu-wrap {
  position: relative;
  display: flex;
  margin-left: auto;
}

.user-menu-wrap > button {
  border: 0;
  padding: 3px;
  margin: 0 2px;
  display: flex;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s linear;
  border-radius: 5px;
}

.user-menu-wrap > button:hover {
  background-color: #515a6d;
}

.user-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #13171f;
  border: 1px solid #374151;
  border-radius: 6px;
  min-width: 140px;
  z-index: 10001;
  overflow: hidden;
}

.user-menu.open {
  display: flex;
  flex-direction: column;
}

.user-menu a,
.user-menu form {
  display: block;
  width: 100%;
  padding: 8px 14px;
  margin: 0;
  color: #fff;
  text-decoration: none;
  font: inherit;
  font-size: 0.85rem;
  line-height: 1.6;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

.user-menu a:hover,
.user-menu form:hover {
  background-color: #515a6d;
}

.user-menu button {
  display: block;
  width: 100%;
  padding: 0 !important;
  margin: 0 !important;
  font: inherit;
  font-size: 0.85rem;
  line-height: 1.6;
  color: inherit;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
}

.user-menu__register {
  color: #60a5fa !important;
}
.match {
  text-align: center;
  font-family: sans-serif;
}

.match h3 {
  margin-bottom: 0.5rem;
}

.match p {
  margin-bottom: 1rem;
}

.match-columns {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 1rem;
}

.match-left .match-item {
  cursor: move;
}

.match-left,
.match-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.match-item {
  padding: 10px;
  border: 2px solid #ccc;
  border-radius: 4px;
  background: #f9f9f9;
  user-select: none;
  transition: all 0.3s ease;
}

.match-item.matched {
  background: #d4edda;
  border-color: #28a745;
  cursor: default;
}

.match-item.wrong {
  background: #f8d7da;
  border-color: #dc3545;
}

.match-pair {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}.memory {
  .memory-container {
    display: grid;
    gap: 10px;
    justify-items: center;
  }

  .circle {
    width: 80px;
    height: 80px;
    perspective: 1000px;
    cursor: pointer;
    color: transparent;
  }

  .circle-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;

    .circle-front,
    .circle-back {
      position: absolute;
      width: 100%;
      height: 100%;
      backface-visibility: hidden;
      border: 2px solid #ccc;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .circle-front {
      background-color: #fff;
    }

    .circle-back {
      background-color: #f0f0f0;
      transform: rotateY(180deg);
      font-size: 24px;
    }
  }

  #progress-bar {
    width: 0;
    height: 10px;
    background-color: #4caf50;
    color: white;
    border-radius: 5px;
    transition: all 0.5s;
  }

  #success {
    color: #4caf50;
    font-weight: bold;
  }
}

.memory .circle.flipped .circle-inner {
  transform: rotateY(180deg);
  color: #000;
}
.flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

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

.items-center {
  align-items: center;
}

.gap-05 {
  gap: 0.5rem;
}

.gap-1 {
  gap: 1rem;
}

.m-0 {
  margin: 0;
}

.mt-0 {
  margin-top: 0;
}

.mb-0 {
  margin-bottom: 0;
}/* Library page */
#library-section,
#landing-section {
  position: fixed;
  top: 35px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  background-color: #222730;
  color: #fff;
  z-index: 100;
}

/* Library */
.library {
  padding: 2rem 1.5rem;
}

.library__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.library__header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.library__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.library__search-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.library__search {
  background: #13171f;
  border: 1px solid #2a2f3a;
  color: #e5e7eb;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 0.9rem;
  outline: none;
  flex: 1;
  max-width: 400px;
  margin: 0 1rem;
}

.library__search:focus {
  border-color: #3b82f6;
}

.library__upload-btn {
  background-color: #3b82f6 !important;
  border-color: #3b82f6 !important;
  padding: 8px 16px !important;
  position: relative;
}

.library__upload-btn:hover {
  background-color: #2563eb !important;
}

.library__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.library__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  color: #9ca3af;
}

.library__empty p {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.library__empty-hint {
  font-size: 0.9rem !important;
  color: #6b7280;
}

.library__empty-upload {
  margin-top: 1rem;
  padding: 0.6rem 1.5rem;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
}

.library__empty-upload:hover {
  background: #2563eb;
}

.library__card {
  background-color: #13171f;
  border-radius: 8px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.15s ease;
}

.library__card:hover {
  transform: scale(1.03);
}

.library__card-top {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.library__card-thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 4px;
  background-color: #1a1f2b;
}

.library__card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.library__card-title {
  font-weight: 600;
  font-size: 1rem;
  word-break: break-word;
  line-height: 1.3;
}

.library__card-clickable {
  cursor: pointer;
}

.library__card-title.library__card-clickable:hover {
  color: #3b82f6;
}

.library__card-author {
  color: #9ca3af;
  font-size: 0.8rem;
  line-height: 1.3;
}

.library__card-details {
  color: #7b8394;
  font-size: 0.75rem;
  line-height: 1.4;
  word-break: break-word;
}

.library__card-progress {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-top: 0.35rem;
}

.library__card-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #9ca3af;
}

.library__card-progress-bar {
  height: 4px;
  background: #2a2f3a;
  border-radius: 2px;
  overflow: hidden;
}

.library__card-progress-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.library__card-meta {
  font-size: 0.8rem;
  color: #9ca3af;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.library__card-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: auto;
}

.library__card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding-top: 0.35rem;
}

.library__stat {
  display: inline-block;
  background-color: #1e2433;
  color: #9ca3af;
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.library__card-dates {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-top: 0.35rem;
}

.library__card-date {
  color: #6b7280;
  font-size: 0.7rem;
}

.library__card-actions {
  display: flex;
  gap: 0.4rem;
  padding-top: 0.5rem;
}

.library__btn {
  flex: 1;
  justify-content: center;
  font-size: 0.75rem;
  padding: 8px 0 !important;
  border-radius: 6px;
  border: none !important;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.library__btn:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.library__edit-btn,
.library__download-btn {
  background-color: #1e2433 !important;
  color: #9ca3af !important;
}

.library__edit-btn:hover,
.library__download-btn:hover {
  background-color: #2a3345 !important;
  color: #e5e7eb !important;
}

.library__delete-btn {
  background-color: rgba(248, 113, 113, 0.1) !important;
  color: #f87171 !important;
}

.library__delete-btn:hover {
  background-color: rgba(248, 113, 113, 0.25) !important;
  color: #fca5a5 !important;
}

.library__no-results {
  color: #6b7280;
  text-align: center;
  padding: 2rem;
  grid-column: 1 / -1;
}

/* Pagination */
.library__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
}

.library__page-btn {
  min-width: 80px;
}

.library__page-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.library__page-info {
  color: #9ca3af;
  font-size: 0.85rem;
}

/* Edit modal */
.book-edit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.book-edit-modal {
  background: #1a1f2b;
  border-radius: 10px;
  padding: 1.5rem;
  width: 90%;
  max-width: 400px;
  color: #e5e7eb;
}

.book-edit-modal h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.book-edit-modal label {
  display: block;
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 0.75rem;
}

.book-edit-modal input {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 6px 10px;
  background: #13171f;
  border: 1px solid #2a2f3a;
  border-radius: 6px;
  color: #e5e7eb;
  font-size: 0.85rem;
  outline: none;
  box-sizing: border-box;
}

.book-edit-modal input:focus {
  border-color: #3b82f6;
}

.book-edit-modal__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.book-edit-modal__field {
  margin-bottom: 0.75rem;
}

.book-edit-modal__label {
  display: block;
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}

.book-edit-modal__author-row {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.book-edit-modal__author-input {
  flex: 1;
}

.book-edit-modal__remove-author {
  padding: 4px 8px !important;
  min-width: auto;
  font-size: 1rem;
  line-height: 1;
  color: #f87171 !important;
  border-color: #f87171 !important;
}

.book-edit-modal__remove-author:hover {
  background-color: #f87171 !important;
  color: #fff !important;
}

.book-edit-modal__add-author {
  font-size: 0.75rem;
  padding: 3px 10px !important;
  margin-top: 0.15rem;
}

/* Landing page */
.landing {
  max-width: 1024px;
  margin: 0 auto;
  padding: 3rem 0;
  text-align: center;
  font-family: system-ui, -apple-system, sans-serif;
}

.landing__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.3rem;
  color: #fff;
  text-decoration: none;
}

.landing__logo {
  display: block;
}

.landing__title {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  font-weight: 700;
  line-height: 1;
}

.landing__tagline {
  font-size: 1.15rem;
  color: #9ca3af;
  margin: 0 0 2rem;
}

.landing__desc {
  font-size: 0.95rem;
  color: #d1d5db;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.landing__features {
  text-align: left;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.landing__feature {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  background: #1a1e27;
  padding: 1rem;
  border-radius: 8px;
}

.landing__feature-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.landing__feature p {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: #9ca3af;
}

.landing__feature strong {
  font-size: 0.95rem;
}

.pricing-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin: 1.5rem 0; }
.pricing-card { border: 1px solid #2a2f3a; border-radius: 12px; padding: 1.5rem; background: #1a1e27; text-align: left; transition: transform 0.15s ease; display: flex; flex-direction: column; }
.pricing-card:hover { transform: scale(1.03); }
.pricing-card--highlight { border-color: #3b82f6; }
.pricing-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: #fff; }
.pricing-card .price { font-size: 1.8rem; font-weight: 700; color: #fff; margin: 0.5rem 0; }
.pricing-card .price span { font-size: 0.9rem; font-weight: 400; color: #9ca3af; }
.pricing-card .price-note { font-size: 0.85rem; color: #9ca3af; margin-bottom: 1rem; }
.pricing-card ul { list-style: none; padding: 0; margin: 0; flex: 1; }
.pricing-card li { padding: 0.35rem 0; padding-left: 1.4rem; position: relative; font-size: 0.9rem; color: #e5e7eb; margin-bottom: 0.4rem; }
.pricing-card li::before { content: '✓'; position: absolute; left: 0; color: #34d399; font-weight: 700; }
.pricing-card li.disabled { color: #6b7280; }
.pricing-card li.disabled::before { content: '–'; color: #6b7280; }
.pricing-card .card-cta { display: inline-block; margin-top: 1rem; padding: 0.5rem 1.25rem; border-radius: 6px; font-size: 0.9rem; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer; border: none; background: transparent; transition: background-color 0.15s ease, color 0.15s ease; box-sizing: border-box; line-height: 1.6; }
.pricing-card .card-cta--primary { background: #3b82f6; color: #fff; }
.pricing-card .card-cta--primary:hover { background: #2563eb; }
.pricing-card .card-cta--outline { border: 1px solid #3b82f6; color: #3b82f6; }
.pricing-card .card-cta--outline:hover { background: rgba(59, 130, 246, 0.1); color: #60a5fa; }

.landing__login-hint {
  font-size: 0.85rem;
  color: #9ca3af;
}

.landing__login-hint a {
  color: #60a5fa;
}

/* User dropdown in toolbar */
/* Viewer controls wrapper */
#viewer-controls {
  align-items: center;
  gap: 0.3rem;
  flex: 1;
  justify-content: center;
}
#modal-overlay,
.modal {
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#modal-overlay.show,
.modal.show {
  pointer-events: auto;
  opacity: 1;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 0 20px 20px 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  z-index: 12000;
  max-width: 90%;
  min-width: 300px;

  .modal__header,
  .modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 20px;
  }

  .modal__content {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    h3 {
      margin-top: 0;
    }
  }
}

#bookmarks-modal, #quotes-modal {
  ul {
    list-style-type: none;
    margin-block-start: 0;
    padding-inline-start: 0;
  }

  li {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
  }
}

#edit-modal {
  &__component-name {
    margin: 0;
  }

  #edit-modal__component-description {
    margin-top: 0;
  }

  #edit-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    label {
      display: flex;
      flex-direction: column;
      gap: 0.2rem;
    }
  }
}

#modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1200;
}/* Ensures PDF.js canvas and textLayer are perfectly aligned */
.pdf-page-container {
  position: relative;
  width: fit-content;
  height: fit-content;
}
.pdf-page-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  box-sizing: border-box;
}
.pdf-page-container .textLayer {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0;
  border: none;
  box-sizing: border-box;
}
.toast-container {
  position: fixed;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;

  /* Positions */
  &.top-left {
    top: 40px;
    left: 20px;
    align-items: flex-start;
  }
  &.top-center {
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
  }
  &.top-right {
    top: 40px;
    right: 20px;
    align-items: flex-end;
  }
  &.center-left {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    align-items: flex-start;
  }
  &.center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    align-items: center;
  }
  &.center-right {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    align-items: flex-end;
  }
  &.bottom-left {
    bottom: 20px;
    left: 20px;
    align-items: flex-start;
  }
  &.bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
  }
  &.bottom-right {
    bottom: 20px;
    right: 20px;
    align-items: flex-end;
  }
}

.toast {
  min-width: 250px;
  padding: 10px 20px;
  border-radius: 4px;
  font-family: sans-serif;
  color: #fff;
  opacity: 0;
  animation: fadeInOut 3.6s ease-in-out forwards;
}

/* Keyframes for fade-in and fade-out with a slight vertical slide */
@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  10% {
    opacity: 1;
    transform: translateY(0);
  }
  90% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* Toast types */
.toast.success {
  background-color: #4caf50;
}

.toast.error {
  background-color: #f44336;
}

.toast.warning {
  background-color: #ff9800;
}

.toast.info {
  background-color: #2196f3;
}
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: Arial, sans-serif;
  background-color: #222730;
}

#loading {
  position: fixed;
  top: 35px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #222730;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 9999;
}

@keyframes dots {
  0% {
    content: "."
  }

  25% {
    content: ".."
  }

  50% {
    content: "..."
  }

  75% {
    content: ""
  }

  100% {
    content: "."
  }
}

.dots {
  width: 25px;

  &::after {
    content: "...";
    animation: dots 1.2s infinite steps(1);
  }
}

.btn {
  background-color: #1e2433;
  border: none;
  cursor: pointer;
  color: #e5e7eb;
  display: flex;
  border-radius: 6px;
  align-items: center;
  gap: 0.3rem;
  padding: 5px 8px;
  font-weight: 500;

  &:hover {
    background-color: #2a3345;
    color: #fff;
  }

  &.btn-dark {
    color: #222730;
    background-color: #e5e7eb;

    &:hover {
      background-color: #d1d5db;
      color: #111;
    }
  }

  &.btn-plain {
    color: #222730;
    background: none;

    &:hover {
      color: #111;
      background-color: #f3f4f6;
    }
  }

  &.rename-btn {
    max-height: 35px;
  }

  &.active {
    background-color: rgba(255, 255, 255, 0.25);
  }
}

svg,
svg * {
  pointer-events: none;
}

#left-sidebar,
#right-sidebar {
  position: fixed;
  top: 35px;
  bottom: 0;
  width: 340px;
  background-color: #13171ff2;
  color: #fff;
  overflow-y: auto;
  padding: 10px;
  z-index: 10000;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease, right 0.3s ease;

  &.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }
}

#left-sidebar {
  left: 0;
  transform: translateX(-100%);
  opacity: 0;

  #page-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .page-item {
    display: flex;
    justify-content: space-between;
    gap: 0.3rem;
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: background 0.2s ease-in-out;
  }

  .page-item:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  .page-item.active {
    background: rgba(255, 255, 255, 0.4);
  }
}

#right-sidebar {
  right: 0;
  transform: translateX(100%);
  opacity: 0;


  .sidebar-component {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    gap: 0.5rem;
    cursor: move;
    padding: 10px;
    margin-bottom: 1rem;
    border-radius: 5px;
    border: 1px solid #fff;
    background-color: #222730;

    .sidebar-component__info {
      display: flex;
      align-items: center;
      gap: 0.5rem;

      .sidebar-component__info-icon-dot {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        flex-shrink: 0;
      }
    }

    .sidebar-component__footer {
      flex-direction: column;
    }

    .sidebar-component__footer,
    .sidebar-component__footer-row {
      display: flex;
      gap: 0.5rem;
    }
  }
}

/* AI Chat & Helper & Version History Sidebars */
#ai-chat-sidebar,
#ai-helper-sidebar,
#version-history-sidebar {
  position: fixed;
  top: 35px;
  right: 0;
  bottom: 0;
  width: 340px;
  background-color: #13171ff2;
  color: #fff;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease, right 0.3s ease;

  &.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }
}

.ai-chat__header,
.ai-helper__header,
.version-history__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);

  h2 { margin: 0; font-size: 1rem; }

  button {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 4px;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;

    &:hover { background: rgba(255, 255, 255, 0.1); }
  }
}

.ai-chat__messages,
.ai-helper__messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-chat__msg,
.ai-helper__msg {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
  max-width: 90%;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.ai-chat__msg--user,
.ai-helper__msg--user {
  background: #2a5db0;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.ai-chat__msg--ai,
.ai-helper__msg--ai {
  background: #222730;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.ai-chat__json-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: #8cb4ff;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ai-chat__json-toggle:hover { background: rgba(255,255,255,0.08); }
.ai-chat__json-arrow { transition: transform 0.2s; }
.ai-chat__json-toggle.open .ai-chat__json-arrow { transform: rotate(90deg); }

.ai-chat__json-code {
  display: none;
  max-height: 300px;
  overflow: auto;
  background: #181c24;
  border-radius: 4px;
  padding: 8px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.75rem;
  line-height: 1.4;
  white-space: pre;
  color: #ccc;
}
.ai-chat__json-code.open { display: block; }

.ai-chat__msg--streaming::after,
.ai-helper__msg--streaming::after {
  content: '\258C';
  animation: blink-cursor 0.7s step-end infinite;
  opacity: 0.7;
}

.ai-chat__msg--generating {
  font-style: italic;
  opacity: 0.7;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 0; }
}

.ai-chat__msg--component {
  background: #1a3a2a;
  border: 1px solid #2d7a4f;
  align-self: flex-start;
  max-width: 95%;
}

/* Version info row */
.ai-chat__version-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.ai-chat__version-time {
  font-size: 0.75rem;
  opacity: 0.5;
}

/* Version action buttons row */
.ai-chat__version-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ai-chat__vbtn {
  background: #2a3040;
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 0.75rem;

  &:hover { background: #3a4050; color: #fff; }
}

.ai-chat__vbtn--activate {
  background: #2d7a4f;
  color: #fff;
  border-color: #2d7a4f;

  &:hover { background: #3a9963; }
  &.active {
    background: #1a5a3a;
    border-color: #3a9963;
    cursor: default;
  }
}

.ai-chat__vbtn--delete {
  background: #3a1a1a;
  color: #ff9999;
  border-color: #5a2a2a;

  &:hover { background: #4a2a2a; }
}

.ai-chat__msg--error,
.ai-helper__msg--error {
  background: #3a1a1a;
  border: 1px solid #7a2d2d;
  align-self: flex-start;
  color: #ff9999;
}

.ai-chat__typing,
.ai-helper__typing {
  align-self: flex-start;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  padding: 4px 10px;
}

.ai-chat__form,
.ai-helper__form {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.ai-chat__form textarea,
.ai-helper__form textarea {
  flex: 1;
  background: #222730;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 8px;
  font-size: 0.85rem;
  resize: none;
  font-family: inherit;

  &:focus { outline: 2px solid #3b82f6; outline-offset: -2px; border-color: rgba(255, 255, 255, 0.4); }
}

.ai-chat__form button[type="submit"],
.ai-helper__form button[type="submit"] {
  background: #2a5db0;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0 12px;
  cursor: pointer;
  display: flex;
  align-items: center;

  &:hover { background: #3a6dc0; }
  &:disabled { opacity: 0.4; cursor: not-allowed; }
}

/* Version History Sidebar */
.version-history__list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.version-history__item {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: default;
}

.version-history__item:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.version-history__item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.version-history__version {
  font-weight: 600;
  font-size: 0.9rem;
}

.version-history__live {
  font-size: 0.7rem;
  background: #34d399;
  color: #000;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.version-history__date {
  font-size: 0.8rem;
  color: #9ca3af;
}

.version-history__note {
  font-size: 0.85rem;
  color: #d1d5db;
  margin-top: 4px;
}

.version-history__actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}

.version-history__actions button {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #e5e7eb;
  cursor: pointer;
}

.version-history__actions button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.version-history__empty {
  text-align: center;
  color: #6b7280;
  padding: 2rem;
  font-size: 0.9rem;
}



/* ── AI code editor modal ── */

#ai-code-modal {
  min-width: 600px;
  max-width: 80vw;
}

/* Code editor tabs */
.ai-code__tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #ddd;
}

.ai-code__tab {
  background: transparent;
  color: #888;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.8rem;

  &:hover { color: #333; }
  &.active {
    color: #333;
    border-bottom-color: #2a5db0;
  }
}

/* Code editor overlay wrapper */
.ai-code__editor-wrap {
  position: relative;
  height: 400px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f6f8fa;
  overflow: hidden;
}

.ai-code__pre,
#ai-code-editor {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 12px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
  box-sizing: border-box;
}

/* Override Prism defaults that break overlay alignment */
pre[class*="language-"].ai-code__pre {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 12px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  tab-size: 2;
  white-space: pre;
  overflow: hidden;
  background: transparent;
  text-shadow: none;
  border-radius: 0;
}

.ai-code__pre {
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ai-code__pre code[class*="language-"] {
  background: transparent;
  padding: 0;
  font: inherit;
  text-shadow: none;
}

#ai-code-editor {
  z-index: 1;
  color: transparent;
  caret-color: #333;
  background: transparent;
  border: none;
  resize: none;
  outline: none;
}

/* ── AI admin/preview modals (standard white) ── */

#ai-admin-modal__title,
#ai-preview-modal__title {
  margin: 0;
}

#ai-admin-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;

  label {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }
}

/* AI badge in component sidebar */
.comp-sidebar__ai-badge {
  background: #2a5db0;
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 2px 6px;
  cursor: pointer;
  font-size: 0.65rem;
  margin-left: auto;

  &:hover { background: #3a6dc0; }
}

#pdf-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 35px);
  background-color: #222730;
  overflow: hidden;
}

#pdf-container.highlight-text-mode,
#pdf-container.highlight-text-mode *:not(.hl-color-picker):not(.hl-color-picker *):not(.drawing-color-picker):not(.drawing-color-picker *) {
  cursor: text !important;
}

#pdf-pages {
  position: relative;
  display: flex;
  background-color: #fff;
  transition: opacity 0.2s ease;
}

#pdf-pages.resizing {
  opacity: 0;
}

.pdf-page {
  position: relative;
}

.pdf-page canvas {
  display: block;
}

#pdf-page-left {
  border-right: 1px solid rgba(0, 0, 0, 0.2);
}

#pdf-page-left::after,
#pdf-page-right::before {
  content: '';
  position: absolute;
  top: 0;
  width: 20px;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

#pdf-page-left::after {
  right: 0;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.03) 30%, transparent 100%);
}

#pdf-page-right::before {
  left: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.03) 30%, transparent 100%);
}

#text-layer-left,
#text-layer-right {
  box-shadow: none;
}

.component-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #222730;
  cursor: pointer;
  z-index: 1199;
  position: absolute;
}

input:not([type="color"]),
textarea,
select {
  padding: 8px;
  border-radius: 3px;
  border: 1px solid #ccc;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* Must sit above sidebars (10000-10001) so hover tooltips on toolbar
     buttons render over the sidebar panels. */
  z-index: 10002;
  height: 35px;
  gap: 0.3rem;
  padding: 0 10px;
  background-color: #13171f;
  color: #fff;

  button:not(.user-menu *) {
    border: 0;
    padding: 3px;
    margin: 0 2px;
    display: flex;
    background: transparent;
    cursor: pointer;
    color: #fff;
    transition: all 0.2s linear;
    position: relative;

    &:hover,
    &.active {
      background-color: #515a6d;
      border-radius: 5px;
    }
  }

  input {
    padding: 4px;
  }

  .controls__divider {
    cursor: default;
  }

  #zoom-input {
    width: 35px;
  }
}

.controls .user-menu-wrap button[data-tooltip]:hover::after {
  left: auto;
  right: 0;
  transform: none;
}

/* Viewer-only controls: hidden until JS adds .viewer-mode */
#viewer-controls,
.controls__divider {
  display: none;
}

@media (min-width: 1501px) {
  .controls.viewer-mode #viewer-controls {
    display: flex;
  }

  .controls.viewer-mode > .controls__divider {
    display: inline;
  }
}

/* Text layer: covers the canvas for selectable text */
.text-layer,
.textLayer {
  position: absolute;
  top: 0;
  left: 0;
  overflow: clip;
  line-height: 1;
  -webkit-text-size-adjust: none;
  -moz-text-size-adjust: none;
  text-size-adjust: none;
  forced-color-adjust: none;
  transform-origin: 0 0;
  z-index: 2;
  user-select: none;
}

/* Style text layer children */
.textLayer span {
  color: transparent;
  position: absolute;
  white-space: pre;
  cursor: text;
  transform-origin: 0% 0%;
  letter-spacing: 0;
  user-select: text;
}

.textLayer > :not(.markedContent),
.textLayer .markedContent span:not(.markedContent) {
  z-index: 1;
}

.textLayer ::selection {
  background: rgba(100, 120, 140, 0.35);
}



::highlight(search-results) {
  background-color: rgba(255, 200, 0, 0.5);
}

::highlight(text-hl-yellow) {
  background-color: rgba(255, 230, 0, 0.4);
}

::highlight(text-hl-green) {
  background-color: rgba(0, 200, 80, 0.35);
}

::highlight(text-hl-blue) {
  background-color: rgba(80, 160, 255, 0.35);
}

::highlight(text-hl-pink) {
  background-color: rgba(255, 100, 150, 0.35);
}

::highlight(text-hl-orange) {
  background-color: rgba(255, 160, 40, 0.4);
}

::highlight(text-hl-quote) {
  background-color: rgba(160, 140, 200, 0.18);
}

.textLayer span.quote-mark,
.quote-mark {
  position: absolute;
  color: rgba(120, 100, 170, 0.55) !important;
  pointer-events: none;
  line-height: 1;
  font-family: Georgia, serif;
  z-index: 2;
}

/* Color picker popup for highlights */
.hl-color-picker {
  position: absolute;
  display: flex;
  gap: 4px;
  padding: 4px 6px;
  background: #1e2230;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  z-index: 5000;
  align-items: center;
}

.hl-color-picker .hl-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s, border-color 0.15s;
}

.hl-color-picker .hl-dot:hover {
  transform: scale(1.2);
}

.hl-color-picker .hl-dot.active {
  border-color: #fff;
}

.hl-color-picker .hl-dot[data-color="yellow"] { background: rgba(255, 230, 0, 0.8); }
.hl-color-picker .hl-dot[data-color="green"]  { background: rgba(0, 200, 80, 0.7); }
.hl-color-picker .hl-dot[data-color="blue"]   { background: rgba(80, 160, 255, 0.7); }
.hl-color-picker .hl-dot[data-color="pink"]   { background: rgba(255, 100, 150, 0.7); }
.hl-color-picker .hl-dot[data-color="orange"] { background: rgba(255, 160, 40, 0.8); }

.hl-color-picker .hl-delete {
  width: 24px;
  height: 24px;
  cursor: pointer;
  color: #ff5555;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  margin-left: 2px;
  border-left: 1px solid #444;
  padding-left: 6px;
}

/* Drawing color picker popup */
.drawing-color-picker {
  position: absolute;
  display: flex;
  gap: 4px;
  padding: 4px 6px;
  background: #1e2230;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  z-index: 5000;
  align-items: center;
}

.drawing-color-picker .draw-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s, border-color 0.15s;
}

.drawing-color-picker .draw-dot:hover {
  transform: scale(1.2);
}

.drawing-color-picker .draw-dot.active {
  border-color: #fff;
}

.drawing-color-picker .draw-separator {
  width: 1px;
  height: 18px;
  background: #444;
}

.drawing-color-picker .draw-width {
  width: 22px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 3px;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}

.drawing-color-picker .draw-width:hover {
  border-color: #666;
}

.drawing-color-picker .draw-width.active {
  border-color: #fff;
}

.drawing-color-picker .draw-width-bar {
  width: 14px;
  background: #fff;
  border-radius: 1px;
}

.drawing-color-picker .draw-delete {
  width: 24px;
  height: 24px;
  cursor: pointer;
  color: #ff5555;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawing-color-picker .draw-delete:hover {
  color: #ff3333;
  transform: scale(1.15);
}

#search-results-info {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #ccc;
  white-space: nowrap;
}

#search-results-count {
  min-width: 60px;
  text-align: center;
}

.btn-icon {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  padding: 0 2px;
  font-size: 0.6rem;
  line-height: 1;
}

.btn-icon:hover {
  color: #fff;
}

#draw-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

#highlight-canvas {
  display: none;
  position: absolute;
  z-index: 3000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.site-footer {
  border-top: 1px solid #1f2937;
  padding: 1.5rem 2rem;
  background: #0d1117;
  font-size: 0.85rem;
  color: #9ca3af;
}

.site-footer__inner {
  max-width: 1024px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.site-footer__brand {
  color: #fff;
  font-size: 1rem;
}

.site-footer__copy {
  color: #6b7280;
  font-size: 0.8rem;
  margin-top: 0.75rem;
}

.site-footer__lang {
  background: #131720;
  color: #e5e7eb;
  border: 1px solid #2a2f3a;
  border-radius: 4px;
  padding: 0.25rem 1.75rem 0.25rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  width: max-content;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%239ca3af' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}

.site-footer__lang:focus {
  outline: none;
  border-color: #3b82f6;
}

.site-footer a {
  color: #9ca3af;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

/* ── Skip link ── */

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #3b82f6;
  color: #fff;
  padding: 8px 16px;
  z-index: 100000;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

#main-content {
  scroll-margin-top: 40px;
}

/* ── Focus styles for toolbar buttons ── */
.controls button:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
  border-radius: 4px;
}

/* ── Responsive ── */
/* ── Hamburger button: hidden on desktop ── */

.hamburger-btn {
  display: none !important;
}

@media (max-width: 1500px) {
  /* Show hamburger only in viewer mode */
  .controls.viewer-mode .hamburger-btn {
    display: flex !important;
  }

  .controls {
    padding: 0 6px;
  }

  /* Viewer-controls becomes a dropdown */
  .controls.viewer-mode #viewer-controls {
    position: absolute;
    top: 35px;
    left: 0;
    right: 0;
    background: #13171f;
    border-top: 1px solid #374151;
    padding: 8px;
    z-index: 10002;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 2px;
    max-height: calc(100vh - 35px);
    overflow-y: auto;
  }

  /* Open state toggled by hamburger */
  .controls.viewer-mode #viewer-controls.open {
    display: flex;
  }

  /* Buttons in menu show title label */
  #viewer-controls > button,
  #viewer-controls > .btn-icon {
    flex: 0 0 calc(50% - 2px);
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
  }

  #viewer-controls > button::after,
  #viewer-controls > .btn-icon::after {
    content: attr(data-tooltip);
    font-size: 0.8rem;
    white-space: nowrap;
  }

  /* Suppress hover tooltip popup in hamburger dropdown */
  #viewer-controls > button[data-tooltip]:hover::after {
    position: static;
    transform: none;
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    z-index: auto;
    pointer-events: auto;
  }

  /* Inputs in menu follow button width */
  #viewer-controls > input {
    flex: 0 0 calc(50% - 2px);
    box-sizing: border-box;
    padding: 8px 10px;
    margin-left: 12px;
  }

  #viewer-controls > #search-results-info {
    flex: 0 0 calc(50% - 2px);
    padding: 8px 10px;
    margin-left: 12px;
  }

  /* Page info wrapper */
  #viewer-controls > .controls__page-info {
    flex: 0 0 calc(50% - 2px);
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  /* Dividers visible as full-width separator */
  #viewer-controls > .controls__divider {
    display: block;
    flex: 0 0 100%;
    height: 1px;
    background: #374151;
    overflow: hidden;
    text-indent: -9999px;
    margin: 4px 0;
  }
}

@media (max-width: 768px) {
  #left-sidebar,
  #right-sidebar,
  #ai-chat-sidebar,
  #ai-helper-sidebar {
    width: 100%;
  }

  .library__grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .landing__tiers {
    flex-direction: column;
  }

  .landing__title {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .library__grid {
    grid-template-columns: 1fr;
  }

  .library {
    padding: 1rem;
  }

  .landing {
    padding: 1.5rem 1rem;
  }

  /* Smaller buttons in menu on very small screens */
  #viewer-controls > button {
    flex: 0 0 100%;
  }
}