:root {
  --bg: #07030d;
  --panel: #12071f;
  --panel-soft: #1d0b2e;
  --panel-glass: rgba(20, 8, 31, 0.86);
  --line: rgba(235, 201, 255, 0.10);
  --text: #f8edf8;
  --muted: #c5aecf;
  --accent: #c016ff;
  --accent-2: #7d1fff;
  --accent-3: #ff4fd8;
  --success: #68f5c5;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top center, rgba(199, 31, 255, 0.18), transparent 0 26%),
    radial-gradient(circle at 18% 18%, rgba(110, 0, 255, 0.22), transparent 0 24%),
    radial-gradient(circle at 82% 12%, rgba(255, 68, 196, 0.14), transparent 0 22%),
    linear-gradient(180deg, #12051b 0%, #09020f 36%, #050109 100%);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
}

body.age-locked {
  overflow: hidden;
}

.age-gate[hidden] {
  display: none;
}

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
}

.age-gate-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(10px);
}

.age-gate-panel {
  position: relative;
  width: min(560px, calc(100% - 24px));
  margin: 10vh auto;
  padding: 28px;
  border-radius: 12px;
  background:
    radial-gradient(circle at top, rgba(197, 22, 255, 0.18), transparent 0 38%),
    linear-gradient(180deg, #180724 0%, #0b0312 100%);
  border: 1px solid rgba(214, 122, 255, 0.22);
  box-shadow: var(--shadow);
}

.age-gate-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.02;
}

.age-gate-copy,
.age-gate-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.age-gate-note {
  margin-top: 12px;
  font-size: 0.92rem;
}

.age-gate-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.age-gate-enter,
.age-gate-leave {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.age-gate-enter {
  border: 0;
  background: linear-gradient(135deg, var(--accent-3), var(--accent));
  color: #19071f;
  font-weight: 700;
  cursor: pointer;
}

.age-gate-leave {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
}

.age-gate-enter:hover,
.age-gate-leave:hover {
  transform: translateY(-1px);
}

.page-shell {
  width: min(1380px, calc(100% - 28px));
  margin: 20px auto 36px;
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 18px 22px;
  background:
    linear-gradient(135deg, rgba(40, 8, 57, 0.92), rgba(13, 4, 20, 0.94)),
    var(--panel-glass);
  border: 1px solid var(--line);
  border-radius: 12px;
  position: sticky;
  top: 12px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: auto;
  height: 72px;
  max-width: 210px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(182, 24, 255, 0.18));
}

.searchbar {
  display: flex;
  gap: 10px;
  padding: 8px;
  background: rgba(11, 5, 18, 0.92);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.searchbar input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 0 14px;
  font-size: 0.98rem;
}

.searchbar button,
.admin-toggle,
.sort-select,
.filter-chip {
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.searchbar button {
  background: linear-gradient(135deg, var(--accent-3), var(--accent));
  color: #18061b;
  font-weight: 700;
}

.searchbar button,
.admin-toggle {
  padding: 12px 18px;
  border-radius: 10px;
}

.admin-toggle {
  background: rgba(186, 22, 255, 0.14);
  color: #f2c5ff;
  border: 1px solid rgba(208, 108, 255, 0.30);
}

.main-nav {
  display: flex;
  gap: 22px;
  align-items: center;
}

.topbar-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.96rem;
  letter-spacing: 0.02em;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--text);
}

.content {
  padding-top: 26px;
}

.section-kicker {
  margin: 0 0 10px;
  color: #eb9cff;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
}

.catalog-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding-top: 6px;
}

.catalog-header h1,
.catalog-header h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.7rem);
}

