:root {
  --bg: #0b0d12;
  --bg-2: #12161f;
  --panel: #171c27;
  --text: #e8edf7;
  --muted: #93a0b8;
  --line: rgba(232, 237, 247, 0.1);
  --accent: #3ecf8e;
  --accent-2: #2aa8ff;
  --danger: #ff5d6c;
  --radius: 14px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --font: "Outfit", sans-serif;
  --display: "Syne", sans-serif;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(42, 168, 255, 0.16), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(62, 207, 142, 0.12), transparent 50%),
    linear-gradient(180deg, #0b0d12 0%, #0e1219 100%);
  min-height: 100vh;
  overflow-x: clip;
  max-width: 100%;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #fff; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.narrow { width: min(480px, calc(100% - 2rem)); }
.muted { color: var(--muted); }
.skip-link {
  position: absolute; left: -999px; top: 0;
}
.skip-link:focus { left: 1rem; top: 1rem; background: #fff; color: #000; padding: .5rem 1rem; z-index: 99; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(11, 13, 18, 0.78);
  border-bottom: 1px solid var(--line);
  max-width: 100%;
  overflow-x: clip;
}
.header-inner {
  display: flex; align-items: center; gap: 1rem;
  padding: .85rem 0;
  min-width: 0;
  max-width: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  color: #fff;
  letter-spacing: -0.03em;
  min-width: 0;
  flex-shrink: 1;
}
.brand-mark {
  border-radius: 50%;
  flex-shrink: 0;
  display: block;
  background: transparent;
}
.brand-text span { color: var(--accent); }
.header-search {
  flex: 1;
  display: flex;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  min-width: 0;
}
.header-search input {
  flex: 1; border: 0; background: transparent; color: var(--text);
  padding: .7rem 1rem; outline: none;
}
.header-search button {
  border: 0; background: transparent; color: var(--muted); padding: 0 1rem; cursor: pointer;
}
.header-nav { display: flex; align-items: center; gap: .85rem; }
.header-nav a, .linkish {
  color: var(--text); background: none; border: 0; cursor: pointer; font: inherit;
}
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  border-radius: 999px;
  padding: .45rem .9rem;
  font: inherit;
  cursor: pointer;
}
.sections-toggle .sections-caret {
  font-size: .75rem;
  opacity: .7;
  transition: transform .18s ease;
}
.sections-toggle[aria-expanded="true"] .sections-caret {
  transform: rotate(180deg);
}
.mega-nav {
  border-top: 1px solid var(--line);
  background: rgba(12, 16, 24, 0.98);
  padding: 0;
  animation: fadeUp .22s ease;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}
.mega-panel {
  position: relative;
  padding: .55rem 0 .75rem;
  padding-left: .35rem;
}
.mega-head {
  position: absolute;
  top: .35rem;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
}
.mega-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  font-size: 1.2rem;
}
.mega-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  padding-left: .65rem;
  padding-right: 2.75rem;
}
.mega-col {
  display: grid;
  gap: .25rem;
  align-content: start;
  /* Less bottom padding — caps sit high in the line box */
  padding: .42rem .75rem .22rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.02);
}
.mega-col > summary {
  list-style: none;
  cursor: default;
  margin: 0;
  padding: 0;
  line-height: 1;
}
.mega-col > summary::-webkit-details-marker { display: none; }
.mega-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  color: #fff;
  font-weight: 700;
  margin: 0;
  line-height: 1;
  min-height: 1.15em;
}
.mega-title a { color: #fff; line-height: 1; display: inline-block; padding: 0; }
.mega-title a:hover { color: var(--accent); }
.mega-links { display: grid; gap: .3rem; margin-top: .1rem; }
.mega-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  line-height: 1.25;
}
.mega-count {
  font-style: normal;
  font-size: .78rem;
  opacity: .65;
  white-space: nowrap;
  line-height: inherit;
}
.mega-col a { color: var(--muted); font-size: .92rem; }
.mega-col a:hover { color: var(--accent); }
@media (min-width: 901px) {
  .mega-col .mega-links { display: grid !important; }
  .mega-col > summary { pointer-events: none; list-style: none; }
  .mega-col > summary a { pointer-events: auto; }
}

