﻿/* ============================================================
   ROOT — BASE STYLESHEET
   ------------------------------------------------------------
   Table of contents:
     01. Design Tokens (CSS Variables)
     02. Reset & Base
     03. Layout Utilities
     04. Site Header
     05. Logo
     06. Primary Navigation (desktop)
     07. Mobile Navigation
     08. Hero Section
     09. Search Bar
     10. Section Headers
     11. Category Grid
     12. Cards Grid
     13. Placeholder Blocks
     14. Category Header
     15. Empty State
     16. Site Footer
     17. Back to Top
     18. Lightbox
     19. Prose Content
     20. Contact Form
     21. Responsive — Tablet (≤720px)
     22. Responsive — Mobile (≤480px)
     23. Accessibility — Reduced Motion
     24. Load More Button
   ============================================================ */


/* ============================================================
   01. DESIGN TOKENS
   ============================================================ */
:root {
  --bg: #05070d; --bg-2: #0a0e18; --card: #10141f; --card-2: #161b28;
  --border: #1f2533; --border-2: #2c3549;
  --text: #eef1f7; --text-2: #a2acc0; --text-3: #67718a;
  --ps-blue: #0070d1; --ps-blue-2: #2b8fff; --ps-cyan: #4ad9ff;
  --p3t: #56e39f; --radius: 14px; --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,.5);
  --shadow-glow: 0 0 40px rgba(43,143,255,.15);
  --ease: cubic-bezier(.4,0,.2,1);
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}


/* ============================================================
   02. RESET & BASE
   ============================================================ */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  background:
    linear-gradient(rgba(5,7,13,.95), rgba(5,7,13,.95)),
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(43,143,255,.08), transparent),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(74,217,255,.04), transparent);
  background-attachment: fixed;
}

a {
  color: var(--ps-blue-2);
  text-decoration: none;
  transition: color .15s var(--ease);
}

a:hover { color: var(--ps-cyan); }

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  line-height: 1.30;
  margin: 0 0 .5em;
}

hr.solid {
  border: none;
  border-bottom: 2px solid rgba(74,158,255,.2);
  position: relative;
  margin: 24px 0;
}

hr.solid::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #4a9eff, transparent);
}


/* ============================================================
   03. LAYOUT UTILITIES
   ============================================================ */
.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px;
}

main {
  padding-top: 24px;
  position: relative;
  z-index: 1;
}


/* ============================================================
   04. SITE HEADER
   ============================================================ */
header.site {
  border-bottom: 1px solid var(--border);
  background: rgba(5,7,13,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  animation: slideDown .4s var(--ease);
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to   { transform: none; }
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}


/* ============================================================
   05. LOGO
   ============================================================ */
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.logo:hover { color: var(--text); }

.logo-img {
  height: 56px;
  width: auto;
  display: block;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.logo-text .sub {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ps-cyan);
}


/* ============================================================
   06. PRIMARY NAVIGATION (desktop)
   ============================================================ */
nav.main {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

nav.main a {
  color: var(--text-2);
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  transition: all .15s var(--ease);
}

nav.main a:hover {
  color: var(--text);
  background: var(--card);
}

nav.main a.active {
  color: var(--text);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--border);
}


/* ============================================================
   07. MOBILE NAVIGATION
   ============================================================ */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: 0;
  cursor: pointer;
  border-radius: 8px;
  margin-left: auto;
  transition: background .15s var(--ease);
}

.nav-toggle:hover { background: var(--card); }

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ============================================================
   08. HERO SECTION
   ============================================================ */
.hero {
  padding: 10px 0 10px;
  position: relative;
}

.hero h1 {
  font-size: 52px;
  margin: 0 0 16px;
  letter-spacing: -2px;
  font-weight: 800;
  line-height: 1.05;
  background: linear-gradient(180deg, #fff 0%, #a2acc0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeUp .6s var(--ease) backwards;
}

.hero p {
  color: var(--text-2);
  font-size: 18px;
  margin: 0;
  max-width: 700px;
  line-height: 1.6;
  animation: fadeUp .6s .1s var(--ease) backwards;
}

.hero .stats {
  display: flex;
  gap: 20px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.hero .stat {
  background: linear-gradient(180deg, var(--card) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 22px;
  min-width: 130px;
  position: relative;
  overflow: hidden;
  animation: fadeUp .5s var(--ease) backwards;
}

.hero .stat:nth-child(1) { animation-delay: .2s; }
.hero .stat:nth-child(2) { animation-delay: .3s; }
.hero .stat:nth-child(3) { animation-delay: .4s; }
.hero .stat:nth-child(4) { animation-delay: .5s; }

.hero .stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ps-blue-2), transparent);
  opacity: .5;
}

