/* =========================
   Layout base
   ========================= */

main.site-container {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.part-page {
  width: 100%;
  max-width: none;
  margin: 0;
}

html {
  background: var(--bg, #0b0b0b);
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg, #0b0b0b);
  color: var(--text, #fff);
}


/* =========================
   Theme tokens
   ========================= */

body.theme-dark {
  --panel-bg: rgba(15, 15, 15, 0.72);
  --panel-border: rgba(255, 255, 255, 0.10);

  --card-bg: rgba(30, 30, 32, 0.82);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);

  --card-status-partial: rgba(8, 56, 133, 0.42);
  --card-status-wish: rgba(185, 24, 24, 0.552);
  --card-status-owned: rgba(0, 178, 65, 0.548);
  --card-status-inbox: rgba(212, 186, 38, 0.646);

  --stats-card-bg: rgba(28, 28, 28, 0.82);
  --stats-card-border: rgba(255, 255, 255, 0.10);

  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.80);

  --input-bg: rgba(255, 255, 255, 0.06);
  --input-border: rgba(255, 255, 255, 0.16);

  --btn-surface: rgba(0, 0, 0, 0.35);
  --btn-surface-hover: rgba(0, 0, 0, 0.50);
  --btn-border: rgba(255, 255, 255, 0.16);

  --img-placeholder-bg: #2a2a2a;
  --img-placeholder-text: rgba(255, 255, 255, 0.55);

  --own-menu-bg: rgba(17, 24, 39, 0.95);
  --own-menu-border: rgba(255, 255, 255, 0.10);
  --own-menu-text: #f9fafb;

  --part-bg-fallback: url("/static/main_img/NoIMG/NoIMG_bg_NIGHT.webp");
}

body.theme-light {
  --panel-bg: rgba(255, 255, 255, 0.84);
  --panel-border: rgba(0, 0, 0, 0.12);

  --card-bg: rgba(242, 239, 228, 0.96);
  --card-border: rgba(78, 72, 45, 0.18);
  --card-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);

  --card-status-partial: rgba(36, 110, 230, 0.489);
  --card-status-wish: rgba(255, 73, 73, 0.761);
  --card-status-owned: rgba(0, 180, 75, 0.497);
  --card-status-inbox: rgb(255, 232, 102);

  --stats-card-bg: rgba(248, 248, 248, 0.96);
  --stats-card-border: rgba(0, 0, 0, 0.10);

  --text: #111111;
  --muted: rgba(0, 0, 0, 0.70);

  --input-bg: rgba(255, 255, 255, 0.92);
  --input-border: rgba(0, 0, 0, 0.16);

  --btn-surface: rgba(255, 255, 255, 0.78);
  --btn-surface-hover: rgba(255, 255, 255, 0.94);
  --btn-border: rgba(0, 0, 0, 0.14);

  --img-placeholder-bg: #e5e5e5;
  --img-placeholder-text: rgba(0, 0, 0, 0.45);

  --own-menu-bg: rgba(255, 255, 255, 0.96);
  --own-menu-border: rgba(0, 0, 0, 0.12);
  --own-menu-text: #111111;

  --part-bg-fallback: url("/static/main_img/NoIMG/NoIMG_bg_LIGHT.webp");
}


/* =========================
   Background wrap
   ========================= */

.part-bg-wrap {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;

  background-color: #0b0b0b;
  background-image: var(--part-bg-url, var(--part-bg-fallback));
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

.part-bg-wrap.bg-repeat {
  background-repeat: repeat-y;
  background-size: 100% auto;
  background-position: center center;
  background-attachment: scroll;
}

.part-bg-wrap.bg-single {
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}


/* =========================
   Main containers
   ========================= */

.part-header {
  width: min(1200px, 94vw);
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
}

.part-panel {
  width: min(1100px, 94vw);
  margin: 0 auto;
  padding: 14px;
  box-sizing: border-box;
  overflow-x: hidden;

  border-radius: 18px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  color: var(--text);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.filters,
.actions,
.figure-filters-panel,
.grid,
.collection-stats,
.footer-links,
footer {
  width: min(980px, 94vw);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}


/* =========================
   Root utilities
   ========================= */

:root {
  --grid-gap: 12px;
}

.filter-hidden {
  display: none;
}

@media (max-width: 480px) {
  :root {
    --grid-gap: 8px;
  }
}

@media (min-width: 1600px) {
  :root {
    --grid-gap: 16px;
  }
}


/* =========================
   Buttons
   ========================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 12px;

  background: var(--btn-surface);
  border: 1px solid var(--btn-border);
  color: var(--text);

  font-size: 0.92rem;
  text-decoration: none;
  user-select: none;
  cursor: pointer;

  transition:
    background-color 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.08s ease;
}

.btn:hover {
  background: var(--btn-surface-hover);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}


/* =========================
   Header pills
   ========================= */

.hdr-pill-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;

  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;

  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.08s ease;
}

.hdr-pill-link:hover {
  background: rgba(0, 0, 0, 0.72);
  border-color: rgba(255, 255, 255, 0.30);
}

.hdr-pill-link:active {
  transform: translateY(1px);
}

body.theme-light .hdr-pill-link {
  background: rgba(255, 255, 255, 0.70);
  border-color: rgba(0, 0, 0, 0.18);
  color: #111111;
}

body.theme-light .hdr-pill-link:hover {
  background: rgba(255, 255, 255, 0.88);
}


/* =========================
   Part filters
   ========================= */

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;

  margin: 10px auto;
  padding: 0 6px;
}