.hero {
  position: relative;
  min-height: min(88vh, 820px);
  display: grid;
  align-items: end;
  overflow: hidden;
}
.hero-home { border-bottom: 1px solid var(--line); }
.hero-media {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 28% 35%, #1b3148, transparent 42%),
    radial-gradient(circle at 78% 20%, #163528, transparent 38%),
    #0b0d12;
}
.hero-shot {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .58;
  transform: scale(1.04);
  animation: drift 18s ease-in-out infinite alternate;
  filter: saturate(1.12) contrast(1.08);
}
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11,13,18,.78) 8%, rgba(11,13,18,.32) 55%, rgba(11,13,18,.58) 100%),
    linear-gradient(180deg, rgba(11,13,18,.12), rgba(11,13,18,.88));
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(62,207,142,.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42,168,255,.12) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.75), transparent 80%);
  animation: gridShift 22s linear infinite;
}
.hero-content {
  position: relative;
  padding: 7rem 0 4.5rem;
  animation: fadeUp .55s ease both;
}
.hero-brand-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: .85rem;
}
.hero-logo {
  width: clamp(48px, 7vw, 64px);
  height: auto;
  border-radius: 50%;
  display: block;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.brand-hero {
  font-family: var(--display);
  font-size: clamp(3.4rem, 9vw, 6.4rem);
  line-height: .92;
  margin: 0;
  letter-spacing: -0.045em;
}
.hero-lead {
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  margin: 0 0 1.6rem;
  line-height: 1.55;
}
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-colors { margin-top: 1.25rem; }
.section-soft {
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent);
}
.home-split {
  display: grid;
  grid-template-columns: 1.2fr .9fr;
  gap: 2rem;
}
.collection-stack { display: grid; gap: .55rem; }
.collection-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(23,28,39,.55);
  transition: border-color .2s ease, transform .2s ease;
}
.collection-line:hover { border-color: rgba(62,207,142,.45); transform: translateX(3px); color: #fff; }
.collection-line em { color: var(--accent); font-style: normal; font-weight: 700; }
.cat-tiles.compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cat-tile { animation: fadeUp .4s ease both; animation-delay: calc(var(--i, 0) * 40ms); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem;
  background: linear-gradient(135deg, var(--accent), #2bb673);
  color: #04140c;
  border: 0;
  border-radius: 999px;
  padding: .75rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); color: #04140c; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { color: #fff; border-color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: .4rem .8rem; font-size: .85rem; }

.section { padding: 3rem 0; }
.section-head { margin-bottom: 1.25rem; }
.section-head h2 {
  font-family: var(--display);
  margin: 0 0 .35rem;
  letter-spacing: -0.03em;
}
.section-head p { margin: 0; color: var(--muted); }
.page-head h1 {
  font-family: var(--display);
  letter-spacing: -0.03em;
  margin: 0 0 .5rem;
}
.lead { color: var(--muted); max-width: 46rem; }

.cat-tiles, .sections-grid {
  display: grid;
  gap: 1rem;
}
.cat-tiles { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.cat-tile, .collection-card, .panel, .stat-card, .auth-box {
  background: rgba(23, 28, 39, 0.85);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.cat-tile {
  padding: 1.1rem;
  color: var(--text);
  display: grid; gap: .35rem;
  transition: transform .2s ease, border-color .2s ease;
}
.cat-tile:hover { transform: translateY(-3px); border-color: rgba(62,207,142,.45); color: #fff; }
.cat-tile span { color: var(--muted); font-size: .9rem; }
.sections-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.section-block h3 { margin: 0 0 .75rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem .75rem;
  color: var(--text);
  background: rgba(255,255,255,.03);
  font-size: .9rem;
}
.chip.soft { color: var(--muted); }
.chip.active, .chip:hover { border-color: var(--accent); color: #fff; }
.chip-tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding-right: .45rem;
}
.chip-tag a {
  color: inherit;
  text-decoration: none;
}
.chip-remove {
  appearance: none;
  border: 0;
  background: rgba(255, 90, 90, .18);
  color: #ff8d8d;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  line-height: 1;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: -.15rem;
}
.chip-remove:hover {
  background: rgba(255, 90, 90, .35);
  color: #fff;
}

.collection-carousel {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .55rem;
}
.collection-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 240px);
  gap: .85rem;
  overflow-x: auto;
  padding: .15rem .1rem .55rem;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.collection-row::-webkit-scrollbar { display: none; }
.collection-row-covers {
  grid-auto-columns: minmax(220px, 260px);
  gap: 1rem;
  padding-bottom: .75rem;
}
.collection-nav {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(18, 22, 31, .92);
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: border-color .15s ease, background .15s ease, opacity .15s ease;
  z-index: 2;
}
.collection-nav:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(28, 36, 48, .98);
}
.collection-nav:disabled {
  opacity: .35;
  cursor: default;
}
@media (max-width: 700px) {
  .collection-carousel {
    grid-template-columns: 1fr;
    gap: .65rem;
  }
  .collection-nav {
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
  }
  .collection-nav-prev { left: .25rem; }
  .collection-nav-next { right: .25rem; }
}
.collection-card {
  padding: 1rem;
  color: var(--text);
  scroll-snap-align: start;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .2s ease;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
}
.collection-card:hover { transform: translateY(-3px); color: #fff; }
.collection-card em { color: var(--accent); font-style: normal; font-weight: 700; }

.collection-card-cover {
  padding: 0;
  min-height: 0;
  position: relative;
  justify-content: flex-end;
}
.collection-card-media {
  position: absolute;
  inset: 0;
  display: block;
  background:
    radial-gradient(circle at 30% 40%, #1b3148, transparent 50%),
    #12161f;
}
.collection-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.collection-card-cover:hover .collection-card-media img {
  transform: scale(1.05);
}
.collection-card-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 2.4rem;
  color: var(--muted);
}
.collection-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(11,13,18,.88) 100%);
}
.collection-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .65rem;
  padding: 4.5rem .9rem .85rem;
  min-height: 168px;
}
.collection-card-title {
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.wall-grid-masonry {
  display: block;
  columns: 4 240px;
  column-gap: 1rem;
}
.wall-grid-masonry.is-js-masonry {
  columns: unset;
  column-gap: unset;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.wall-grid-masonry.is-js-masonry .masonry-cols {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
}
.wall-grid-masonry.is-js-masonry .masonry-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.wall-grid-masonry.is-js-masonry .masonry-col .card-wall {
  display: block;
  width: 100%;
  break-inside: unset;
  -webkit-column-break-inside: unset;
  page-break-inside: unset;
}
.wall-grid-masonry .card-wall {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 1rem;
  display: inline-block;
  width: 100%;
  vertical-align: top;
}
.wall-grid-masonry .empty {
  display: block;
  width: 100%;
}
.card-wall {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  animation: fadeUp .35s ease both;
}
.card-wall-link { color: inherit; display: block; position: relative; }
.badge-gif {
  position: absolute;
  top: .55rem;
  left: .55rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .22rem .48rem;
  border-radius: 6px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
  color: #0b0d12;
  background: linear-gradient(135deg, #ffc440, #ff8a3c);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  pointer-events: none;
}
.badge-gif::before {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4px 0 4px 7px;
  border-color: transparent transparent transparent #0b0d12;
}
.preview-gif-wrap {
  position: relative;
  display: block;
}
.preview-gif-wrap .badge-gif {
  top: .65rem;
  left: .65rem;
}
.home-carousel-card {
  position: relative;
}
.card-wall img, .thumb-fallback {
  aspect-ratio: 16 / 10;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: #0f1420;
  display: block;
}
.wall-grid-masonry .card-wall img,
.wall-grid-masonry .thumb-fallback {
  aspect-ratio: var(--ar, 16 / 10);
  object-fit: cover;
}
.thumb-fallback {
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: 2rem;
  color: var(--muted);
}
.card-wall-title {
  display: block;
  padding: .7rem .85rem .9rem;
  font-size: .92rem;
}
.card-rating {
  position: absolute;
  right: .55rem;
  top: .55rem;
  left: auto;
  z-index: 5;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 1px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(11,13,18,.55);
  backdrop-filter: blur(4px);
  font-size: .78rem;
  line-height: 1;
  letter-spacing: .02em;
  color: rgba(255,255,255,.35);
  pointer-events: auto;
}
.card-rating .star-btn {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.35);
  font-size: inherit;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1em;
  transition: color .12s ease, transform .12s ease;
  pointer-events: auto;
}
.card-rating .star-btn.is-on,
.card-rating .star-btn.is-hover {
  color: #f5c542;
}
.card-rating .star-btn.is-hover {
  transform: scale(1.08);
}
.card-actions {
  padding: 0 .85rem .85rem;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
}
.grid-more { display: flex; justify-content: center; margin-top: 1.5rem; }
.empty { grid-column: 1 / -1; }

.flash {
  margin: 1rem auto;
  padding: .75rem 1rem;
  border-radius: 12px;
}
.flash-ok { background: rgba(62,207,142,.15); border: 1px solid rgba(62,207,142,.35); }
.flash-err { background: rgba(255,93,108,.12); border: 1px solid rgba(255,93,108,.35); }

.stack-form { display: grid; gap: .9rem; }
.stack-form label { display: grid; gap: .35rem; font-weight: 500; }
.stack-form input, .stack-form textarea, .stack-form select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  padding: .75rem .9rem;
  font: inherit;
}
.panel { padding: 1.25rem; }
.auth-box { padding: 1.5rem; margin: 2rem auto; }

.tag-fieldset {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1rem 1.1rem;
  margin: 0;
}
.tag-fieldset legend {
  padding: 0 .4rem;
  font-weight: 600;
}
.tag-picker { display: grid; gap: .85rem; }
.tag-picker-toolbar {
  display: flex;
  gap: .75rem;
  align-items: center;
}
.tag-picker-search {
  flex: 1;
  border-radius: 999px !important;
  padding: .65rem 1rem !important;
}
.tag-picker-count {
  white-space: nowrap;
  font-size: .9rem;
}
.tag-picker-selected {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  min-height: 0;
}
.tag-picker-selected:not([hidden]) {
  padding-bottom: .15rem;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid rgba(62,207,142,.35);
  background: rgba(62,207,142,.12);
  color: #dfffea;
  border-radius: 999px;
  padding: .28rem .55rem .28rem .7rem;
  font-size: .86rem;
}
.tag-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 .15rem;
}
.tag-picker-body {
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(11,13,18,.35);
  padding: .75rem;
  display: grid;
  gap: 1rem;
}
.tag-group-title {
  margin: 0 0 .45rem;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.tag-group-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .35rem;
}
.tag-option {
  display: flex !important;
  grid-template-columns: unset !important;
  flex-direction: row;
  align-items: center;
  gap: .55rem;
  margin: 0;
  padding: .45rem .55rem;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 400 !important;
  color: var(--text);
  transition: background .15s ease, border-color .15s ease;
}
.tag-option:hover {
  background: rgba(255,255,255,.04);
  border-color: var(--line);
}
.tag-option.is-on {
  background: rgba(62,207,142,.1);
  border-color: rgba(62,207,142,.28);
}
.tag-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}
.tag-option-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid rgba(232,237,247,.35);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.2);
}
.tag-option.is-on .tag-option-box {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 2px #04140c;
}
.tag-option-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tag-option-count {
  color: var(--muted);
  font-style: normal;
  font-size: .8rem;
}
.tag-picker-empty { margin: .5rem 0 0; }
.tag-picker-create label { margin: 0; }