.hero .stat b {
  display: block;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.5px;
  background: linear-gradient(180deg, #fff 0%, #8fbaff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .stat span {
  color: var(--text-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}


/* ============================================================
   09. SEARCH BAR
   ============================================================ */
.searchbar {
  display: flex;
  gap: 10px;
  margin: 28px 0 48px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  max-width: auto;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.searchbar:focus-within {
  border-color: var(--ps-blue);
  box-shadow: 0 0 0 4px rgba(43,143,255,.12);
}

.searchbar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  padding: 12px 16px;
}

.searchbar input::placeholder { color: var(--text-3); }

.searchbar select {
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  outline: none;
}

.searchbar select:focus { border-color: var(--ps-blue); }


/* ============================================================
   10. SECTION HEADERS
   ============================================================ */
h2.section {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--text-3);
  margin: 56px 0 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 14px;
}

h2.section::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

h2.section .count {
  color: var(--text-3);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  padding: 4px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
}


/* ============================================================
   11. CATEGORY GRID
   ============================================================ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin: 24px 0 40px;
}

.cat-tile {
  display: block;
  position: relative;
  aspect-ratio: 1/1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  transition: transform .25s var(--ease),
              border-color .25s var(--ease),
              box-shadow .25s var(--ease);
  color: var(--text);
  text-decoration: none;
}

.cat-tile:hover {
  transform: translateY(-4px);
  border-color: var(--border-2);
  box-shadow: var(--shadow), var(--shadow-glow);
  color: var(--text);
}

.cat-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease), filter .3s var(--ease);
  filter: brightness(.85) saturate(.95);
}

.cat-tile:hover img {
  transform: scale(1.06);
  filter: brightness(1) saturate(1.1);
}

.cat-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(5,7,13,.55) 65%, rgba(5,7,13,.95) 100%);
  pointer-events: none;
}

.cat-tile .tile-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px 22px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cat-tile .tile-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.3px;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.8);
}

.cat-tile .tile-meta {
  font-size: 12px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
}

.cat-tile .tile-arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(5,7,13,.75);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-2);
  border: 1px solid rgba(255,255,255,.1);
  transition: all .25s var(--ease);
  z-index: 2;
}

.cat-tile:hover .tile-arrow {
  background: var(--ps-blue);
  color: #fff;
  border-color: var(--ps-blue-2);
  box-shadow: 0 0 20px rgba(43,143,255,.6);
  transform: translate(2px, -2px);
}


/* ============================================================
   12. CARDS GRID
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s var(--ease),
              border-color .2s var(--ease),
              box-shadow .2s var(--ease);
  position: relative;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-2);
  box-shadow: var(--shadow), 0 0 0 1px rgba(43,143,255,.15);
}

.card .thumb {
  aspect-ratio: 16/10;
  background: #03050a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
  cursor: zoom-in;
}

.card:hover .thumb img { transform: scale(1.05); }

.card .body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card .title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card .author {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: -4px;
}

.card .author::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ps-cyan);
  opacity: .7;
  flex-shrink: 0;
}

.card .author .name {
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
}

.card .meta {
  font-size: 11px;
  color: var(--text-3);
  display: flex;
  gap: 10px;
  margin-top: auto;
  font-weight: 500;
}

.card .meta span + span::before {
  content: '·';
  margin-right: 10px;
  color: var(--text-3);
}

.card .actions {
  display: flex;
  gap: 6px;
}

.card .actions a {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-2);
  transition: all .15s var(--ease);
  letter-spacing: .2px;
}

.card .actions a:hover {
  background: var(--card-2);
  color: var(--text);
  border-color: var(--border-2);
}

.card .actions a.p3t {
  border-color: rgba(86,227,159,.35);
  color: var(--p3t);
  background: rgba(86,227,159,.04);
}

.card .actions a.p3t:hover {
  background: rgba(86,227,159,.12);
  border-color: rgba(86,227,159,.6);
  color: #7fffbb;
}

.card .actions a.disabled {
  opacity: .3;
  pointer-events: none;
}


/* ============================================================
   13. PLACEHOLDER BLOCKS
   ============================================================ */
.placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-3);
  background: linear-gradient(135deg, rgba(43,143,255,.06), rgba(74,217,255,.03)),
              repeating-linear-gradient(45deg, rgba(255,255,255,.008) 0px, rgba(255,255,255,.008) 8px, transparent 8px, transparent 16px);
  position: relative;
}