.part-pill-link {
  text-decoration: none;
}

.part-pill-link button {
  min-width: 140px;
  padding: 14px 20px;
  border-radius: 12px;

  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.2px;

  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.08s ease,
    box-shadow 0.2s ease;
}

.part-pill-link button:active {
  transform: translateY(1px);
}

body.theme-dark .part-pill-link button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
}

body.theme-dark .part-pill-link button:hover {
  background: rgba(255, 255, 255, 0.14);
}

body.theme-dark .part-pill-link button.active {
  background: #ffffff;
  color: #111111;
  border-color: #111111;
}

body.theme-light .part-pill-link button {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.25);
  color: #111111;
}

body.theme-light .part-pill-link button:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.45);
}

body.theme-light .part-pill-link button.active {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
}


/* =========================
   Top actions row
   ========================= */

.actions {
  display: flex;
  align-items: center;
  gap: 12px;

  margin: 8px auto;
  padding: 0 6px;
  max-width: 100%;
}

.actions-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.actions-left > .btn {
  white-space: nowrap;
}

.figure-filters-bar {
  margin-left: auto;
  flex-shrink: 0;

  display: flex;
  justify-content: flex-end;
}


/* =========================
   Filters flyout
   ========================= */

.figure-filters-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--btn-border);

  background: var(--btn-surface);
  color: var(--text);

  font-size: 0.9rem;
  cursor: pointer;

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.figure-filters-toggle-badge {
  padding: 1px 6px;
  border-radius: 999px;

  background: #2563eb;
  color: #ffffff;
  font-size: 0.75rem;
}

.figure-filters-panel {
  position: relative;
  margin: 0 auto 10px;
  padding: 0 6px;
}

.figure-filters-card {
  position: absolute;
  right: 6px;
  z-index: 9999;

  width: min(100%, 420px);
  padding: 12px 14px 14px;

  display: none;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  color: var(--text);

  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.figure-filters-card.open {
  display: block;
}

.figure-filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.figure-filters-header-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.figure-filters-close {
  padding: 0 4px;
  border: none;
  background: transparent;
  color: var(--muted);

  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.figure-filters-scope {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;

  margin-bottom: 8px;
  font-size: 0.86rem;
}

.scope-title {
  font-weight: 700;
}

.scope-select {
  min-width: 180px;
  padding: 6px 10px;
  border-radius: 999px;

  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);

  font-size: 0.86rem;
  outline: none;
}

.scope-select:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.check-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 10px;
  font-size: 0.85rem;
}

.figure-filters-tags {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 10px;
}

.figure-filter-group {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);

  background: rgba(255, 255, 255, 0.14);
  font-size: 0.84rem;
}

body.theme-light .figure-filter-group {
  background: rgba(0, 0, 0, 0.04);
}

.figure-filter-group-title {
  margin-bottom: 6px;
  font-weight: 700;
}

.figure-filter-group-body {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.figure-filter-group-body label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.figure-filters-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;

  font-size: 0.86rem;
}

.figure-filters-actions .btn,
.figure-filters-actions button,
.figure-filters-actions a {
  padding: 6px 12px;
  border-radius: 999px;
}

.figure-filters-actions button {
  border: none;
  background: #2563eb;
  color: #ffffff;
  cursor: pointer;
}

.figure-filters-actions a {
  background: var(--btn-surface);
  border: 1px solid var(--btn-border);
  color: var(--text);
  text-decoration: none;
}


/* =========================
   Gallery grid
   ========================= */