.catalog-intro {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.catalog-header-compact {
  margin-bottom: 14px;
}

.sort-box {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
}

.sort-select,
.filter-chip {
  padding: 12px 16px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: rgba(31, 11, 46, 0.92);
  border: 1px solid var(--line);
  text-decoration: none;
}

.sort-label {
  font-size: 0.88rem;
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.tag-directory {
  margin-bottom: 24px;
}

.tag-directory-bottom {
  margin-top: 34px;
  margin-bottom: 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.tag-directory-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  background: rgba(24, 8, 34, 0.9);
  border: 1px solid var(--line);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.tag-link:hover,
.tag-link.is-active {
  transform: translateY(-1px);
  border-color: rgba(232, 140, 255, 0.35);
  background: linear-gradient(135deg, rgba(191, 22, 255, 0.28), rgba(255, 79, 216, 0.18));
}

.banner-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.banner-row-bottom {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}

.banner-slot {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 118px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 79, 216, 0.16), transparent 0 30%),
    linear-gradient(135deg, rgba(111, 15, 150, 0.36), rgba(22, 8, 34, 0.92));
  border: 1px solid rgba(220, 118, 255, 0.18);
  border-radius: 10px;
  transition: transform 0.18s ease, border-color 0.18s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.banner-slot:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 140, 255, 0.34);
}

.banner-slot-wide {
  min-height: 132px;
}

.banner-kicker {
  color: #f0aeff;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.banner-slot strong {
  font-size: 1.1rem;
}

.banner-slot span:last-child {
  color: var(--muted);
}

.banner-slot::after {
  content: "Lien sponsorise";
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.03);
}

.filter-chip.active,
.filter-chip:hover,
.sort-select:hover,
.searchbar button:hover {
  transform: translateY(-1px);
}

.filter-chip.active {
  background: linear-gradient(135deg, rgba(191, 22, 255, 0.28), rgba(255, 79, 216, 0.18));
  border-color: rgba(232, 140, 255, 0.35);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.page-button {
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, border-color 0.18s ease;
}

.page-button:hover {
  transform: translateY(-1px);
  border-color: rgba(232, 140, 255, 0.35);
}

.page-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.page-indicator {
  margin: 0;
  color: var(--muted);
  min-width: 132px;
  text-align: center;
}

.video-card {
  background:
    linear-gradient(180deg, rgba(28, 10, 41, 0.88), rgba(9, 3, 15, 0.98));
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.video-card,
.video-card * {
  user-select: none;
}

.video-card:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 140, 255, 0.35);
}

.video-card:focus-visible {
  outline: 2px solid rgba(220, 118, 255, 0.7);
  outline-offset: 3px;
}

.video-card.is-hidden {
  display: none;
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.thumb::before,
.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
}

.thumb::before {
  z-index: 1;
  background:
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.12) 55%, rgba(0, 0, 0, 0.82) 100%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.07), transparent 30%);
}

.thumb:not(.has-media)::before {
  background:
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.12) 55%, rgba(0, 0, 0, 0.82) 100%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 30%),
    var(--thumb-background);
}

.thumb::after {
  z-index: 2;
  background:
    radial-gradient(circle at 22% 28%, rgba(255, 90, 220, 0.24), transparent 0 16%),
    radial-gradient(circle at 70% 62%, rgba(138, 72, 255, 0.18), transparent 0 18%);
  mix-blend-mode: screen;
  opacity: 0.7;
}

.thumb-poster,
.thumb-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.thumb-preview {
  opacity: 0;
  transition: opacity 0.18s ease;
}

.thumb.has-preview:not(.has-poster) .thumb-preview {
  opacity: 0.74;
}

.thumb.has-media:not(.media-ready) .thumb-preview {
  opacity: 0;
}

.video-card.is-previewing .thumb-preview {
  opacity: 1;
}

.video-card.is-previewing .thumb-poster {
  opacity: 0;
}

.thumb-fallback {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 22px;
  color: var(--text);
  text-align: left;
  opacity: 1;
  transition: opacity 0.18s ease;
}

.thumb.media-ready:not(.media-failed) .thumb-fallback {
  opacity: 0;
  pointer-events: none;
}