.placeholder::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(255,255,255,.06);
  border-radius: 8px;
  pointer-events: none;
}

.placeholder .ph-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--ps-blue), var(--ps-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.5px;
  box-shadow: 0 0 24px rgba(74,217,255,.25);
  opacity: .8;
}

.placeholder .ph-text {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-3);
}
/* ===== NSFW placeholder fix =====
   The base stylesheet paints .ph-icon as a 42x42 gradient chip.
   On archive card thumbnails we only want plain text, so scope the
   reset to .card .thumb .placeholder only. Everything else keeps the chip. */
.card .thumb .placeholder .ph-icon {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  background-image: none;
  box-shadow: none;
  opacity: 1;
  display: inline-block;
  line-height: 1;
}
.card .thumb .placeholder.nsfw .ph-icon {
  background: transparent;
  background-image: none;
  box-shadow: none;
  color: #c76b86;
}

/* ============================================================
   14. CATEGORY HEADER
   ============================================================ */
.cat-header { padding: 10px 0 28px; }

.cat-header .back {
  color: var(--text-3);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-weight: 500;
  transition: color .15s var(--ease), gap .15s var(--ease);
}

.cat-header .back:hover {
  color: var(--ps-cyan);
  gap: 10px;
}

.cat-header h1 {
  font-size: 40px;
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  background: linear-gradient(180deg, #fff 0%, #8fbaff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cat-header .count {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
}

.cat-header .count b {
  color: var(--text);
  font-weight: 700;
}


/* ============================================================
   15. EMPTY STATE
   ============================================================ */
.empty {
  padding: 80px 24px;
  text-align: center;
  color: var(--text-3);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}


/* ============================================================
   16. SITE FOOTER
   ============================================================ */
footer.site {
  border-top: 1px solid var(--border);
  margin-top: 100px;
  padding: 36px 0;
  color: var(--text-3);
  font-size: 13px;
}

footer.site .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

footer.site a { color: var(--text-2); }

footer.site .ps-mark {
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
}


/* ============================================================
   17. BACK TO TOP
   ============================================================ */
#backToTop {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ps-blue), var(--ps-blue-2));
  color: #fff;
  border: 1px solid var(--ps-blue-2);
  box-shadow: 0 8px 32px rgba(43,143,255,.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px) scale(.8);
  pointer-events: none;
  transition: all .3s var(--ease);
  z-index: 90;
}

#backToTop.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

#backToTop:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(43,143,255,.6), 0 0 0 8px rgba(74,217,255,.08);
}

#backToTop svg {
  width: 18px;
  height: 18px;
}


/* ============================================================
   18. LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.94);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox.open {
  display: flex;
  animation: lbIn .25s var(--ease);
}

@keyframes lbIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox .lb-stage {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: lbZoom .3s var(--ease);
}

@keyframes lbZoom {
  from { opacity: 0; transform: scale(.94); }
  to   { opacity: 1; transform: none; }
}

.lightbox img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 12px;
  box-shadow: 0 20px 80px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.05);
}

.lightbox .lb-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  background: rgba(16,20,31,.9);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.lightbox .lb-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.lightbox .lb-author {
  color: var(--text-3);
  font-size: 12px;
  font-style: italic;
}

.lightbox .lb-dl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--ps-blue), var(--ps-blue-2));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--ps-blue-2);
  box-shadow: 0 0 24px rgba(43,143,255,.5);
  transition: all .2s var(--ease);
  text-decoration: none;
}

.lightbox .lb-dl:hover {
  color: #fff;
  box-shadow: 0 0 36px rgba(74,217,255,.7);
  transform: translateY(-1px);
}

.lightbox .lb-dl svg {
  width: 14px;
  height: 14px;
}

.lightbox .close {
  position: absolute;
  top: 24px;
  right: 28px;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  opacity: .6;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all .15s var(--ease);
}

.lightbox .close:hover {
  opacity: 1;
  background: rgba(255,255,255,.1);
  transform: rotate(90deg);
}


/* ============================================================
   19. PROSE CONTENT
   ============================================================ */