.upload-drop {
  display: grid !important;
  gap: .35rem;
  padding: 1.1rem 1.15rem;
  border: 1px dashed rgba(232,237,247,.22);
  border-radius: 14px;
  background: rgba(11,13,18,.3);
  cursor: pointer;
}
.upload-drop.is-drag {
  border-color: var(--accent);
  background: rgba(62,207,142,.08);
}
.upload-drop-title { font-weight: 600; }
.upload-drop input[type=file] {
  padding: .35rem 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.tag-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .4rem;
  max-height: 220px;
  overflow: auto;
  padding: .5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.check { display: flex; gap: .45rem; align-items: center; font-weight: 400; }
.inline-form { display: inline; }

.profile-head { display: flex; gap: 1.25rem; align-items: flex-start; }
.avatar {
  width: 96px; height: 96px; border-radius: 50%;
  overflow: hidden; background: var(--panel); border: 1px solid var(--line);
  display: grid; place-items: center; flex-shrink: 0;
  font-family: var(--display); font-size: 2rem;
}
.avatar-lg { width: 112px; height: 112px; font-size: 2.4rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-edit {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.avatar-edit label { flex: 1; }
.author-card {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--text);
  margin: .75rem 0 1rem;
  padding: .55rem .75rem .55rem .55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  transition: border-color .2s ease, background .2s ease;
}
.author-card:hover {
  border-color: rgba(62,207,142,.45);
  color: #fff;
  background: rgba(62,207,142,.08);
}
.author-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  overflow: hidden; background: var(--bg-2);
  display: grid; place-items: center;
  font-weight: 700; flex-shrink: 0;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-meta { display: grid; line-height: 1.25; }
.author-meta strong { font-size: .95rem; }
.author-meta em { color: var(--muted); font-style: normal; font-size: .8rem; }
.modal-author { margin: .35rem 0 .85rem; }
.wallpaper-page-head .author-card { display: flex; width: fit-content; }
.stat-row { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; }
.stat-row.big { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat-card { padding: 1rem; text-align: center; }
.stat-card strong { display: block; font-size: 1.6rem; }
.stat-card span { color: var(--muted); }

.dash-body { background: var(--bg); }
.dash-shell { display: grid; grid-template-columns: 220px 1fr; gap: 1.25rem; padding: 1.5rem 0 3rem; }
.dash-side {
  display: grid; gap: .35rem; align-content: start;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem;
}
.dash-side a { color: var(--text); padding: .45rem .55rem; border-radius: 8px; }
.dash-side a:hover { background: rgba(255,255,255,.05); }
.dash-side hr { border: 0; border-top: 1px solid var(--line); margin: .5rem 0; }
.dash-main { min-width: 0; }
.tags-walk-progress {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.tags-admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 1rem;
}
.tags-admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 1rem;
}
.tags-admin-hint {
  margin: 0;
  flex: 1 1 240px;
  max-width: 42rem;
}
.tags-admin-tools {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}
.tags-admin-search,
.tags-admin-category {
  display: inline-flex;
  align-items: center;
  margin: 0;
}
.tags-admin-search input,
.tags-admin-category select {
  min-width: 12rem;
  height: 2.4rem;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 0 .7rem;
  font: inherit;
  line-height: 1.2;
}
.tags-admin-category select {
  max-width: 18rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.tags-walk-progress__head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: baseline;
  margin-bottom: .65rem;
}
.tags-walk-progress__bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.tags-walk-progress__bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #2bb673);
  transition: width .25s ease;
}
.tags-walk-progress__status {
  margin: .65rem 0 0;
  font-size: .9rem;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { text-align: left; padding: .65rem; border-bottom: 1px solid var(--line); }
.table-wrap { overflow: auto; }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.mod-list { display: grid; gap: 1rem; }
.mod-item { display: flex; gap: 1rem; align-items: center; }
.mod-item img { border-radius: 10px; }
.mod-section-picker {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: end;
  padding: .85rem 1rem;
}
.mod-section-picker label { display: grid; gap: .35rem; min-width: min(220px, 100%); }
.mod-section-picker input[type="search"] { min-width: min(220px, 100%); }
.mod-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem .85rem;
  align-items: center;
  padding: .75rem 1rem;
  margin-bottom: 1rem;
  position: sticky;
  top: 0;
  z-index: 4;
}
.mod-bulk-check,
.mod-bulk-cat {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.mod-section-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .4rem;
}
.mod-card.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: .4rem;
  min-width: 0;
  overflow: hidden;
}
.mod-card-check {
  position: absolute;
  top: .35rem;
  left: .35rem;
  z-index: 2;
  background: rgba(8, 10, 16, .72);
  border-radius: 6px;
  padding: .15rem .25rem;
}
.mod-card-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  padding: 0;
  border: 0;
  cursor: zoom-in;
}
.mod-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.mod-card-ph { min-height: 80px; }
.mod-card-body { display: grid; gap: .3rem; min-width: 0; }
.mod-card-meta { margin: 0; font-size: .75rem; }
.mod-card .mod-cat-form {
  display: grid;
  gap: .3rem;
  margin: 0;
  min-width: 0;
}
.mod-card .mod-cat-form select,
.mod-card select[data-mod-category] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: .78rem;
  padding: .45rem .55rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  color-scheme: dark;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% + 2px), calc(100% - 9px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 1.5rem;
}
.mod-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(2, 4, 8, .88);
  backdrop-filter: blur(6px);
}
.mod-lightbox[hidden] { display: none !important; }
.mod-lightbox-inner {
  position: relative;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
}
.mod-lightbox-inner img {
  display: block;
  max-width: 96vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
}
.mod-lightbox-close {
  position: absolute;
  top: -.35rem;
  right: -.35rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(12, 16, 24, .9);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.mod-section-pager {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: 1.25rem;
}
@media (max-width: 1400px) {
  .mod-section-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .mod-section-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .mod-section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.inline-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.seo-text {
  margin-top: 0;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--text);
  line-height: 1.75;
  font-size: 1.02rem;
}
.seo-text h2,
.seo-text h3 {
  color: var(--text);
  margin: 1.4rem 0 .65rem;
  font-family: var(--display, inherit);
  font-size: 1.25rem;
}
.seo-text p,
.seo-text ul {
  color: var(--muted);
  margin: 0 0 1rem;
}
.seo-text ul {
  padding-left: 1.2rem;
}
.seo-text strong {
  color: var(--text);
}
.section-seo {
  padding-top: 0;
}
.search-hero { display: flex; gap: .5rem; }
.search-hero input {
  flex: 1; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); padding: .85rem 1rem; font: inherit;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
  margin-top: 2rem;
  color: var(--muted);
}
.footer-inner { display: grid; gap: .85rem; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1rem;
}
.footer-links a { color: var(--muted); font-size: .92rem; }
.footer-links a:hover { color: var(--accent); }
.legal-page .prose { line-height: 1.65; color: var(--text); }
.legal-page .prose h2 { margin-top: 1.6rem; font-size: 1.15rem; }
.legal-page .prose ul { padding-left: 1.2rem; }
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .75rem;
  align-items: center;
}
.table-actions .inline-form { display: inline; margin: 0; }
.table-actions .danger { color: #ff8e8e; }
.narrow.legal-page { width: min(760px, calc(100% - 2rem)); }

.modal[hidden] { display: none !important; }
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(6px);
}
.modal-dialog {
  position: relative;
  width: min(980px, calc(100% - 1.5rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: #121722;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  animation: fadeUp .22s ease;
}

/* Fullscreen gallery (second step) */
.modal.is-gallery .modal-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #05070c;
  box-shadow: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal.is-gallery {
  place-items: stretch;
}
.modal.is-gallery .modal-backdrop {
  background: rgba(2, 4, 8, .94);
}
.modal.is-gallery .modal-body { display: none; }
.modal.is-gallery .gallery-layer {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
.gallery-layer[hidden] { display: none !important; }
.gallery-layer {
  position: relative;
  flex: 1;
  min-height: 0;
}
.modal-image-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.modal-image.is-zoomable { cursor: zoom-in; }
.modal-image.is-lqip,
.ss-image.is-lqip {
  filter: blur(8px);
  /* no scale — was causing visible jump when full image swapped in */
  transition: filter .2s ease;
}
.modal-image:not(.is-lqip),
.ss-image:not(.is-lqip) {
  filter: none;
}
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Fullscreen slideshow */
.modal-slideshow {
  place-items: stretch;
}
.modal-slideshow .modal-backdrop {
  background: rgba(2, 4, 8, .92);
  backdrop-filter: blur(10px);
}
.modal-slideshow .slideshow-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: none;
}
.modal-slideshow .modal-body {
  flex: 1;
  min-height: 0;
  padding: 0;
  clear: none;
  display: flex;
  flex-direction: column;
}
.modal-slideshow .modal-toolbar {
  position: absolute;
  top: 0;
  right: 0;
  padding: .75rem 1rem;
  z-index: 5;
}
.ss-shell {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  position: relative;
}
.ss-stage {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .25rem;
  padding: 2.75rem 0.25rem 2.6rem;
}
.ss-frame {
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}
.ss-frame.is-zoomed {
  overflow: auto;
  overscroll-behavior: contain;
  cursor: grab;
  touch-action: none;
  place-items: start;
  align-content: start;
  scrollbar-gutter: stable;
}
.ss-frame.is-zoomed.is-panning {
  cursor: grabbing;
  user-select: none;
}
.ss-frame.is-zoomed .ss-image,
.ss-frame.is-zoomed .preview-gif-wrap {
  max-width: none;
  max-height: none;
  transition: none;
}
.ss-frame.is-zoomed::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.ss-frame.is-zoomed::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.35);
  border-radius: 999px;
}
.ss-frame.is-zoomed::-webkit-scrollbar-track {
  background: rgba(0,0,0,.25);
}
.ss-image {
  max-width: min(98vw, 1680px);
  max-height: calc(100vh - 9.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  transition: transform .12s ease;
}
.ss-zoom {
  position: absolute;
  left: 50%;
  bottom: .85rem;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: .25rem;
  border-radius: 999px;
  background: rgba(6, 16, 24, .72);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(6px);
}
.ss-zoom-btn {
  min-width: 2rem;
  height: 2rem;
  padding: 0 .55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #eef7ff;
  font: inherit;
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  line-height: 1;
}
.ss-zoom-btn:hover {
  background: rgba(255,255,255,.08);
}
.ss-nav {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(12, 16, 24, .7);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background .15s ease, transform .15s ease, opacity .15s ease;
}
.ss-nav:hover:not(:disabled) {
  background: rgba(30, 40, 58, .9);
  transform: scale(1.05);
}
.ss-nav:disabled {
  opacity: .28;
  cursor: default;
}
.ss-footer {
  padding: .55rem 1rem 0.85rem;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.55) 28%, rgba(4,6,10,.88));
  border-top: 1px solid rgba(255,255,255,.06);
}
.ss-footer-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .55rem;
}
.ss-heading h2 {
  margin: 0 0 .25rem;
  font-family: var(--display);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: #fff;
}
.ss-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: .4rem;
}
.ss-meta-line a { color: var(--muted); }
.ss-meta-line a:hover { color: #fff; }
.ss-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.ss-tag {
  display: inline-flex;
  align-items: center;
  padding: .22rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #e8edf7;
  font-size: .78rem;
}
.ss-tag:hover {
  border-color: var(--accent);
  color: #fff;
}
.ss-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: flex-end;
  flex-shrink: 0;
}
.ss-filmstrip {
  display: flex;
  gap: .4rem;
  overflow-x: auto;
  padding: .2rem 0 .35rem;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}