.thumb-fallback strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: clamp(1rem, 1.6vw, 1.38rem);
  line-height: 1.08;
}

.thumb-fallback small,
.thumb-source {
  width: fit-content;
  color: #f2b8ff;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.thumb-fallback small {
  padding: 5px 8px;
  border: 1px solid rgba(232, 140, 255, 0.24);
  border-radius: 8px;
  background: rgba(12, 3, 18, 0.42);
}

.thumb span {
  position: absolute;
  bottom: 12px;
  z-index: 4;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(17, 6, 24, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.quality {
  left: 12px;
  color: var(--success);
}

.duration {
  right: 12px;
  color: var(--text);
}

.card-body {
  padding: 14px;
}

.card-stats {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-body h3 {
  margin: 10px 0 8px;
  font-size: 1.08rem;
  line-height: 1.25;
}

.card-body p {
  margin: 0;
  color: var(--muted);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(220, 118, 255, 0.20);
  background: rgba(176, 38, 255, 0.09);
  color: #f4b8ff;
  font-size: 0.75rem;
  text-transform: lowercase;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.tag-pill:hover,
.tag-pill:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(232, 140, 255, 0.35);
  background: rgba(191, 22, 255, 0.18);
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 75;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
}

.auth-panel {
  position: relative;
  width: min(440px, calc(100% - 24px));
  margin: 8vh auto;
  padding: 24px;
  border-radius: 12px;
  background:
    radial-gradient(circle at top, rgba(197, 22, 255, 0.15), transparent 0 38%),
    linear-gradient(180deg, #180724 0%, #09030f 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.auth-header,
.auth-actions {
  display: flex;
  gap: 12px;
}

.auth-header {
  align-items: start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.auth-close {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form span {
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(20, 8, 31, 0.94);
  color: var(--text);
}

.auth-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-error {
  margin: 0;
  color: #ff8b8b;
  font-size: 0.92rem;
}

.auth-submit {
  width: 100%;
  padding: 12px 18px;
  border-radius: 10px;
  border: 0;
  background: linear-gradient(135deg, var(--accent-3), var(--accent));
  color: #19071f;
  font-weight: 700;
  cursor: pointer;
}

.admin-modal[hidden] {
  display: none;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
}

.admin-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.admin-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(520px, 100%);
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(197, 22, 255, 0.12), transparent 0 28%),
    linear-gradient(180deg, #12071c 0%, #09030f 100%);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.admin-header,
.admin-library-head,
.admin-actions,
.admin-grid {
  display: flex;
  gap: 12px;
}

.admin-header,
.admin-library-head {
  align-items: start;
  justify-content: space-between;
}

.admin-header {
  margin-bottom: 20px;
}

.admin-close,
.admin-reset,
.admin-clear-all {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-form span {
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-form input,
.admin-form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(20, 8, 31, 0.94);
  color: var(--text);
}

.admin-grid > label {
  flex: 1;
}

.admin-checkbox {
  flex-direction: row !important;
  align-items: center;
}

.admin-checkbox input {
  width: auto;
}

.admin-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.admin-save {
  flex: 1;
  padding: 12px 18px;
  border-radius: 10px;
  border: 0;
  background: linear-gradient(135deg, var(--accent-3), var(--accent));
  color: #19071f;
  font-weight: 700;
  cursor: pointer;
}

.admin-reset {
  min-width: 108px;
}

.admin-library {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.admin-library h4 {
  margin: 0;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.admin-item {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-radius: 10px;
  background: rgba(21, 8, 30, 0.96);
  border: 1px solid var(--line);
}

.admin-item-compact {
  justify-content: flex-start;
}

.admin-item strong,
.admin-item p {
  display: block;
}

.admin-item strong {
  margin-bottom: 4px;
}

.admin-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-item button {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.admin-empty {
  margin: 0;
  color: var(--muted);
  padding: 16px;
  border-radius: 10px;
  background: rgba(21, 8, 30, 0.72);
  border: 1px dashed var(--line);
}

.thumb-1 {
  --thumb-background:
    radial-gradient(circle at 20% 24%, rgba(255, 126, 225, 0.68), transparent 0 18%),
    radial-gradient(circle at 72% 20%, rgba(102, 26, 157, 0.8), transparent 0 20%),
    linear-gradient(140deg, #15071d, #5b1677 58%, #09020d);
}

.thumb-2 {
  --thumb-background:
    radial-gradient(circle at 55% 54%, rgba(255, 87, 214, 0.66), transparent 0 18%),
    radial-gradient(circle at 20% 30%, rgba(130, 51, 255, 0.44), transparent 0 20%),
    linear-gradient(140deg, #110516, #a018c8 52%, #290732);
}

.thumb-3 {
  --thumb-background:
    radial-gradient(circle at 32% 25%, rgba(255, 92, 191, 0.70), transparent 0 18%),
    radial-gradient(circle at 68% 40%, rgba(186, 108, 255, 0.54), transparent 0 14%),
    linear-gradient(145deg, #14051a, #672199 44%, #09020d);
}

.thumb-4 {
  --thumb-background:
    radial-gradient(circle at 62% 28%, rgba(255, 164, 238, 0.56), transparent 0 16%),
    radial-gradient(circle at 30% 70%, rgba(127, 41, 170, 0.50), transparent 0 18%),
    linear-gradient(145deg, #12051b, #3d0f5a 48%, #07020b);
}

.thumb-5 {
  --thumb-background:
    radial-gradient(circle at 64% 26%, rgba(255, 131, 237, 0.62), transparent 0 18%),
    radial-gradient(circle at 26% 38%, rgba(164, 47, 224, 0.48), transparent 0 16%),
    linear-gradient(150deg, #210a2a, #9818c4 48%, #09020d);
}

.thumb-6 {
  --thumb-background:
    radial-gradient(circle at 28% 34%, rgba(195, 88, 255, 0.56), transparent 0 16%),
    radial-gradient(circle at 66% 62%, rgba(255, 136, 223, 0.48), transparent 0 16%),
    linear-gradient(135deg, #17071e, #5e1587 48%, #08020a);
}

.thumb-7 {
  --thumb-background:
    radial-gradient(circle at 34% 50%, rgba(255, 76, 180, 0.48), transparent 0 16%),
    radial-gradient(circle at 66% 38%, rgba(188, 88, 255, 0.56), transparent 0 16%),
    linear-gradient(145deg, #100414, #6b1279 52%, #060108);
}

.thumb-8 {
  --thumb-background:
    radial-gradient(circle at 70% 40%, rgba(255, 150, 240, 0.62), transparent 0 16%),
    radial-gradient(circle at 30% 36%, rgba(99, 32, 145, 0.52), transparent 0 18%),
    linear-gradient(145deg, #14051a, #71148c 48%, #07020b);
}

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

  .main-nav {
    flex-wrap: wrap;
  }

  .topbar-actions {
    flex-wrap: wrap;
  }

  .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 18px, 100%);
    margin-top: 10px;
  }

  .topbar {
    padding: 18px;
  }

  .searchbar {
    flex-direction: column;
    border-radius: 10px;
  }

  .searchbar button {
    width: 100%;
  }

  .catalog-header,
  .sort-box,
  .pagination,
  .age-gate-actions,
  .auth-header,
  .admin-header,
  .admin-library-head,
  .auth-actions,
  .admin-actions,
  .admin-grid {
    flex-direction: column;
    align-items: stretch;
  }

  .page-indicator {
    min-width: 0;
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .banner-row,
  .banner-row-bottom {
    grid-template-columns: 1fr;
  }
}

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

  .brand-logo {
    height: 54px;
    max-width: 170px;
  }
}