.prose {
  max-width: 760px;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.75;
}

.prose h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-3);
  font-weight: 700;
  margin: 48px 0 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.prose h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.prose p { margin: 0 0 18px; }

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose a {
  color: var(--ps-blue-2);
  border-bottom: 1px solid transparent;
  transition: border-color .15s var(--ease);
}

.prose a:hover {
  color: var(--ps-cyan);
  border-bottom-color: var(--ps-cyan);
}

.prose ul,
.prose ol {
  padding-left: 22px;
  margin: 0 0 22px;
}

.prose li { margin-bottom: 8px; }

.prose code {
  background: var(--card);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text);
  border: 1px solid var(--border);
}


/* ============================================================
   20. CONTACT FORM
   ============================================================ */
.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 640px;
  margin: 28px 0 0;
}

.contact-form .field { margin-bottom: 20px; }

.contact-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  border-color: var(--ps-blue);
  box-shadow: 0 0 0 4px rgba(43,143,255,.12);
}

.contact-form textarea {
  resize: vertical;
  min-height: 160px;
}

.contact-form button {
  background: linear-gradient(135deg, var(--ps-blue), var(--ps-blue-2));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 10px;
  border: 1px solid var(--ps-blue-2);
  cursor: pointer;
  letter-spacing: .3px;
  box-shadow: 0 0 24px rgba(43,143,255,.35);
  transition: all .2s var(--ease);
}

.contact-form button:hover {
  box-shadow: 0 0 36px rgba(74,217,255,.6);
  transform: translateY(-1px);
}

.contact-form .hint {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 6px;
  font-style: italic;
}



/* ============================================================
   21. RESPONSIVE — TABLET (≤1060px, covers iPad portrait & landscape)
   ============================================================ */