.ss-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: #0b0f18;
  cursor: pointer;
  scroll-snap-align: center;
  opacity: .72;
  transition: opacity .15s ease, border-color .15s ease, transform .15s ease;
}
.ss-thumb img,
.ss-thumb-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ss-thumb-fallback {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}
.ss-thumb:hover { opacity: 1; }
.ss-thumb.is-active {
  opacity: 1;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(62, 207, 142, .35);
}
.ss-counter {
  margin-top: .25rem;
  font-size: .75rem;
  text-align: center;
}
.ss-details {
  position: absolute;
  top: 0;
  right: 0;
  width: min(400px, 100%);
  height: 100%;
  overflow: auto;
  background: rgba(12, 16, 24, .96);
  border-left: 1px solid var(--line);
  padding: 3.5rem 1.1rem 1.25rem;
  z-index: 4;
  box-shadow: -16px 0 40px rgba(0,0,0,.35);
}
.ss-details[hidden] { display: none !important; }
.ss-details-close {
  position: absolute;
  top: .7rem;
  right: .7rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
}

.modal-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .45rem;
  padding: .55rem .7rem 0;
  pointer-events: none;
}
.modal-toolbar > * { pointer-events: auto; }
.modal-close {
  position: static;
  float: none;
  margin: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(18, 23, 34, .92);
  color: #fff;
  cursor: pointer;
}
.modal-delete-form { margin: 0; }
.modal-delete {
  height: 36px;
  padding: 0 .9rem;
  border-radius: 999px;
  border: 1px solid rgba(229, 72, 77, .55);
  background: linear-gradient(180deg, #e85a5f 0%, #c62828 100%);
  color: #fff;
  font: inherit;
  font-size: .82rem;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(198, 40, 40, .28);
}
.modal-delete:hover { filter: brightness(1.06); }
.modal-body { padding: .65rem .85rem 1rem; clear: both; }
.modal-layout {
  display: grid;
  grid-template-columns: 1.4fr .9fr;
  gap: .85rem;
  align-items: start;
}
.modal-media {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .65rem;
  min-width: 0;
}
.modal-preview {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0b0f18;
  border: 1px solid var(--line);
  max-width: 100%;
  aspect-ratio: var(--ar, 16 / 10);
  width: 100%;
}
.modal-preview .modal-image-btn {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0;
}
.modal-preview img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  margin: 0;
}
.modal-layout.is-pending-layout {
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .9fr);
}
.modal-layout.is-pending-layout .modal-preview {
  max-height: min(70vh, 640px);
}
.modal-under {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .55rem;
}
.modal-under-block {
  width: 100%;
}
.modal-under-block h3 {
  margin: 0 0 .35rem;
  font-size: .92rem;
}
.modal-under .chip-row,
.modal-under .palette-row {
  margin-top: 0;
}
.modal-side h2 { margin: 0 0 .5rem; font-family: var(--display); }