.grid {
  display: grid;
  gap: var(--grid-gap);

  margin: 14px auto 0;
  padding: 0 6px;
}

#gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}


/* =========================
   Group blocks
   ========================= */

.group-block {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding: 10px 0 6px;
  border-top: 1px solid var(--panel-border);
}

.group-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.group-title {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
}

.group-desc {
  color: var(--muted);
  white-space: pre-wrap;
}

.group-header .actions {
  width: 100%;
  margin-top: 4px;
  padding: 0;

  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.group-body {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: var(--grid-gap);
}

.group-body .card {
  flex: 1 1 var(--card-min, 200px);
  max-width: var(--card-max, 360px);
}


/* =========================
   Card sizes
   ========================= */

.card {
  min-width: 0;
}

.card--S {
  --card-min: 110px;
  --card-max: 150px;
}

.card--M {
  --card-min: 200px;
  --card-max: 260px;
}

.card--L {
  --card-min: 320px;
  --card-max: 360px;
}

.card--XL {
  --card-min: 450px;
  --card-max: 520px;
}

.card .btn {
  white-space: normal;
}


/* =========================
   Figure cards
   ========================= */

.card {
  position: relative;
  min-width: 0;
  padding: 10px;
  border-radius: 22px;

  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text);

  --inner-frame-color: transparent;
  --inner-frame-size: 10px;

  box-shadow: var(--card-shadow);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  transition:
    background-color 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.12s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;

  box-shadow: inset 0 0 0 var(--inner-frame-size) var(--inner-frame-color);
}

.card > * {
  position: relative;
  z-index: 2;
}

.card-title {
  margin: 8px 0 0;
  text-align: center;
  font-weight: 700;
  color: var(--text);
}


/* =========================
   Card status layers
   ========================= */

.card:not([data-frame-locked="1"]).is-own-partial {
  --inner-frame-color: var(--card-status-partial);
}

.card:not([data-frame-locked="1"]):has(.own-menu .own-option-checkbox:checked):has(.own-menu .own-option-checkbox:not(:checked)) {
  --inner-frame-color: var(--card-status-partial);
}

.card:not([data-frame-locked="1"]):has(.flag-wish.is-active) {
  --inner-frame-color: var(--card-status-wish);
}

.card:not([data-frame-locked="1"]):has(.flag-own.is-active) {
  --inner-frame-color: var(--card-status-owned);
}

.card:not([data-frame-locked="1"]):has(.flag-inbox.is-active) {
  --inner-frame-color: var(--card-status-inbox);
}

.card:has(.flag-inbox.is-active)::after {
  content: "👑";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);

  z-index: 6;
  pointer-events: none;

  padding: 4px 8px;
  border-radius: 999px;

  background: rgba(255, 217, 102, 0.95);
  color: #78350f;

  font-size: 20px;
  line-height: 1;

  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}


/* =========================
   Card image
   ========================= */

.card-image {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.20);
}

/* aspect ratios */
.card-image.imgH-S { aspect-ratio: 4 / 3; }
.card-image.imgH-M { aspect-ratio: 1 / 1; }
.card-image.imgH-L { aspect-ratio: 3 / 4; }
.card-image.imgH-XL { aspect-ratio: 9 / 16; }

.card-image-link {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 6;
  text-decoration: none;
  cursor: pointer;
}

.card-image-link .img-main,
.card-image-link .img-hover,
.card-image > img.img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* hover image overlay */
.card-image-link .img-main,
.card-image-link .img-hover {
  position: absolute;
  inset: 0;
  transition: opacity 0.25s ease;
}

.card-image-link .img-main {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.card-image-link .img-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  z-index: 2;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.card:hover .card-image-link:has(.img-hover) .img-main {
  opacity: 0;
}

.card:hover .card-image-link .img-hover {
  opacity: 1;
}

.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--img-placeholder-bg);
  color: var(--img-placeholder-text);
  text-align: center;
  font-size: 0.9rem;
}

.card-image .img-placeholder {
  position: absolute;
  inset: 0;
  padding: 12px;
}


/* =========================
   Rarity dot
   ========================= */

.rarity-dot {
  position: absolute;
  top: 8px;
  left: 8px;

  width: 11px;
  height: 11px;
  border-radius: 50%;

  background: var(--rarity-dot, #999999);
  opacity: 0.95;

  z-index: 25;
  pointer-events: none;

  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.35);
}


/* =========================
   18+ blur
   ========================= */

.card.is-18 .img {
  filter: blur(16px);
  transform: scale(1.04);
}