@media (max-width: 1060px) {
  .wrap { padding: 0 18px; }

  /* --- Header row: logo + hamburger --- */
  header.site .wrap {
    gap: 12px;
    padding: 0 18px;
    min-height: 68px;
    height: auto;
    align-items: center;
    flex-wrap: nowrap;
    position: relative;   /* anchor for nav.main dropdown */
  }

  /* Logo stacks: image on top, text underneath */
  .logo {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    flex-shrink: 1;
    min-width: 0;
    max-width: calc(100% - 52px);
  }

  .logo-img {
    height: 28px;
    width: auto;
    margin: 0;
  }

  .logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    line-height: 1;
    min-width: 0;
  }

  .logo-text .sub {
    font-size: 10px;
    letter-spacing: 1.2px;
    line-height: 1;
    margin: 0;
    padding: 0 0 0 50px;
    white-space: nowrap;
  }

  /* --- Hamburger --- */
  .nav-toggle {
    display: flex;
    flex-shrink: 0;
    align-self: center;
    margin-left: auto;
  }

  /* --- Mobile dropdown nav --- */
  nav.main {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    padding: 12px 18px 18px;
    background: rgba(5,7,13,.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 32px rgba(0,0,0,.5);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height .35s var(--ease),
                opacity .25s var(--ease),
                visibility .25s var(--ease);
    box-sizing: border-box;
    z-index: 99;
  }

  nav.main.open {
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
  }

  nav.main a {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 15px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  nav.main a + a {
    border-top: 1px solid var(--border);
  }

  /* --- Search bar: stack vertically --- */
  .searchbar,
  #home-searchbar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px;
    padding: 10px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin: 20px 0 32px;
  }

  .searchbar > *,
  #home-searchbar > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .searchbar input,
  .searchbar select,
  .searchbar button {
    width: 100%;
    flex: none;
    min-width: 0;
  }

  .searchbar select {
    padding: 12px 14px;
  }

  /* --- NSFW toggle: grid so checkbox + text never collide --- */
  .searchbar .nsfw-toggle,
  #home-searchbar .nsfw-toggle,
  .nsfw-toggle {
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    align-items: center !important;
    column-gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 12px 14px !important;
    background: var(--bg-2, #0a0e18) !important;
    border: 1px solid var(--border, #1f2533) !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    color: var(--text, #eef1f7) !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    line-height: 1.35 !important;
    justify-content: flex-start !important;
  }

  .searchbar .nsfw-toggle input,
  #home-searchbar .nsfw-toggle input,
  .nsfw-toggle input {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    flex: none !important;
    align-self: center !important;
    justify-self: start !important;
    transform: none !important;
    accent-color: var(--ps-blue, #0070d1) !important;
  }

  .searchbar .nsfw-toggle span,
  #home-searchbar .nsfw-toggle span {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    text-align: left !important;
  }

  .nsfw-toggle-lg {
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    align-items: start !important;
    column-gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 14px 16px !important;
    white-space: normal !important;
    line-height: 1.4 !important;
  }
  .nsfw-toggle-lg input {
    grid-column: 1 !important;
    margin: 3px 0 0 0 !important;
    align-self: start !important;
    justify-self: start !important;
    transform: none !important;
  }
  .nsfw-toggle-lg span {
    grid-column: 2 !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  /* --- Rest of tablet layout --- */
  .hero { padding: 48px 0 15px; }
  .hero h1 { font-size: 34px; letter-spacing: -1px; }
  .hero p { font-size: 16px; }
  .hero .stats { gap: 12px; }
  .hero .stat { padding: 12px 16px; min-width: 100px; }
  .hero .stat b { font-size: 22px; }

  .cat-grid { grid-template-columns: 1fr; gap: 14px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .cat-header h1 { font-size: 28px; }

  .card .body { padding: 12px 12px 14px; gap: 8px; }
  .card .title {
    font-size: 13px;
    line-height: 1.3;
    min-height: 34px;
    -webkit-line-clamp: 2;
  }
  .card .author { font-size: 11px; gap: 5px; }
  .card .meta { font-size: 10px; gap: 8px; }
  .card .meta span + span::before { margin-right: 8px; }
  .card .actions { gap: 5px; }
  .card .actions a { padding: 7px 6px; font-size: 11px; letter-spacing: 0; }

  .lightbox { padding: 16px; }
  .lightbox .lb-info {
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px 12px;
  }

  #backToTop { bottom: 18px; right: 18px; width: 44px; height: 44px; }

  footer.site .wrap {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================================
   22. RESPONSIVE — MOBILE (≤480px)
   ============================================================ */
@media (max-width: 480px) {
  .hero h1 { font-size: 28px; letter-spacing: -.8px; }
  .hero p { font-size: 15px; }
  .hero .stat { padding: 10px 14px; min-width: 90px; }
  .hero .stat b { font-size: 20px; }

  .cat-tile .tile-name { font-size: 17px; }
  .cat-grid { gap: 10px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .card .actions { flex-direction: column; gap: 4px; }
  .card .actions a { padding: 8px 6px; font-size: 11px; }
  .card .author { font-size: 10px; }
  .card .meta { font-size: 10px; flex-wrap: wrap; }
}


/* ============================================================
   23. ACCESSIBILITY — REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  html { scroll-behavior: auto; }
}
/* ============================================================
   24. LOAD MORE BUTTON
   ============================================================ */
#load-more-btn {
  display: block;
  margin: 32px auto 8px;
  padding: 14px 32px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  letter-spacing: .3px;
  transition: all .15s var(--ease);
}
#load-more-btn:hover {
  background: var(--card-2);
  border-color: var(--ps-blue-2);
  color: var(--ps-cyan);
}
#load-more-btn:active {
  transform: translateY(1px);
}
/* ===== Archive additions ===== */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
}
.badge.src-best { background: rgba(43,143,255,.92); }
.badge.src-p3t  { background: rgba(86,227,159,.92); color:#04160c; }
.badge.nsfw     { background: rgba(199,107,134,.95); }

.badge-wrap {
  position: absolute;
  top: 10px; left: 12px;
  z-index: 3;
  display: flex;
  gap: 5px;
  pointer-events: none;
}

.browse-note {
  font-size: 13px;
  color: var(--text-2, #a2acc0);
  padding: 10px 14px;
  background: var(--card, #10141f);
  border: 1px solid var(--border, #1f2533);
  border-left: 3px solid var(--ps-blue-2, #2b8fff);
  border-radius: 8px;
  margin: 0 0 20px;
  max-width: 550px;
}
.browse-note .badge { position: static; margin: 0 4px; }

.filter-row {
  display: flex;
  gap: 8px;
  margin: 8px 0 24px;
  flex-wrap: wrap;
}
.filter-row button {
  background: var(--card, #10141f);
  border: 1px solid var(--border, #1f2533);
  color: var(--text-2, #a2acc0);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: all .15s ease;
}
.filter-row button:hover { color: var(--text, #eef1f7); border-color: var(--border-2, #2c3549); }
.filter-row button.active {
  color: #fff;
  background: var(--ps-blue, #0070d1);
  border-color: var(--ps-blue-2, #2b8fff);
}

#load-more-btn {
  display: block;
  margin: 32px auto 8px;
  padding: 14px 32px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #eef1f7);
  background: var(--card, #10141f);
  border: 1px solid var(--border, #1f2533);
  border-radius: 14px;
  cursor: pointer;
  letter-spacing: .3px;
}
#load-more-btn:hover {
  background: var(--card-2, #161b28);
  border-color: var(--ps-blue-2, #2b8fff);
  color: var(--ps-cyan, #4ad9ff);
}

/* ---------- NSFW toggle + gate ---------- */
.nsfw-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
  color: var(--text-2, #a2acc0);
  user-select: none; cursor: pointer; white-space: nowrap;
}
.nsfw-toggle input { accent-color: var(--ps-blue, #0070d1); }

.nsfw-toggle-lg {
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--card-2, #161b28);
  border: 1px solid var(--border-2, #2c3549);
  color: var(--text, #eef1f7);
  margin-top: 4px;
}
.nsfw-toggle-lg input { transform: scale(1.15); }

.nsfw-gate {
  max-width: 620px;
  margin: 8px 0 24px;
  padding: 22px 24px;
  background: var(--card, #10141f);
  border: 1px solid var(--border, #1f2533);
  border-left: 3px solid var(--nsfw, #c76b86);
  border-radius: 14px;
}
.nsfw-gate h2 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--text, #eef1f7);
}
.nsfw-gate p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2, #a2acc0);
}

/* ---------- Tile placeholders (home category grid) ----------
   Use a dedicated class name (tile-placeholder) so nothing in the base
   stylesheet accidentally paints a background behind the "18+" icon.   */
.tile-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #0e1220;
  color: #67718a;
  /* reset anything inherited from a generic img/span rule */
  border: 0;
  box-shadow: none;
  text-align: center;
  line-height: 1;
}
.tile-placeholder .tile-ph-icon {
  display: block;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #a2acc0;
  background: transparent;
  padding: 0;
  border: 0;
  margin: 0;
  line-height: 1;
}
.tile-placeholder .tile-ph-text {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #67718a;
  background: transparent;
  padding: 0;
  border: 0;
  margin: 0;
  line-height: 1;
}
.tile-placeholder-nsfw { background: #17111b; }
.tile-placeholder-nsfw .tile-ph-icon { color: #c76b86; }
.tile-placeholder-nsfw .tile-ph-text { color: #a27b8c; }

/* ---------- Card thumb placeholders (browse / category grids) ---------- */
.card .thumb .placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px;
  background: #0e1220;
  color: #67718a;
  border: 0;
  box-shadow: none;
  text-align: center;
  line-height: 1;
}
.card .thumb .placeholder .ph-icon {
  display: block;
  font-size: 22px; font-weight: 800; letter-spacing: 2px;
  color: #a2acc0;
  background: transparent;
  padding: 0; border: 0; margin: 0; line-height: 1;
}
.card .thumb .placeholder .ph-text {
  display: block;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: #67718a;
  background: transparent;
  padding: 0; border: 0; margin: 0; line-height: 1;
}
.card .thumb .placeholder.nsfw { background: #17111b; }
.card .thumb .placeholder.nsfw .ph-icon { color: #c76b86; }
.card .thumb .placeholder.nsfw .ph-text { color: #a27b8c; }

/* ---------- Back to top ---------- */
#backToTop {
  position: fixed; right: 20px; bottom: 20px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--card, #10141f);
  border: 1px solid var(--border, #1f2533);
  color: var(--text, #eef1f7);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, background .2s ease;
  z-index: 40;
}
#backToTop.visible { opacity: 1; pointer-events: auto; }
#backToTop:hover { background: var(--card-2, #161b28); border-color: var(--border-2, #2c3549); }
#backToTop svg { width: 20px; height: 20px; }

/* ---------- Lightbox ----------
   Don't stretch preview images. Cap the stage to the natural size of the
   image, use object-fit: contain, and never force width:100% on the img.   */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(5,7,13,.94);
  display: none;
  z-index: 100;
  padding: 40px 20px;
  overflow: auto;
}
.lightbox.open { display: flex; align-items: center; justify-content: center; }
.lb-stage {
  position: relative;
  width: auto;
  max-width: min(95vw, 1200px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lb-stage img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border, #1f2533);
  background: #0a0e18;
  margin: 0 auto;
}
.lb-info {
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
}
.lb-info .lb-title { font-weight: 700; }
.lb-info .lb-author { color: var(--text-2, #a2acc0); }
.lb-info .lb-dl {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ps-blue, #0070d1);
  color: #fff;
  padding: 9px 14px;
  border-radius: 8px;
  font-weight: 700; font-size: 13px;
}
.lb-info .lb-dl:hover { background: var(--ps-blue-2, #2b8fff); color: #fff; }
.lb-info .lb-dl svg { width: 16px; height: 16px; }
.lightbox .close {
  position: absolute; top: -34px; right: 0;
  font-size: 28px;
  color: var(--text-2, #a2acc0);
  cursor: pointer;
  line-height: 1;
}
.lightbox .close:hover { color: var(--text, #eef1f7); }

/* ===== Lightbox info bar — mobile ===== */
@media (max-width: 720px) {
  .lightbox .lb-info,
  .lb-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    text-align: center;
  }

  .lb-info .lb-title,
  .lb-info .lb-author {
    text-align: center;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  /* Kill the auto-left margin that pushes it to the right edge */
  .lb-info .lb-dl,
  .lightbox .lb-dl {
    margin-left: 0 !important;
    margin-right: 0 !important;
    align-self: center;
    justify-self: center;
    width: auto;
    max-width: 100%;
  }
}
.card .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: auto; }
.card .meta .cat-chip {
  display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--text-2, #a2acc0);
  background: var(--bg-2, #0a0e18); border: 1px solid var(--border, #1f2533);
  border-radius: 999px; padding: 3px 8px; line-height: 1.2; white-space: nowrap;
}
.card .meta .size { font-size: 10px; color: var(--text-3, #67718a); margin-left: auto; white-space: nowrap; }
.card .meta span + span::before { content: none; margin: 0; }
@media (max-width: 720px) {
  .card .meta .cat-chip { font-size: 7.5px; padding: 2px 6px; }
  .card .meta .size { font-size: 9px; }
}
/* Give category page titles room for descenders (y, g, p, q, j) */
.cat-header h1 {
  line-height: 1.25;
  padding-bottom: 6px;   /* extra cushion for the gradient-clipped glyphs */
}

/* Same treatment for the home hero if it clips "Archive" etc. */
.hero h1 {
  line-height: 1.2;
  padding-bottom: 4px;
}
/* ===== Avatar archive additions ===== */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
}
.badge.region { background: rgba(43,143,255,.92); }
.badge.region + .badge.region { margin-left: 4px; }

.badge-wrap {
  position: absolute;
  top: 10px; left: 12px;
  z-index: 3;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  max-width: calc(100% - 24px);
  pointer-events: none;
}

.filter-row {
  display: flex;
  gap: 8px;
  margin: 8px 0 24px;
  flex-wrap: wrap;
}
.filter-row button {
  background: var(--card, #10141f);
  border: 1px solid var(--border, #1f2533);
  color: var(--text-2, #a2acc0);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: all .15s ease;
}
.filter-row button:hover { color: var(--text, #eef1f7); border-color: var(--border-2, #2c3549); }
.filter-row button.active {
  color: #fff;
  background: var(--ps-blue, #0070d1);
  border-color: var(--ps-blue-2, #2b8fff);
}

#load-more-btn {
  display: block;
  margin: 32px auto 8px;
  padding: 14px 32px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #eef1f7);
  background: var(--card, #10141f);
  border: 1px solid var(--border, #1f2533);
  border-radius: 14px;
  cursor: pointer;
  letter-spacing: .3px;
}
#load-more-btn:hover {
  background: var(--card-2, #161b28);
  border-color: var(--ps-blue-2, #2b8fff);
  color: var(--ps-cyan, #4ad9ff);
}

/* ---------- Avatars are square: square thumbs, smaller cards ---------- */
.grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.card .thumb { aspect-ratio: 1 / 1; }
.card .thumb img { width: 100%; height: 100%; object-fit: contain; background: #0a0e18; }

/* ---------- Tile placeholders ---------- */
.tile-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #0e1220;
  color: #67718a;
  border: 0;
  box-shadow: none;
  text-align: center;
  line-height: 1;
}
.tile-placeholder .tile-ph-icon {
  display: block;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #a2acc0;
  background: transparent;
  padding: 0; border: 0; margin: 0; line-height: 1;
}
.tile-placeholder .tile-ph-text {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #67718a;
  background: transparent;
  padding: 0; border: 0; margin: 0; line-height: 1;
}

.card .thumb .placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px;
  background: #0e1220;
  color: #67718a;
  border: 0;
  box-shadow: none;
  text-align: center;
  line-height: 1;
}
.card .thumb .placeholder .ph-icon {
  display: block;
  font-size: 22px; font-weight: 800; letter-spacing: 2px;
  color: #a2acc0;
  background: transparent;
  padding: 0; border: 0; margin: 0; line-height: 1;
}
.card .thumb .placeholder .ph-text {
  display: block;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: #67718a;
  background: transparent;
  padding: 0; border: 0; margin: 0; line-height: 1;
}

/* Multi-region badges on cards need a smaller variant */
.card .badge-wrap { gap: 3px; }
.card .badge-wrap .badge { font-size: 9px; padding: 2px 5px; }

/* ---------- Back to top ---------- */
#backToTop {
  position: fixed; right: 20px; bottom: 20px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--card, #10141f);
  border: 1px solid var(--border, #1f2533);
  color: var(--text, #eef1f7);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, background .2s ease;
  z-index: 40;
}
#backToTop.visible { opacity: 1; pointer-events: auto; }
#backToTop:hover { background: var(--card-2, #161b28); border-color: var(--border-2, #2c3549); }
#backToTop svg { width: 20px; height: 20px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(5,7,13,.94);
  display: none;
  z-index: 100;
  padding: 40px 20px;
  overflow: auto;
}
.lightbox.open { display: flex; align-items: center; justify-content: center; }
.lb-stage {
  position: relative;
  width: auto;
  max-width: min(95vw, 1200px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lb-stage img {
  display: block;
  width: auto;
  height: auto;
  min-width: min(256px, 85vw);
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border, #1f2533);
  background: #0a0e18;
  margin: 0 auto;
}
.lb-info {
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
}
.lb-info .lb-title { font-weight: 700; }
.lb-info .lb-author { color: var(--text-2, #a2acc0); }
.lb-info .lb-dl {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ps-blue, #0070d1);
  color: #fff;
  padding: 9px 14px;
  border-radius: 8px;
  font-weight: 700; font-size: 13px;
}
.lb-info .lb-dl:hover { background: var(--ps-blue-2, #2b8fff); color: #fff; }
.lb-info .lb-dl svg { width: 16px; height: 16px; }
.lightbox .close {
  position: absolute; top: -34px; right: 0;
  font-size: 28px;
  color: var(--text-2, #a2acc0);
  cursor: pointer;
  line-height: 1;
}
.lightbox .close:hover { color: var(--text, #eef1f7); }