.modal-layout.is-landscape {
  grid-template-columns: minmax(0, 1.75fr) minmax(260px, .8fr);
}
.modal-layout.is-landscape .modal-preview {
  width: 100%;
  background:
    radial-gradient(circle at 50% 40%, rgba(42,168,255,.10), transparent 55%),
    #070a10;
}
.modal-layout.is-landscape .modal-image {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  border-radius: 0;
}

.modal-layout.is-portrait {
  grid-template-columns: auto minmax(280px, .9fr);
}
.modal-layout.is-portrait .modal-media {
  width: fit-content;
  max-width: 100%;
  justify-self: start;
}
.modal-layout.is-portrait .modal-preview {
  width: min(42vw, 460px);
  max-width: 100%;
  background: #070a10;
}
/* Transparent PNG: mid-tone checker so dark and light art stay visible */
.modal-preview.is-png,
.modal-layout.is-landscape .modal-preview.is-png,
.modal-layout.is-portrait .modal-preview.is-png,
.modal-layout.is-pending-layout .modal-preview.is-png,
.ss-stage.is-png .ss-frame {
  background-color: #c4c6cc !important;
  background-image:
    linear-gradient(45deg, #d5d7dd 25%, transparent 25%),
    linear-gradient(-45deg, #d5d7dd 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d5d7dd 75%),
    linear-gradient(-45deg, transparent 75%, #d5d7dd 75%) !important;
  background-size: 22px 22px !important;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0px !important;
}
.modal-layout.is-portrait .modal-image-btn {
  display: block;
  line-height: 0;
}
.modal-layout.is-portrait .modal-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}
.modal-layout.is-portrait .modal-under {
  max-width: min(42vw, 460px);
}

.modal-dialog { width: min(1180px, calc(100% - 1rem)); }
.modal-preview-meta {
  position: static;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: rgba(232,237,247,.75);
}
.modal-preview-meta span,
.modal-preview-meta a {
  background: rgba(0,0,0,.28);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .2rem .55rem;
  text-transform: capitalize;
  color: rgba(232,237,247,.85);
}
.modal-preview-meta a:hover {
  border-color: var(--accent);
  color: #fff;
}
.modal-preview-meta .btn {
  margin: 0;
}
.stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: .75rem 0;
}
.stat-pills span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .3rem .65rem;
  font-size: .86rem;
  background: rgba(255,255,255,.03);
}
.stat-pills em { color: var(--muted); font-style: normal; }
.rating-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem .75rem;
  margin-bottom: .75rem;
}
.stars {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: .15rem;
}
.star-btn {
  border: 0;
  background: transparent;
  color: rgba(232,237,247,.28);
  font-size: 1.35rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color .15s ease, transform .15s ease;
}
.stars .star-btn.is-on { color: #ffc857; }
/* Modal only: DOM 5→1 + row-reverse — do not affect .card-rating */
.stars:hover .star-btn.is-on { color: rgba(232,237,247,.28); }
.stars .star-btn:hover,
.stars .star-btn:hover ~ .star-btn {
  color: #ffc857;
  transform: scale(1.08);
}
.share-wrap { position: relative; }
.share-menu {
  position: absolute;
  top: calc(100% + .4rem);
  right: 0;
  z-index: 5;
  min-width: 180px;
  display: grid;
  gap: .15rem;
  padding: .45rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #121722;
  box-shadow: var(--shadow);
}
.share-menu[hidden] { display: none !important; }
.share-menu a,
.share-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: .55rem .65rem;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}
.share-menu a:hover,
.share-menu button:hover { background: rgba(255,255,255,.06); }
.comment-form { display: grid; gap: .55rem; margin: .75rem 0; }
.comment-form textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  padding: .75rem .9rem;
  font: inherit;
  resize: vertical;
}
.comments-list { display: grid; gap: .75rem; margin-bottom: 1rem; }
.comment-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .75rem .85rem;
  background: rgba(255,255,255,.02);
}
.comment-item p { margin: .35rem 0 0; white-space: pre-wrap; }
.comment-head {
  display: flex;
  gap: .65rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: .9rem;
}
.comment-del { margin-left: auto; color: var(--muted); }

.collection-hero {
  position: relative;
  min-height: 320px;
  display: grid;
  align-items: end;
  overflow: visible;
  border-bottom: 1px solid var(--line);
}
.collection-hero-media {
  position: absolute; inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 40%, #1b3148, transparent 45%),
    radial-gradient(circle at 70% 30%, #163528, transparent 40%),
    #0b0d12;
}
.collection-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .42;
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.05);
  animation: drift 18s ease-in-out alternate infinite;
}
.collection-hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(11,13,18,.92) 8%, rgba(11,13,18,.55) 48%, rgba(11,13,18,.78)),
    linear-gradient(180deg, rgba(11,13,18,.2), rgba(11,13,18,.96));
}
.collection-hero-content {
  position: relative;
  padding: 4.75rem 0 1.75rem;
  animation: fadeUp .4s ease both;
}
.collection-hero-top {
  max-width: 52rem;
  margin-bottom: 1.15rem;
}
.collection-kicker {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 .55rem;
  padding: .28rem .7rem;
  border-radius: 999px;
  border: 1px solid rgba(62,207,142,.28);
  background: rgba(62,207,142,.1);
  color: var(--accent);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.collection-hero-content h1 {
  font-family: var(--display);
  letter-spacing: -0.03em;
  margin: 0 0 .55rem;
  font-size: clamp(2.05rem, 4.4vw, 3.15rem);
  line-height: 1.08;
  text-wrap: balance;
}
.collection-hero-content .lead {
  margin: 0 0 .85rem;
  max-width: 40rem;
  color: rgba(232,237,247,.82);
}
.collection-keyline {
  font-size: 1.05rem;
}
.collection-subs { margin: .35rem 0 .85rem; }
.collection-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
  margin-top: .25rem;
}
.count-pill {
  display: inline-flex;
  align-items: baseline;
  gap: .45rem;
  padding: .55rem .95rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(42,168,255,.28);
  background:
    linear-gradient(135deg, rgba(42,168,255,.16), rgba(62,207,142,.1)),
    rgba(11,13,18,.55);
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
  backdrop-filter: blur(8px);
}
.count-pill strong {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: #fff;
}
.count-pill span {
  color: var(--muted);
  font-size: .9rem;
}
.meta-chip {
  display: inline-flex;
  padding: .4rem .75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: .86rem;
}
.breadcrumbs {
  padding: .85rem 0 0;
  font-size: .9rem;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .55rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
}
.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: .55rem;
  opacity: .55;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs [aria-current="page"] { color: var(--text); }