.card.is-18 .card-image {
  overflow: hidden;
}


/* =========================
   Card admin actions
   ========================= */

.figure-admin-actions {
  margin-top: 8px;
  text-align: right;
}

.btn-admin-edit,
.btn-admin-delete {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;

  font-size: 0.78rem;
  text-decoration: none;
}

.btn-admin-edit {
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.22);
  color: #1d4ed8;
}

.btn-admin-edit:hover {
  background: rgba(37, 99, 235, 0.16);
}

.btn-admin-delete {
  margin-left: 6px;
  background: rgba(255, 80, 80, 0.12);
  border-color: rgba(255, 80, 80, 0.25);
  color: #ff0000;
  cursor: pointer;
}


/* =========================
   Figure flags
   ========================= */

.figure-flags {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.flag-button,
.own-menu {
  position: relative;
  z-index: 8;
}

.flag-button {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--btn-border);

  background: var(--btn-surface);
  color: var(--text);

  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.08s ease;
}

.flag-button:hover {
  transform: translateY(-1px);
}

.flag-wish {
  position: absolute;
  top: 8px;
  right: 10px;
  color: #ef4444;
}

.flag-button.is-active.flag-wish {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(50, 24, 24, 0.45);
  color: #ef4444;
}

.flag-row {
  position: absolute;
  left: 10px;
  bottom: 10px;

  display: flex;
  align-items: center;
  gap: 8px;
}

.flag-row .flag-more {
  font-size: 18px;
}

.flag-own {
  color: var(--text);
}

.flag-button.is-active.flag-own {
  background: rgba(22, 163, 74, 0.14);
  border-color: rgba(22, 163, 74, 0.35);
  color: #16a34a;
}

.flag-button.is-partial.flag-own {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.35);
  color: #3b82f6;
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.18);
}

.flag-inbox {
  color: #a16207;
}

.flag-button.is-active.flag-inbox {
  background: rgba(250, 204, 21, 0.90);
  border-color: rgba(234, 179, 8, 0.95);
  color: #713f12;
}


/* =========================
   Own menu dropdown
   ========================= */

.own-menu {
  position: fixed;
  top: 0;
  left: 0;

  min-width: 200px;
  max-width: min(320px, 92vw);
  max-height: min(320px, 60vh);
  overflow: auto;

  display: none;
  z-index: 999999;
  pointer-events: auto;

  padding: 10px 12px;
  border-radius: 12px;

  background: var(--own-menu-bg);
  border: 1px solid var(--own-menu-border);
  color: var(--own-menu-text);

  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.own-menu.open {
  display: block;
}

.own-menu-title {
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.9;
}

.own-menu-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
}

.own-menu-item input[type="checkbox"] {
  margin: 0;
}

.own-menu--readonly {
  opacity: 0.92;
}


/* =========================
   Stats block
   ========================= */

.collection-stats {
  margin: 30px auto 18px;
  padding: 16px 18px 20px;
  border-radius: 18px;

  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  color: var(--text);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.collection-stats h2 {
  margin: 0 0 16px;
  text-align: center;
  font-size: 1.25rem;
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--grid-gap);
  align-items: stretch;
}

.stats-card {
  padding: 12px 14px;
  border-radius: 14px;

  text-align: center;
  background: var(--stats-card-bg);
  border: 1px solid var(--stats-card-border);

  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

body.theme-light .stats-card {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.stats-label {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.85rem;
}

.stats-value {
  color: var(--text);
  font-size: 1.6rem;
  font-weight: 800;
}


/* =========================
   Footer section
   ========================= */

.footer-links {
  margin: 18px auto 12px;
  padding: 14px 16px;
  border-radius: 18px;

  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  color: var(--text);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.footer-links a {
  color: inherit;
  text-decoration: underline;
}

footer {
  margin: 14px auto 18px;
  text-align: center;
  font-size: 16px;
  opacity: 0.85;
  color: var(--text);
}


/* =========================
   Mobile tweaks
   ========================= */

@media (max-width: 760px) {
  .part-bg-wrap {
    padding: 10px 0 18px;
  }

  .filters,
  .actions,
  .figure-filters-panel,
  .grid,
  .collection-stats,
  .footer-links,
  footer {
    width: min(720px, 96vw);
  }
}

@media (max-width: 640px) {
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .figure-filters-bar {
    align-self: flex-end;
    justify-content: flex-end;
  }

  .figure-filters-card {
    right: 0;
    left: 0;
    width: auto;
    margin-inline: 10px;
  }
}