.collection-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  margin-top: .35rem;
}
.orient-filter {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: 1rem;
  padding: .25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11,13,18,.45);
  max-width: 100%;
}
.orient-filter.res-filter,
.orient-filter.phone-filter {
  border-radius: 16px;
}
.collection-filters .orient-filter { margin-top: 0; }
.phone-filter .filter-label {
  display: inline-flex;
  align-items: center;
  padding: 0 .45rem 0 .55rem;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.color-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-top: .85rem;
  max-height: none;
  overflow: visible;
  padding: .2rem .05rem .35rem;
}
.color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 26%, rgba(255,255,255,.48), transparent 42%),
    linear-gradient(165deg, rgba(255,255,255,.2) 0%, transparent 42%, rgba(0,0,0,.38) 100%),
    var(--swatch, #888);
  border: 1px solid rgba(255,255,255,.28);
  box-shadow:
    inset 0 -2px 3px rgba(0,0,0,.28),
    inset 0 1px 2px rgba(255,255,255,.18),
    0 1px 2px rgba(0,0,0,.35);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  flex: 0 0 auto;
}
.color-swatch:hover {
  transform: scale(1.16);
  filter: brightness(1.06);
}
.color-swatch.is-active {
  box-shadow:
    inset 0 -2px 3px rgba(0,0,0,.28),
    inset 0 1px 2px rgba(255,255,255,.22),
    0 0 0 2px #0b0d12,
    0 0 0 3.5px var(--accent);
}
.color-swatch-all {
  width: auto;
  min-width: 38px;
  height: 22px;
  border-radius: 999px;
  padding: 0 .6rem;
  display: inline-grid;
  place-items: center;
  font-size: .7rem;
  font-weight: 600;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.hero-colors {
  max-height: none;
  justify-content: center;
}
.palette-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: .65rem 0 1rem;
}
.palette-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .65rem .3rem .35rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255,255,255,.03);
  text-transform: capitalize;
  font-size: .85rem;
}
.palette-chip::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--swatch);
  border: 1px solid rgba(255,255,255,.25);
}
.palette-chip:hover { border-color: var(--accent); }
.orient-btn {
  color: var(--muted);
  border-radius: 999px;
  padding: .4rem .9rem;
  font-size: .9rem;
}
.orient-btn:hover { color: #fff; }
.orient-btn.is-active {
  background: linear-gradient(135deg, var(--accent), #2bb673);
  color: #04140c;
  font-weight: 700;
}
.dl-list { display: grid; gap: .5rem; margin: 1rem 0; }
.dl-row {
  display: flex;
  align-items: stretch;
  gap: .4rem;
}
.dl-link {
  flex: 1;
  display: block; padding: .7rem .9rem; border-radius: 12px;
  border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,.03);
}
.dl-link:hover { border-color: var(--accent); }
.dl-link.is-waiting,
a.btn.is-waiting[data-dl-timer] {
  pointer-events: none;
  opacity: .85;
  border-color: var(--accent);
  color: var(--accent);
  cursor: wait;
  font-variant-numeric: tabular-nums;
}
.dl-qr {
  flex: 0 0 auto;
  width: 2.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  cursor: pointer;
}
.dl-qr:hover { border-color: var(--accent); color: var(--accent); }
.dl-list a {
  display: block; padding: .7rem .9rem; border-radius: 12px;
  border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,.03);
}
.dl-list a:hover { border-color: var(--accent); }
.qr-popup {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.qr-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}
.qr-popup-dialog {
  position: relative;
  z-index: 1;
  width: min(22rem, 100%);
  padding: 1.25rem 1.25rem 1.1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel, #12151a);
  color: var(--text);
  text-align: center;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
}
.qr-popup-dialog h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.qr-popup-dialog .muted { margin: 0 0 .85rem; font-size: .9rem; }
.qr-popup-code {
  display: grid;
  place-items: center;
  margin: 0 auto .9rem;
  padding: .65rem;
  border-radius: 14px;
  background: #fff;
}
.qr-popup-code svg { width: min(220px, 70vw); height: auto; display: block; }
.qr-popup-link {
  display: inline-block;
  font-size: .9rem;
  color: var(--accent);
  word-break: break-all;
}
.qr-popup-close {
  position: absolute;
  top: .45rem;
  right: .55rem;
  border: 0;
  background: transparent;
  color: var(--muted, #9aa3ad);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.fire-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 700;
  margin-left: .15rem;
}
.fire-btn.is-on {
  background: linear-gradient(135deg, #ff9b3c, #ff5a3c);
  color: #1a0c04;
  border-color: transparent;
}
.fire-stat {
  font-size: .9rem;
  color: var(--accent);
  margin-left: .15rem;
  font-weight: 700;
}
.app-toast-host {
  position: fixed;
  z-index: 13000;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  pointer-events: none;
  max-width: min(22rem, calc(100vw - 2rem));
}
.app-toast {
  pointer-events: auto;
  padding: .85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel, #141820);
  color: var(--text, #f2f4f7);
  box-shadow: 0 14px 40px rgba(0,0,0,.4);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
  font-size: .95rem;
  font-weight: 600;
}
.app-toast.is-in { opacity: 1; transform: translateY(0); }
.app-toast.is-out { opacity: 0; transform: translateY(8px); }
.app-toast-ok { border-color: rgba(62,207,142,.45); box-shadow: 0 14px 40px rgba(0,0,0,.4), inset 3px 0 0 #3ecf8e; }
.app-toast-err { border-color: rgba(255,93,108,.45); box-shadow: 0 14px 40px rgba(0,0,0,.4), inset 3px 0 0 #ff5d6c; }

.vote-toast {
  position: fixed;
  left: 50%;
  top: 18%;
  z-index: 14000;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .85rem 1.25rem .85rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 197, 66, .35);
  background:
    linear-gradient(135deg, rgba(18, 24, 34, .92), rgba(10, 14, 22, .94));
  color: #f7f3e8;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, .45),
    0 0 0 1px rgba(255, 255, 255, .04) inset,
    0 0 28px rgba(245, 197, 66, .12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: .98rem;
  font-weight: 650;
  letter-spacing: .01em;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -8px) scale(.96);
  transition: opacity .22s ease, transform .22s ease;
}
.vote-toast.is-in {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
.vote-toast.is-out {
  opacity: 0;
  transform: translate(-50%, -6px) scale(.98);
}
.vote-toast-star {
  display: inline-grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  color: #1a1408;
  background: linear-gradient(145deg, #ffe08a, #f5c542 55%, #e0a21a);
  box-shadow: 0 4px 14px rgba(245, 197, 66, .35);
  font-size: 1rem;
  line-height: 1;
}
.vote-toast-text { white-space: nowrap; }
.album-picker {
  position: fixed;
  inset: 0;
  z-index: 12500;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.album-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}
.album-picker-dialog {
  position: relative;
  z-index: 1;
  width: min(26rem, 100%);
  max-height: min(88vh, 640px);
  overflow: auto;
  padding: 1.25rem 1.2rem 1.15rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel, #12151a);
  color: var(--text);
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
}
.album-picker-dialog h3 { margin: 0 0 .25rem; font-size: 1.15rem; }
.album-picker-dialog h4 { margin: 0 0 .65rem; font-size: .95rem; }
.album-picker-lead { margin: 0 0 .85rem; }
.album-picker-close {
  position: absolute;
  top: .45rem;
  right: .55rem;
  border: 0;
  background: transparent;
  color: var(--muted, #9aa3ad);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.album-picker-list {
  display: grid;
  gap: .45rem;
  margin-bottom: 1rem;
}
.album-picker-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  width: 100%;
  text-align: left;
  padding: .7rem .85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: inherit;
  cursor: pointer;
}
.album-picker-item:hover {
  border-color: rgba(255, 196, 64, 0.45);
  background: rgba(255, 196, 64, 0.06);
}
.album-picker-empty { margin: .25rem 0 .75rem; }
.album-picker-create {
  padding-top: .9rem;
  border-top: 1px solid var(--line);
}
.album-picker-field {
  display: grid;
  gap: .35rem;
  margin-bottom: .65rem;
  font-size: .88rem;
}
.album-picker-field input {
  width: 100%;
  padding: .6rem .75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-2, #0c0e13);
  color: inherit;
}
.album-picker-check {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .85rem;
  font-size: .9rem;
  cursor: pointer;
}
.album-picker-actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
}
.modal-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; }
.similar-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-top: .75rem;
}
.similar-row a { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.similar-row img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.modal-similar {
  margin-top: calc(1.25rem + 20px);
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  clear: both;
}
.modal-similar h3 { margin: 0 0 .65rem; }
.similar-row-lg {
  grid-template-columns: repeat(6, 1fr);
  gap: .55rem;
}
.similar-masonry {
  display: block;
  columns: 6 120px;
  column-gap: .55rem;
}
.similar-masonry .similar-card {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin: 0 0 .55rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  vertical-align: top;
}
.similar-masonry .similar-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--ar, 16 / 10);
  object-fit: cover;
  background: #0f1420;
}
.tag-rail {
  margin: 0 0 1.1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
}
.tag-rail-title {
  margin: 0 0 .55rem;
  font-size: .95rem;
  font-weight: 650;
}
.chip-with-thumb {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .7rem .35rem .35rem;
}
.chip-with-thumb img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: rgba(255,255,255,.06);
}
.chip-with-thumb span { line-height: 1.2; }
.chip-with-thumb em { font-style: normal; font-weight: 400; }
.tag-rail-mid {
  margin: 1.25rem 0;
  background:
    linear-gradient(180deg, rgba(62,207,142,.08), transparent 70%),
    rgba(255,255,255,.03);
}
.wall-grid-break {
  grid-column: 1 / -1;
  column-span: all;
  -webkit-column-span: all;
  display: block;
  width: 100%;
  margin: .35rem 0 1rem;
}

.search-total {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
}
.search-toc {
  margin: 0 0 1.75rem;
  padding: 1rem 1.1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid var(--line, rgba(127,127,127,.25));
  background: var(--panel, rgba(255,255,255,.04));
}
.search-toc-label {
  margin: 0 0 .75rem;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  opacity: .75;
}
.search-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .65rem;
}
.search-toc-card {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .45rem .55rem;
  border-radius: 10px;
  border: 1px solid var(--line, rgba(127,127,127,.2));
  color: inherit;
  text-decoration: none;
  background: rgba(0,0,0,.02);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.search-toc-card:hover {
  border-color: var(--accent, #3ecf8e);
  background: rgba(62, 207, 142, .06);
  transform: translateY(-1px);
}
.search-toc-previews {
  display: flex;
  flex-shrink: 0;
  width: 72px;
  height: 48px;
}
.search-toc-previews img,
.search-toc-ph {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--panel, #fff);
  background: var(--line, #ddd);
  margin-left: -14px;
}
.search-toc-previews img:first-child,
.search-toc-previews .search-toc-ph:first-child {
  margin-left: 0;
}
.search-toc-meta {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}
.search-toc-meta strong {
  font-size: .95rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-toc-meta em {
  font-style: normal;
  font-size: .8rem;
}
.search-section-block {
  margin: 0 0 2.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line, rgba(127,127,127,.25));
  scroll-margin-top: 5.5rem;
}
.search-section-block:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
.search-section-head h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 650;
  line-height: 1.35;
}
.search-section-more {
  margin: .85rem 0 0;
  text-align: center;
}

.section-carousel { padding-bottom: .5rem; overflow: hidden; }
.home-carousel {
  margin-top: .25rem;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.home-carousel-track {
  display: flex;
  gap: .9rem;
  width: max-content;
  animation: carouselSlide 48s linear infinite;
  padding: .35rem 1.25rem 1rem;
}
.home-carousel:hover .home-carousel-track { animation-play-state: paused; }
.home-carousel-card {
  position: relative;
  flex: 0 0 auto;
  width: min(280px, 72vw);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  color: #fff;
  box-shadow: 0 14px 36px rgba(0,0,0,.28);
  transition: transform .2s ease, border-color .2s ease;
}
.home-carousel-card:hover {
  transform: translateY(-4px);
  border-color: rgba(62,207,142,.4);
  color: #fff;
}
.home-carousel-card img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.home-carousel-card span {
  display: block;
  padding: .7rem .85rem .85rem;
  font-size: .9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@keyframes carouselSlide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes drift {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}
@keyframes gridShift {
  from { background-position: 0 0; }
  to { background-position: 72px 72px; }
}

@media (max-width: 900px) {
  .mega-grid { grid-template-columns: 1fr; }
  .mega-col { padding: .42rem .7rem .22rem; }
  .mega-col > summary { cursor: pointer; pointer-events: auto; }
  .mega-col:not([open]) .mega-links { display: none; }
  .mega-col[open] .mega-links { display: grid; }
  .modal-layout { grid-template-columns: 1fr; }
  .dash-shell { grid-template-columns: 1fr; }
  .stat-row.big { grid-template-columns: 1fr; }
  .header-nav a:not(.btn):not(.sections-toggle):not(.nav-keep), .header-nav .inline-form { display: none; }
  .header-nav { min-width: 0; }
  .header-inner { min-width: 0; }
  .similar-row { grid-template-columns: repeat(2, 1fr); }
  .similar-row-lg { grid-template-columns: repeat(3, 1fr); }
  .similar-masonry { columns: 3 100px; }
  .home-split { grid-template-columns: 1fr; }
  .tag-group-list { grid-template-columns: 1fr; }
  .modal-layout.is-landscape,
  .modal-layout.is-portrait,
  .modal-layout.is-pending-layout { grid-template-columns: 1fr; }
  .modal-media,
  .modal-layout.is-portrait .modal-media,
  .modal-layout.is-landscape .modal-media {
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    justify-self: stretch;
  }
  .modal-preview,
  .modal-layout.is-portrait .modal-preview,
  .modal-layout.is-landscape .modal-preview {
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
  }
  .modal-image,
  .modal-preview img,
  .modal-layout.is-portrait .modal-image,
  .modal-layout.is-landscape .modal-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }
  .modal-layout.is-portrait .modal-under {
    max-width: 100%;
  }
  .collection-hero { min-height: 200px; }
  /* Gallery: flex layout — grid 1fr rows collapse to 0 on mobile and hide the image */
  .modal.is-gallery {
    place-items: stretch;
  }
  .modal.is-gallery .modal-dialog {
    animation: none;
    width: 100%;
    height: 100%;
    max-height: none;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .modal.is-gallery .gallery-layer {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    height: auto;
  }
  .modal.is-gallery .modal-toolbar {
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
    z-index: 6;
    background: transparent;
    border: 0;
    padding: .45rem .55rem;
    padding-top: max(.45rem, env(safe-area-inset-top, 0px));
  }
  .ss-shell {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    height: auto;
  }
  .ss-stage {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42vh;
    padding: 3rem .4rem .4rem;
  }
  .ss-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    height: auto;
  }
  .ss-frame.is-zoomed {
    display: block;
    overflow: auto;
    max-height: calc(100dvh - 13rem);
  }
  .ss-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 42px;
    height: 42px;
    font-size: 1.55rem;
  }
  .ss-prev { left: .35rem; }
  .ss-next { right: .35rem; }
  .ss-nav:hover:not(:disabled) { transform: translateY(-50%) scale(1.05); }
  .ss-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: calc(100dvh - 13rem);
    object-fit: contain;
    border-radius: 0;
    box-shadow: none;
  }
  .ss-frame .preview-gif-wrap {
    display: flex;
    width: 100%;
    max-height: calc(100dvh - 13rem);
    align-items: center;
    justify-content: center;
  }
  .ss-frame .preview-gif-wrap .ss-image {
    max-height: inherit;
  }
  .ss-footer {
    flex: 0 0 auto;
    padding: .55rem .7rem calc(.75rem + env(safe-area-inset-bottom, 0px));
  }
  .ss-footer-top { flex-direction: column; align-items: stretch; }
  .ss-actions { justify-content: flex-start; }
  .ss-details { width: 100%; }

  .container { width: min(1180px, calc(100% - 1.25rem)); }
  .section { padding: 2rem 0; }
  .wall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
  }
  .wall-grid-masonry {
    columns: 2 150px;
    column-gap: .7rem;
  }
  .wall-grid-masonry.is-js-masonry .masonry-cols {
    gap: .7rem;
  }
  .wall-grid-masonry .card-wall { margin: 0 0 .7rem; }
  .card-wall { border-radius: 12px; }
  .card-wall-title { font-size: .82rem; padding: .45rem .55rem; }

  .collection-filters {
    flex-direction: column;
    align-items: stretch;
    gap: .55rem;
  }
  .orient-filter,
  .color-filter,
  .res-filter {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
    gap: .35rem;
    margin-top: .55rem;
  }
  .orient-filter::-webkit-scrollbar,
  .color-filter::-webkit-scrollbar,
  .res-filter::-webkit-scrollbar { display: none; }
  .orient-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: .42rem .78rem;
    font-size: .84rem;
  }
  .color-swatch { flex: 0 0 auto; }
  .collection-hero-content h1 {
    font-size: clamp(1.55rem, 7vw, 2.2rem);
  }

  /* Modal: full-screen sheet on tablet/phone */
  .modal {
    place-items: stretch;
    padding:
      env(safe-area-inset-top, 0)
      env(safe-area-inset-right, 0)
      env(safe-area-inset-bottom, 0)
      env(safe-area-inset-left, 0);
  }
  .modal-dialog {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    border-radius: 0;
    border: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: none;
  }
  .modal-toolbar {
    flex: 0 0 auto;
    padding: .55rem .75rem;
    padding-top: max(.55rem, env(safe-area-inset-top, 0px));
    background: rgba(12, 16, 24, .92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
  }
  .modal-close,
  .modal-delete {
    width: 42px;
    height: 42px;
    min-width: 42px;
  }
  .modal-delete {
    width: auto;
    padding: 0 1rem;
  }
  .modal-body {
    flex: 1 1 auto;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: .75rem .85rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    clear: both;
  }
  .modal-preview {
    width: 100%;
    max-width: 100%;
    max-height: min(70dvh, 560px);
    aspect-ratio: var(--ar, 16 / 10);
    min-height: 140px;
  }
  .modal-layout.is-portrait .modal-preview,
  .modal-layout.is-landscape .modal-preview,
  .modal-layout.is-pending-layout .modal-preview {
    width: 100%;
    max-width: 100%;
    max-height: min(70dvh, 560px);
  }
  .modal-preview .modal-image-btn {
    width: 100%;
    height: 100%;
  }
  .modal-preview img,
  .modal-image,
  .modal-layout.is-portrait .modal-image,
  .modal-layout.is-landscape .modal-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }
  .modal-side h2 {
    font-size: 1.2rem;
    line-height: 1.25;
    margin: 0 0 .65rem;
  }
  .modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin: .65rem 0;
  }
  .modal-actions .btn {
    min-height: 42px;
    padding: .55rem .85rem;
  }
  .share-menu {
    position: fixed;
    left: .75rem;
    right: .75rem;
    top: auto;
    bottom: calc(.85rem + env(safe-area-inset-bottom, 0px));
    min-width: 0;
    max-height: 50vh;
    overflow: auto;
  }
  .author-card.modal-author {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .stat-pills span {
    font-size: .78rem;
    padding: .28rem .55rem;
  }
  .dl-link,
  .dl-list a {
    padding: .8rem .9rem;
    min-height: 44px;
  }
  .site-footer { padding: 1.5rem 0 2.25rem; }
  .footer-links { gap: .45rem .85rem; }
}
@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    gap: .45rem .5rem;
    padding: .65rem 0;
    padding-top: max(.55rem, env(safe-area-inset-top, 0px));
  }
  .brand {
    order: 1;
    font-size: 1rem;
    gap: .3rem;
    flex: 0 1 auto;
    max-width: calc(100% - 11rem);
  }
  .brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .brand-mark {
    width: 26px;
    height: 26px;
  }
  .header-nav {
    order: 2;
    margin-left: auto;
    gap: .3rem;
    flex: 0 1 auto;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .header-search {
    order: 3;
    display: flex;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }
  .header-search input {
    min-width: 0;
    width: 100%;
    padding: .55rem .7rem;
    font-size: 16px;
  }
  .header-search button { padding: 0 .7rem; flex-shrink: 0; }
  .nav-toggle {
    padding: .35rem .55rem;
    font-size: .78rem;
    white-space: nowrap;
  }
  .header-nav .nav-keep {
    font-size: .78rem;
    white-space: nowrap;
  }
  .header-nav .btn {
    padding: .35rem .55rem;
    font-size: .78rem;
    white-space: nowrap;
  }
  .profile-head { flex-direction: column; }
  .hero-content { padding: 3.5rem 0 2.25rem; }
  .tag-picker-toolbar { flex-direction: column; align-items: stretch; }
  .ss-thumb { width: 58px; height: 40px; }
  .ss-footer { padding: .65rem .7rem calc(.85rem + env(safe-area-inset-bottom, 0px)); }
  .ss-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .4rem;
  }
  .ss-actions .btn { width: 100%; }
  .ss-actions .share-wrap { grid-column: 1 / -1; }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .4rem;
  }
  .modal-actions > .btn,
  .modal-actions > a.btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .modal-actions .share-wrap,
  .modal-actions [data-report-wallpaper],
  .modal-actions form {
    grid-column: 1 / -1;
  }
  .modal-actions .share-wrap .btn { width: 100%; }
  .rating-row {
    flex-wrap: wrap;
    gap: .45rem;
  }
  .comment-form textarea { font-size: 16px; }
  .pager a,
  .pager span {
    min-width: 2.4rem;
    min-height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
