:root {
  color-scheme: dark;
  --gallery-bg: #07120f;
  --gallery-bg-soft: #091713;
  --gallery-surface: #0d1c18;
  --gallery-surface-raised: #11241e;
  --gallery-surface-strong: #163028;
  --gallery-line: #24443a;
  --gallery-line-strong: #356354;
  --gallery-text: #f2faf7;
  --gallery-text-soft: #c5d8d1;
  --gallery-muted: #8ea69e;
  --gallery-teal: #39cdb1;
  --gallery-teal-strong: #74e3ce;
  --gallery-teal-deep: #0f766e;
  --gallery-coral: #ff806c;
  --gallery-coral-soft: #3c201d;
  --gallery-danger: #ff9b8b;
  --gallery-success: #72d7a8;
  --gallery-header-height: 72px;
  --gallery-max: 1760px;
  --gallery-radius-sm: 8px;
  --gallery-radius: 8px;
  --gallery-radius-lg: 8px;
  --gallery-space-xs: 4px;
  --gallery-space-sm: 8px;
  --gallery-space-md: 12px;
  --gallery-space-lg: 16px;
  --gallery-space-xl: 24px;
  --gallery-space-2xl: 32px;
  --gallery-space-3xl: 48px;
  --gallery-ease: cubic-bezier(.22, 1, .36, 1);
  --gallery-z-header: 20;
  --gallery-z-toast: 60;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--gallery-bg);
  color: var(--gallery-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 1rem;
  font-kerning: normal;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body:has(dialog[open]) {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}

button,
select,
summary {
  cursor: pointer;
}

button:disabled,
select:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--gallery-teal-strong);
  outline-offset: 3px;
}

::selection {
  background: var(--gallery-teal);
  color: #04100d;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.skip-link {
  position: fixed;
  z-index: calc(var(--gallery-z-toast) + 1);
  top: 8px;
  left: 12px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--gallery-radius-sm);
  background: var(--gallery-teal-strong);
  color: #04110e;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 180ms var(--gallery-ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: var(--gallery-z-header);
  top: 0;
  min-height: var(--gallery-header-height);
  border-bottom: 1px solid rgba(53, 99, 84, .7);
  background: rgba(7, 18, 15, .96);
}

.header-inner {
  width: min(var(--gallery-max), calc(100% - 40px));
  min-height: var(--gallery-header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--gallery-space-xl);
}

.brand-link,
.footer-brand {
  min-height: 44px;
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  gap: 10px;
  color: var(--gallery-text);
  text-decoration: none;
}

.brand-link img,
.footer-brand img {
  display: block;
  border-radius: 8px;
}

.brand-link span {
  display: grid;
  line-height: 1.15;
}

.brand-link strong {
  font-size: .9rem;
  letter-spacing: .02em;
}

.brand-link small {
  margin-top: 3px;
  color: var(--gallery-muted);
  font-size: .72rem;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.primary-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: var(--gallery-radius-sm);
  color: var(--gallery-text-soft);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  background: var(--gallery-surface-raised);
  color: var(--gallery-teal-strong);
}

.header-search {
  min-width: 240px;
  max-width: 520px;
  height: 46px;
  margin-left: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 14px;
  border: 1px solid var(--gallery-line);
  border-radius: var(--gallery-radius);
  background: var(--gallery-surface);
  transition: border-color 160ms ease, background 160ms ease;
}

.header-search:focus-within {
  border-color: var(--gallery-teal);
  background: var(--gallery-surface-raised);
}

.header-search > .icon {
  color: var(--gallery-muted);
}

.header-search input {
  width: 100%;
  height: 44px;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--gallery-text);
  font-size: .94rem;
}

.header-search input::placeholder {
  color: #9ab0a8;
  opacity: 1;
}

.search-clear,
.search-submit {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 7px;
}

.search-clear {
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: var(--gallery-muted);
}

.search-clear:hover {
  background: var(--gallery-surface-strong);
  color: var(--gallery-text);
}

.search-submit {
  padding: 0 12px;
  background: var(--gallery-teal-deep);
  color: #f4fffc;
  font-size: .86rem;
  font-weight: 800;
}

.search-submit:hover {
  background: #10867c;
}

.publish-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: var(--gallery-radius-sm);
  background: var(--gallery-teal);
  color: #04110e;
  font-size: .9rem;
  font-weight: 850;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms var(--gallery-ease);
}

.publish-button:hover {
  background: var(--gallery-teal-strong);
  transform: translateY(-1px);
}

.profile-entry {
  min-height: 46px;
  max-width: 170px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--gallery-line);
  border-radius: var(--gallery-radius-sm);
  background: var(--gallery-surface);
  color: var(--gallery-text-soft);
  font-size: .84rem;
  font-weight: 800;
}

.profile-entry:hover {
  border-color: var(--gallery-line-strong);
  color: var(--gallery-teal-strong);
}

.profile-entry span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

main {
  width: min(var(--gallery-max), calc(100% - 40px));
  margin: 0 auto;
}

.gallery-hero {
  width: 100vw;
  min-height: 300px;
  margin-left: calc(50% - 50vw);
  display: flex;
  align-items: center;
  padding: 42px max(20px, calc((100vw - var(--gallery-max)) / 2));
  border: 0;
  border-radius: 0;
  background: var(--gallery-bg-soft);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.gallery-hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: rgba(3, 13, 10, .72);
  pointer-events: none;
}

.hero-backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 320ms ease, transform 480ms var(--gallery-ease);
}

.gallery-hero.is-image-ready .hero-backdrop {
  opacity: .72;
  transform: scale(1);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--gallery-line-strong);
  border-radius: 999px;
  color: var(--gallery-teal-strong);
  font-size: .82rem;
  font-weight: 800;
}

.gallery-hero h1 {
  max-width: 18ch;
  margin-top: 18px;
  font-size: 2.75rem;
  line-height: 1.13;
  letter-spacing: 0;
}

.gallery-hero p {
  max-width: 64ch;
  margin-top: 18px;
  color: var(--gallery-text-soft);
  font-size: 1.03rem;
  line-height: 1.75;
}

.hero-actions,
.state-actions,
.auth-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--gallery-radius-sm);
  font-size: .92rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 160ms var(--gallery-ease), background 160ms ease, border-color 160ms ease, color 160ms ease;
}

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

.button:disabled {
  opacity: .5;
}

.button-primary {
  background: var(--gallery-teal);
  color: #04110e;
}

.button-primary:hover:not(:disabled) {
  background: var(--gallery-teal-strong);
}

.button-secondary {
  border-color: var(--gallery-line-strong);
  background: var(--gallery-surface);
  color: var(--gallery-text);
}

.button-secondary:hover:not(:disabled) {
  border-color: var(--gallery-teal);
  background: var(--gallery-surface-raised);
}


.category-section {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--gallery-line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading h2,
.feed-toolbar h2,
.rail-heading h2 {
  font-size: 1.25rem;
  line-height: 1.3;
}

.section-heading p,
.feed-toolbar p,
.rail-heading p {
  margin-top: 4px;
  color: var(--gallery-muted);
  font-size: .86rem;
}

.text-button {
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--gallery-teal-strong);
  font-size: .88rem;
  font-weight: 800;
}

.text-button:hover {
  color: var(--gallery-text);
}

.category-chips {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chip,
.filter-token {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--gallery-line);
  border-radius: 999px;
  background: var(--gallery-surface);
  color: var(--gallery-text-soft);
  font-size: .88rem;
  font-weight: 750;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.category-chip span {
  color: var(--gallery-muted);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}

.category-chip:hover,
.category-chip[aria-pressed="true"] {
  border-color: var(--gallery-teal);
  background: var(--gallery-surface-strong);
  color: var(--gallery-teal-strong);
}

.chip-skeleton {
  width: 112px;
  height: 44px;
  border-radius: 999px;
  background: var(--gallery-surface-raised);
  overflow: hidden;
  position: relative;
}

.chip-skeleton:nth-child(2) { width: 148px; }
.chip-skeleton:nth-child(3) { width: 96px; }
.chip-skeleton:nth-child(4) { width: 126px; }
.chip-skeleton:nth-child(5) { width: 104px; }

.gallery-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
  padding: 32px 0 64px;
}

.feed-section {
  min-width: 0;
  scroll-margin-top: calc(var(--gallery-header-height) + 16px);
}

.feed-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
}

.feed-title-row {
  min-width: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.filter-jump {
  display: none;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--gallery-line);
  border-radius: var(--gallery-radius-sm);
  background: var(--gallery-surface);
  color: var(--gallery-text-soft);
  font-weight: 800;
}

.feed-filters {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
}

.select-field {
  display: grid;
  gap: 5px;
  color: var(--gallery-muted);
  font-size: .75rem;
  font-weight: 750;
}

.select-field select {
  min-width: 150px;
  height: 44px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--gallery-line);
  border-radius: var(--gallery-radius-sm);
  background: var(--gallery-surface);
  color: var(--gallery-text);
}

.sort-switcher {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0;
  border: 1px solid var(--gallery-line);
  border-radius: 8px;
  background: var(--gallery-surface);
}

.sort-switcher button {
  min-width: 76px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--gallery-muted);
  font-size: .84rem;
  font-weight: 800;
  transition: background 160ms ease, color 160ms ease;
}

.sort-switcher button:hover {
  color: var(--gallery-text);
}

.sort-switcher button[aria-pressed="true"] {
  background: var(--gallery-surface-strong);
  color: var(--gallery-teal-strong);
}

.active-filters {
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-token {
  min-height: 36px;
  padding: 0 10px;
  color: var(--gallery-text-soft);
  font-size: .8rem;
}

.filter-token button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--gallery-muted);
}

.filter-token button:hover {
  background: var(--gallery-surface-strong);
  color: var(--gallery-text);
}

.gallery-grid {
  column-count: 4;
  column-gap: 16px;
}

.gallery-card,
.gallery-skeleton {
  width: 100%;
  margin: 0 0 16px;
  display: inline-block;
  break-inside: avoid;
}

.gallery-card {
  position: relative;
  border: 1px solid var(--gallery-line);
  border-radius: var(--gallery-radius);
  background: var(--gallery-surface);
  overflow: hidden;
  contain: paint;
  transition: transform 200ms var(--gallery-ease), border-color 180ms ease, background 180ms ease;
}

.gallery-card:hover,
.gallery-card:focus-within {
  border-color: var(--gallery-line-strong);
  background: var(--gallery-surface-raised);
  transform: translateY(-2px);
}

.card-media-button {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  background: var(--gallery-surface-strong);
  color: inherit;
  text-align: left;
}

.card-media {
  position: relative;
  width: 100%;
  display: block;
  aspect-ratio: var(--media-ratio, 1 / 1);
  overflow: hidden;
  background: #12251f;
}

.card-media::before,
.detail-image-state::before,
.gallery-skeleton i::before,
.chip-skeleton::before,
.rail-skeleton::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(116, 227, 206, .1) 46%, transparent 72%);
  transform: translateX(-100%);
  animation: gallery-shimmer 1.45s linear infinite;
}

.card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 260ms ease, transform 420ms var(--gallery-ease);
}

.gallery-card.is-image-loaded .card-media img {
  opacity: 1;
  transform: scale(1);
}

.gallery-card:hover .card-media img {
  transform: scale(1.025);
}

.card-media-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--gallery-muted);
  font-size: .82rem;
  text-align: center;
}

.gallery-card.is-image-loaded .card-media-state {
  display: none;
}

.card-image-failed .card-media::before {
  animation: none;
  opacity: 0;
}

.card-image-failed .card-media-state {
  color: var(--gallery-text-soft);
}

.media-badges {
  position: absolute;
  inset: 10px 10px auto;
  min-width: 0;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.model-badge,
.ratio-badge {
  min-width: 0;
  max-width: calc(50% - 4px);
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  background: rgba(5, 16, 13, .88);
  color: #f5fffc;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.card-author-row,
.card-meta-row,
.card-stats,
.card-actions {
  display: flex;
  align-items: center;
}

.card-author-row {
  justify-content: space-between;
  gap: 10px;
}

.author-identity {
  min-width: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gallery-text-soft);
  font: inherit;
  text-align: left;
  text-decoration: none;
}

.author-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gallery-line-strong);
  border-radius: 50%;
  background: var(--gallery-surface-strong);
  color: var(--gallery-teal-strong);
  font-size: .74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.author-identity span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .82rem;
  font-weight: 750;
}

.card-time {
  flex: 0 0 auto;
  color: var(--gallery-muted);
  font-size: .72rem;
}

.card-title-button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gallery-text);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.4;
  text-align: left;
  overflow-wrap: anywhere;
}

.card-title-button:hover {
  color: var(--gallery-teal-strong);
}

.card-prompt-wrap {
  display: grid;
  gap: 4px;
}

.card-prompt {
  display: -webkit-box;
  overflow: hidden;
  color: var(--gallery-text-soft);
  font-size: .86rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.card-prompt.is-expanded {
  display: block;
  overflow: visible;
}

mark {
  padding: 0 .12em;
  border-radius: 3px;
  background: #385a2f;
  color: #f8fff4;
}

.prompt-toggle {
  width: fit-content;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--gallery-teal-strong);
  font-size: .78rem;
  font-weight: 800;
}

.card-meta-row {
  flex-wrap: wrap;
  gap: 6px;
}

.meta-chip,
.detail-tag {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--gallery-surface-strong);
  color: var(--gallery-muted);
  font-size: .72rem;
  font-weight: 750;
}

.card-stats {
  flex-wrap: wrap;
  gap: 12px;
  color: var(--gallery-muted);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}

.card-stats span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.card-stats .icon {
  width: .95rem;
  height: .95rem;
}

.card-actions {
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 2px;
  border-top: 1px solid var(--gallery-line);
}

.card-actions button,
.card-actions a {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--gallery-radius-sm);
  background: transparent;
  color: var(--gallery-muted);
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}

.card-actions button:hover,
.card-actions a:hover {
  background: var(--gallery-surface-strong);
  color: var(--gallery-text);
}

.card-actions button[aria-pressed="true"] {
  color: var(--gallery-coral);
}

.card-actions .card-open-action {
  min-width: 0;
  margin-left: auto;
  padding-inline: 10px;
  color: var(--gallery-teal-strong);
  font-size: .78rem;
  font-weight: 800;
}

.gallery-skeleton {
  padding-bottom: 14px;
  border: 1px solid var(--gallery-line);
  border-radius: var(--gallery-radius);
  background: var(--gallery-surface);
  overflow: hidden;
}

.gallery-skeleton i {
  position: relative;
  height: 220px;
  display: block;
  background: var(--gallery-surface-raised);
  overflow: hidden;
}

.gallery-skeleton.is-tall i { height: 330px; }
.gallery-skeleton.is-wide i { height: 170px; }

.gallery-skeleton span {
  height: 12px;
  display: block;
  margin: 12px 14px 0;
  border-radius: 5px;
  background: var(--gallery-surface-raised);
}

.gallery-skeleton span:nth-of-type(2) { width: 78%; }
.gallery-skeleton span:nth-of-type(3) { width: 48%; }

.feed-state {
  min-height: 360px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 48px 24px;
  border: 1px solid var(--gallery-line);
  border-radius: var(--gallery-radius);
  background: var(--gallery-surface);
  text-align: center;
}

.feed-state[hidden] {
  display: none;
}

.state-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border: 1px solid var(--gallery-line-strong);
  border-radius: 50%;
  color: var(--gallery-teal-strong);
  font-size: 1.35rem;
  font-weight: 850;
}

.feed-state.is-error .state-mark {
  border-color: #8b463f;
  color: var(--gallery-danger);
}

.feed-state h3 {
  font-size: 1.2rem;
}

.feed-state p {
  max-width: 48ch;
  margin-top: 8px;
  color: var(--gallery-muted);
}

.feed-more {
  min-height: 90px;
  display: grid;
  place-items: center;
  padding: 20px 0;
  color: var(--gallery-muted);
  font-size: .84rem;
  text-align: center;
}

.load-indicator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.load-indicator[hidden] {
  display: none;
}

.load-indicator i,
.detail-image-state i {
  width: 18px;
  height: 18px;
  display: block;
  border: 2px solid var(--gallery-line-strong);
  border-top-color: var(--gallery-teal-strong);
  border-radius: 50%;
  animation: gallery-spin .75s linear infinite;
}

#feedSentinel {
  width: 100%;
  height: 1px;
}

.gallery-rail {
  position: sticky;
  top: calc(var(--gallery-header-height) + 20px);
  display: grid;
  gap: 28px;
}

.rail-section {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--gallery-line);
}

.rail-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.rail-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.rail-heading h2 {
  font-size: 1rem;
}

.rail-heading p {
  max-width: 28ch;
  font-size: .76rem;
}

.rail-icon {
  color: var(--gallery-coral);
}

.rail-list,
.prompt-ranking,
.author-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.rail-skeleton {
  position: relative;
  height: 62px;
  border-radius: var(--gallery-radius-sm);
  background: var(--gallery-surface-raised);
  overflow: hidden;
}

.rail-empty {
  padding: 14px 0;
  color: var(--gallery-muted);
  font-size: .82rem;
  line-height: 1.6;
}

.hot-item,
.ranking-item,
.author-item {
  width: 100%;
  min-height: 64px;
  display: grid;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 0;
  border-radius: var(--gallery-radius-sm);
  background: transparent;
  color: var(--gallery-text);
  text-align: left;
  text-decoration: none;
  transition: background 150ms ease;
}

.hot-item:hover,
.ranking-item:hover,
.author-item:hover {
  background: var(--gallery-surface-raised);
}

.hot-item {
  grid-template-columns: 54px minmax(0, 1fr);
}

.hot-item img,
.hot-item .rail-image-fallback {
  width: 54px;
  height: 54px;
  display: block;
  border-radius: 7px;
  background: var(--gallery-surface-strong);
  object-fit: cover;
}

.hot-item div,
.ranking-item div,
.author-item div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.hot-item strong,
.ranking-item strong,
.author-item strong {
  overflow: hidden;
  color: var(--gallery-text-soft);
  font-size: .82rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-item span,
.ranking-item span,
.author-item span {
  overflow: hidden;
  color: var(--gallery-muted);
  font-size: .72rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-item {
  grid-template-columns: 28px minmax(0, 1fr);
}

.ranking-item > b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gallery-surface-strong);
  color: var(--gallery-teal-strong);
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
}

.author-item {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}

.author-item .author-avatar {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}

.author-item .follow-label {
  color: var(--gallery-teal-strong);
  font-size: .74rem;
  font-weight: 800;
}

.site-footer {
  width: min(var(--gallery-max), calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 32px 0 calc(32px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--gallery-line);
}

.footer-brand {
  font-size: .9rem;
  font-weight: 850;
}

.site-footer p {
  max-width: 62ch;
  margin-top: 8px;
  color: var(--gallery-muted);
  font-size: .8rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.site-footer nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: var(--gallery-radius-sm);
  color: var(--gallery-text-soft);
  font-size: .82rem;
  font-weight: 750;
  text-decoration: none;
}

.site-footer nav a:hover {
  background: var(--gallery-surface);
  color: var(--gallery-teal-strong);
}

dialog {
  color: var(--gallery-text);
}

dialog::backdrop {
  background: rgba(1, 8, 6, .84);
}

.post-dialog {
  width: min(1500px, calc(100vw - 40px));
  max-width: none;
  height: min(920px, calc(100dvh - 40px));
  max-height: none;
  margin: auto;
  padding: 0;
  border: 1px solid var(--gallery-line-strong);
  border-radius: var(--gallery-radius-lg);
  background: var(--gallery-bg-soft);
  overflow: hidden;
}

.post-dialog[open] {
  animation: gallery-dialog-in 220ms var(--gallery-ease) both;
}

.detail-shell {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.detail-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px 10px 20px;
  border-bottom: 1px solid var(--gallery-line);
  background: var(--gallery-bg-soft);
}

.detail-heading {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.detail-heading > span {
  color: var(--gallery-muted);
  font-size: .72rem;
  font-weight: 750;
}

.detail-heading h2 {
  overflow: hidden;
  font-size: 1rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-navigation {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-button,
.zoom-level,
.compact-action {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--gallery-radius-sm);
  background: transparent;
  color: var(--gallery-text-soft);
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.icon-button:hover:not(:disabled),
.zoom-level:hover:not(:disabled),
.compact-action:hover:not(:disabled) {
  border-color: var(--gallery-line);
  background: var(--gallery-surface-raised);
  color: var(--gallery-text);
}

.icon-button:disabled {
  opacity: .35;
}

.detail-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(390px, .65fr);
}

.detail-media {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  border-right: 1px solid var(--gallery-line);
  background: #050c0a;
}

.detail-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  touch-action: pan-x pan-y pinch-zoom;
}

.detail-stage img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: block;
  object-fit: contain;
  transform: scale(var(--detail-zoom, 1));
  transform-origin: var(--zoom-origin-x, 50%) var(--zoom-origin-y, 50%);
  transition: transform 180ms var(--gallery-ease), opacity 180ms ease;
}

.detail-stage:fullscreen {
  padding: 32px;
  background: #020806;
}

.detail-stage:fullscreen img {
  width: 100%;
  height: 100%;
}

.detail-image-state {
  position: relative;
  min-width: 220px;
  min-height: 140px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  border-radius: var(--gallery-radius);
  background: var(--gallery-surface);
  color: var(--gallery-muted);
  font-size: .82rem;
  overflow: hidden;
}

.detail-image-state.is-error::before {
  display: none;
}

.detail-image-state.is-error i {
  display: none;
}

.stage-toolbar {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-top: 1px solid var(--gallery-line);
  background: var(--gallery-bg-soft);
}

.stage-toolbar > div {
  display: flex;
  align-items: center;
  gap: 4px;
}

.detail-media-access {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--gallery-line);
  background: var(--gallery-surface);
}

.detail-media-access strong,
.detail-media-access span {
  min-width: 0;
}

.detail-media-access strong {
  color: var(--gallery-text);
  font-size: .78rem;
}

.detail-media-access span {
  grid-column: 1;
  color: var(--gallery-muted);
  font-size: .72rem;
  line-height: 1.5;
}

.detail-media-access a {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: var(--gallery-radius-sm);
  background: var(--gallery-accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  text-decoration: none;
}

.detail-media-access.is-member {
  grid-template-columns: minmax(0, 1fr);
  background: #e9f7f2;
}

.detail-media-access.is-member strong { color: #0c5e50; }

.zoom-level {
  min-width: 64px;
  color: var(--gallery-muted);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}

.detail-panel {
  min-width: 0;
  min-height: 0;
  padding: 0 20px 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--gallery-line-strong) transparent;
}

.detail-author {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--gallery-line);
}

.detail-author-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.detail-author-copy .author-avatar {
  width: 44px;
  height: 44px;
}

.detail-author-copy > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.detail-author-copy strong,
.detail-author-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-author-copy strong {
  font-size: .92rem;
}

.detail-author-copy span {
  color: var(--gallery-muted);
  font-size: .76rem;
}

.follow-button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--gallery-teal-deep);
  border-radius: var(--gallery-radius-sm);
  background: transparent;
  color: var(--gallery-teal-strong);
  font-size: .8rem;
  font-weight: 800;
}

.follow-button[aria-pressed="true"] {
  border-color: var(--gallery-line);
  color: var(--gallery-muted);
}

.detail-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--gallery-line);
}

.detail-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-section-heading h3 {
  font-size: .92rem;
}

.compact-action {
  min-width: 0;
  padding: 0 8px;
  color: var(--gallery-teal-strong);
  font-size: .76rem;
  font-weight: 800;
}

.detail-prompt {
  margin-top: 14px;
  color: var(--gallery-text-soft);
  font-size: .91rem;
  line-height: 1.78;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.detail-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.negative-prompt {
  margin-top: 16px;
  border-top: 1px solid var(--gallery-line);
}

.negative-prompt summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--gallery-muted);
  font-size: .8rem;
  font-weight: 750;
}

.negative-prompt p {
  padding-bottom: 8px;
  color: var(--gallery-muted);
  font-size: .82rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.parameter-grid {
  margin: 14px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--gallery-line);
  border-radius: var(--gallery-radius-sm);
  background: var(--gallery-line);
  overflow: hidden;
}

.parameter-grid > div {
  min-width: 0;
  padding: 10px;
  display: grid;
  gap: 3px;
  background: var(--gallery-surface);
}

.parameter-grid dt {
  color: var(--gallery-muted);
  font-size: .7rem;
}

.parameter-grid dd {
  margin: 0;
  overflow: hidden;
  color: var(--gallery-text-soft);
  font-size: .8rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-actions {
  padding: 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--gallery-line);
}

.detail-actions button,
.detail-actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--gallery-line);
  border-radius: var(--gallery-radius-sm);
  background: transparent;
  color: var(--gallery-text-soft);
  font-size: .76rem;
  font-weight: 750;
  text-decoration: none;
}

.detail-actions button:hover,
.detail-actions a:hover {
  border-color: var(--gallery-line-strong);
  background: var(--gallery-surface-raised);
  color: var(--gallery-text);
}

.detail-actions button[aria-pressed="true"] {
  border-color: #8a463d;
  background: var(--gallery-coral-soft);
  color: var(--gallery-coral);
}

.detail-actions strong {
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
}

.comment-form {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.comment-form textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid var(--gallery-line);
  border-radius: var(--gallery-radius-sm);
  outline: 0;
  background: var(--gallery-surface);
  color: var(--gallery-text);
  font-size: .86rem;
  line-height: 1.55;
}

.comment-form textarea::placeholder {
  color: #9ab0a8;
  opacity: 1;
}

.comment-form textarea:focus {
  border-color: var(--gallery-teal);
}

.comment-form > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.comment-form span {
  color: var(--gallery-muted);
  font-size: .72rem;
}

.comment-form .button {
  min-height: 44px;
}

.comment-list {
  margin-top: 16px;
  display: grid;
}

.comment-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--gallery-line);
}

.comment-item:first-child {
  border-top: 0;
}

.comment-item .author-avatar {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.comment-copy {
  min-width: 0;
}

.comment-copy header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.comment-copy strong {
  min-width: 0;
  overflow: hidden;
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment-copy time {
  flex: 0 0 auto;
  color: var(--gallery-muted);
  font-size: .68rem;
}

.comment-copy p {
  margin-top: 6px;
  color: var(--gallery-text-soft);
  font-size: .82rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.comment-state {
  padding: 18px 0;
  color: var(--gallery-muted);
  font-size: .8rem;
  text-align: center;
}

.comment-more {
  width: 100%;
  margin-top: 4px;
}

.related-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.related-item {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: var(--gallery-radius-sm);
  background: var(--gallery-surface);
  color: var(--gallery-text-soft);
  overflow: hidden;
  text-align: left;
}

.related-item img,
.related-image-fallback {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  background: var(--gallery-surface-strong);
  object-fit: cover;
}

.related-item span {
  min-height: 44px;
  display: -webkit-box;
  padding: 8px;
  overflow: hidden;
  font-size: .72rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.auth-dialog {
  width: min(420px, calc(100vw - 32px));
  max-width: none;
  margin: auto;
  padding: 28px;
  border: 1px solid var(--gallery-line-strong);
  border-radius: var(--gallery-radius-lg);
  background: var(--gallery-bg-soft);
  text-align: center;
}

.auth-dialog[open] {
  animation: gallery-dialog-in 200ms var(--gallery-ease) both;
}

.auth-close {
  position: absolute;
  top: 10px;
  right: 10px;
}

.auth-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gallery-line-strong);
  border-radius: 50%;
  color: var(--gallery-teal-strong);
}

.auth-mark .icon {
  width: 1.5rem;
  height: 1.5rem;
}

.auth-dialog h2 {
  font-size: 1.25rem;
}

.auth-dialog p {
  margin-top: 8px;
  color: var(--gallery-muted);
  font-size: .9rem;
}

.auth-actions {
  justify-content: center;
}

.profile-dialog,
.report-dialog {
  width: min(500px, calc(100vw - 32px));
  max-width: none;
  margin: auto;
  padding: 28px;
  border: 1px solid var(--gallery-line-strong);
  border-radius: var(--gallery-radius-lg);
  background: var(--gallery-bg-soft);
}

.profile-dialog[open],
.report-dialog[open] {
  animation: gallery-dialog-in 200ms var(--gallery-ease) both;
}

.profile-close,
.report-close {
  position: absolute;
  top: 10px;
  right: 10px;
}

.profile-dialog h2,
.report-dialog h2 {
  padding-right: 44px;
  font-size: 1.25rem;
}

.profile-dialog > p,
.report-dialog > p {
  max-width: 48ch;
  margin-top: 8px;
  color: var(--gallery-muted);
  font-size: .86rem;
}

.profile-dialog form,
.report-dialog form {
  margin-top: 20px;
  display: grid;
  gap: 14px;
}

.profile-dialog label,
.report-dialog label {
  display: grid;
  gap: 6px;
}

.profile-dialog label > span,
.report-dialog label > span {
  color: var(--gallery-text-soft);
  font-size: .8rem;
  font-weight: 800;
}

.profile-dialog input,
.profile-dialog textarea,
.report-dialog select,
.report-dialog textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--gallery-line);
  border-radius: var(--gallery-radius-sm);
  outline: 0;
  background: var(--gallery-surface);
  color: var(--gallery-text);
}

.profile-dialog textarea,
.report-dialog textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.55;
}

.profile-dialog input:focus,
.profile-dialog textarea:focus,
.report-dialog select:focus,
.report-dialog textarea:focus {
  border-color: var(--gallery-teal);
}

.profile-dialog textarea::placeholder,
.report-dialog textarea::placeholder {
  color: #9ab0a8;
  opacity: 1;
}

.profile-form-status,
.report-form-status {
  min-height: 24px;
  color: var(--gallery-danger);
  font-size: .78rem;
}

.profile-actions,
.report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.gallery-toast {
  position: fixed;
  z-index: var(--gallery-z-toast);
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  max-width: min(420px, calc(100vw - 36px));
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid var(--gallery-line-strong);
  border-radius: var(--gallery-radius-sm);
  background: #122a23;
  color: var(--gallery-text);
  font-size: .85rem;
  font-weight: 750;
}

.gallery-toast[data-tone="error"] {
  border-color: #81433d;
  background: #2d1917;
  color: #ffd3cc;
}

.gallery-toast[data-tone="success"] {
  border-color: #316b55;
  color: #d7ffed;
}

.gallery-toast:not([hidden]) {
  animation: gallery-toast-in 180ms var(--gallery-ease) both;
}

.noscript-message {
  position: fixed;
  inset: auto 16px 16px;
  z-index: var(--gallery-z-toast);
  padding: 12px 16px;
  border: 1px solid #81433d;
  border-radius: var(--gallery-radius-sm);
  background: #2d1917;
  color: #ffd3cc;
  text-align: center;
}

@keyframes gallery-shimmer {
  to { transform: translateX(100%); }
}

@keyframes gallery-spin {
  to { transform: rotate(360deg); }
}

@keyframes gallery-dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes gallery-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 1600px) {
  .gallery-grid {
    column-count: 5;
  }
}

@media (max-width: 1320px) {
  .header-inner,
  main,
  .site-footer {
    width: min(var(--gallery-max), calc(100% - 28px));
  }

  .header-inner {
    gap: 14px;
  }

  .primary-nav a {
    padding-inline: 9px;
  }

  .header-search {
    max-width: 380px;
  }

  .gallery-shell {
    grid-template-columns: minmax(0, 1fr) 274px;
    gap: 24px;
  }

  .gallery-grid {
    column-count: 4;
  }
}

@media (max-width: 1120px) {
  :root {
    --gallery-header-height: 126px;
  }

  .site-header {
    position: relative;
  }

  .header-inner {
    padding: 10px 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 10px 14px;
  }

  .primary-nav {
    justify-self: end;
  }

  .header-search {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: none;
  }

  .profile-entry {
    grid-column: 3;
    grid-row: 1;
  }

  .publish-button {
    grid-column: 4;
    grid-row: 1;
  }

  .gallery-hero {
    padding-inline: 20px;
  }

  .gallery-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-rail {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid var(--gallery-line);
  }

  .rail-section {
    padding: 0;
    border: 0;
  }

  .gallery-grid {
    column-count: 2;
  }

  .detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(350px, .8fr);
  }
}

@media (max-width: 820px) {
  :root {
    --gallery-header-height: 170px;
  }

  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .brand-link {
    grid-column: 1;
    grid-row: 1;
  }

  .profile-entry {
    grid-column: 2;
    grid-row: 1;
  }

  .publish-button {
    grid-column: 3;
    grid-row: 1;
  }

  .primary-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .primary-nav::-webkit-scrollbar {
    display: none;
  }

  .header-search {
    grid-row: 3;
  }

  .gallery-hero {
    min-height: 280px;
    padding: 32px;
  }

  .gallery-hero h1 {
    max-width: 18ch;
    font-size: 2.25rem;
  }

  .feed-toolbar {
    display: grid;
    align-items: stretch;
  }

  .feed-title-row {
    align-items: center;
  }

  .filter-jump {
    display: inline-flex;
  }

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

  .select-field {
    flex: 1;
  }

  .select-field select {
    width: 100%;
  }

  .gallery-rail {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .rail-section {
    padding-bottom: 28px;
    border-bottom: 1px solid var(--gallery-line);
  }

  .post-dialog {
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .detail-layout {
    display: block;
    overflow-y: auto;
  }

  .detail-media {
    height: min(72vh, 620px);
    border-right: 0;
    border-bottom: 1px solid var(--gallery-line);
  }

  .detail-panel {
    overflow: visible;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  :root {
    --gallery-header-height: 166px;
  }

  .header-inner,
  main,
  .site-footer {
    width: min(100% - 24px, var(--gallery-max));
  }

  .brand-link small {
    display: none;
  }

  .profile-entry {
    min-width: 44px;
    width: 44px;
    padding: 0;
  }

  .profile-entry span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .publish-button {
    min-width: 44px;
    width: 44px;
    padding: 0;
  }

  .publish-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .primary-nav {
    justify-content: flex-start;
  }

  .primary-nav a {
    flex: 0 0 auto;
  }

  .header-search {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .detail-media-access {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-media-access a {
    grid-column: 1;
    grid-row: auto;
    justify-content: center;
    width: 100%;
    margin-top: 6px;
  }

  .search-submit {
    display: none;
  }

  .gallery-hero {
    min-height: 232px;
    padding: 20px;
  }

  .gallery-hero h1 {
    font-size: 1.9rem;
    letter-spacing: 0;
  }

  .gallery-hero p {
    font-size: .95rem;
  }

  .hero-actions .button {
    width: auto;
    flex: 1 1 132px;
    padding-inline: 10px;
  }

  .category-section {
    padding: 20px 0 16px;
  }

  .category-chips {
    flex-wrap: nowrap;
    margin-right: -12px;
    padding-right: 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .category-chips::-webkit-scrollbar {
    display: none;
  }

  .category-chip,
  .chip-skeleton {
    flex: 0 0 auto;
  }

  .gallery-shell {
    padding-top: 24px;
  }

  .feed-filters {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .select-field select {
    min-width: 0;
    padding-inline: 10px 28px;
  }

  .sort-switcher {
    width: 100%;
  }

  .sort-switcher button {
    min-width: 0;
    flex: 1;
  }

  .gallery-grid {
    column-count: 1;
  }

  .gallery-card,
  .gallery-skeleton {
    margin-bottom: 14px;
  }

  .card-body {
    padding: 15px;
  }

  .detail-header {
    position: sticky;
    z-index: 2;
    top: 0;
  }

  .detail-media {
    height: min(64vh, 520px);
  }

  .detail-stage {
    padding: 12px;
  }

  .detail-panel {
    padding-inline: 16px;
  }

  .detail-author {
    align-items: flex-start;
    padding: 16px 0;
  }

  .parameter-grid {
    grid-template-columns: 1fr;
  }

  .detail-actions button,
  .detail-actions a {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }

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

  .auth-dialog {
    padding: 28px 20px 22px;
  }

  .profile-dialog,
  .report-dialog {
    padding: 26px 18px 20px;
  }

  .profile-actions,
  .report-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .auth-actions .button {
    flex: 1 1 100%;
  }

  .gallery-toast {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    max-width: calc(100vw - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .gallery-card:hover,
  .gallery-card:focus-within,
  .publish-button:hover,
  .button:hover:not(:disabled) {
    transform: none;
  }
}

@media (forced-colors: active) {
  .gallery-card,
  .gallery-hero,
  .feed-state,
  .post-dialog,
  .auth-dialog,
  .category-chip,
  .sort-switcher,
  .select-field select {
    border: 1px solid CanvasText;
  }

  .button-primary,
  .publish-button,
  .search-submit {
    border: 1px solid ButtonText;
  }
}

/* Explore workspace v114: image-first community layout. */
:root {
  --gallery-bg: #050706;
  --gallery-bg-soft: #080b09;
  --gallery-surface: #101311;
  --gallery-surface-raised: #151a17;
  --gallery-surface-strong: #1b221e;
  --gallery-line: #2a332e;
  --gallery-line-strong: #3d4b44;
  --gallery-text: #f5f7f6;
  --gallery-text-soft: #d5dad7;
  --gallery-muted: #a3ada7;
  --gallery-teal: #43d6b5;
  --gallery-teal-strong: #76e5cb;
  --gallery-teal-deep: #147d69;
  --gallery-explore-sidebar: 84px;
  --gallery-explore-topbar: 72px;
}

body[data-gallery-layout="explore-v114"] {
  min-width: 0;
  background: var(--gallery-bg);
}

body[data-gallery-layout="explore-v114"] .site-header {
  position: fixed;
  z-index: var(--gallery-z-header);
  inset: 0 auto 0 0;
  width: var(--gallery-explore-sidebar);
  min-height: 100dvh;
  border: 0;
  border-right: 1px solid #202622;
  background: #070908;
}

body[data-gallery-layout="explore-v114"] .header-inner {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: 14px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

body[data-gallery-layout="explore-v114"] .brand-link {
  width: 58px;
  min-width: 58px;
  height: 58px;
  min-height: 58px;
  justify-content: center;
  border-radius: 8px;
}

body[data-gallery-layout="explore-v114"] .brand-link:hover {
  background: var(--gallery-surface);
}

body[data-gallery-layout="explore-v114"] .brand-link img {
  width: 38px;
  height: 38px;
}

body[data-gallery-layout="explore-v114"] .brand-link span {
  display: none;
}

body[data-gallery-layout="explore-v114"] .primary-nav {
  width: 100%;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

body[data-gallery-layout="explore-v114"] .primary-nav a {
  width: 100%;
  min-height: 58px;
  padding: 7px 2px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border-radius: 8px;
  color: #aab3ae;
  font-size: .69rem;
  font-weight: 700;
  line-height: 1;
}

body[data-gallery-layout="explore-v114"] .primary-nav a .icon {
  width: 1.25rem;
  height: 1.25rem;
}

body[data-gallery-layout="explore-v114"] .primary-nav a:hover,
body[data-gallery-layout="explore-v114"] .primary-nav a[aria-current="page"] {
  background: #121613;
  color: var(--gallery-teal-strong);
}

.gallery-topbar {
  position: sticky;
  z-index: calc(var(--gallery-z-header) - 1);
  top: 0;
  height: var(--gallery-explore-topbar);
  margin-left: var(--gallery-explore-sidebar);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #202622;
  background: #080a09;
}

.topbar-context {
  min-width: 140px;
  display: grid;
  gap: 2px;
}

.topbar-context strong {
  font-size: .98rem;
  line-height: 1.1;
}

.topbar-context span {
  color: var(--gallery-muted);
  font-size: .72rem;
}

.gallery-topbar .header-search {
  width: min(42vw, 620px);
  max-width: 620px;
  height: 44px;
  margin-left: auto;
  border-color: #2b332f;
  border-radius: 8px;
  background: #111512;
}

.gallery-topbar .header-search:focus-within {
  border-color: var(--gallery-teal-deep);
  background: #151a17;
}

.gallery-topbar .profile-entry,
.gallery-topbar .publish-button {
  min-height: 44px;
  height: 44px;
  border-radius: 8px;
}

.gallery-topbar .profile-entry {
  border-color: #2b332f;
  background: #111512;
}

.gallery-topbar .publish-button {
  padding-inline: 15px;
  background: var(--gallery-teal);
}

body[data-gallery-layout="explore-v114"] main {
  width: auto;
  max-width: none;
  margin: 0 0 0 var(--gallery-explore-sidebar);
  padding: 20px 24px 0;
}

body[data-gallery-layout="explore-v114"] .gallery-hero {
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, .72fr);
  gap: 12px;
  border: 0;
  background: transparent;
  overflow: visible;
  isolation: auto;
}

body[data-gallery-layout="explore-v114"] .gallery-hero::after {
  display: none;
}

.hero-feature {
  min-width: 0;
  min-height: 238px;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 8px;
  background: #111512;
}

.hero-feature::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: rgba(0, 0, 0, .46);
  pointer-events: none;
}

body[data-gallery-layout="explore-v114"] .hero-backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 220ms ease, transform 240ms var(--gallery-ease);
}

body[data-gallery-layout="explore-v114"] .gallery-hero.is-image-ready .hero-backdrop {
  opacity: 1;
  transform: scale(1);
}

body[data-gallery-layout="explore-v114"] .hero-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding: 28px;
}

body[data-gallery-layout="explore-v114"] .hero-label {
  min-height: 26px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(5, 7, 6, .78);
  color: var(--gallery-teal-strong);
  font-size: .72rem;
}

body[data-gallery-layout="explore-v114"] .gallery-hero h1 {
  max-width: 16ch;
  margin-top: 12px;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: 0;
}

body[data-gallery-layout="explore-v114"] .hero-actions {
  margin-top: 18px;
  gap: 8px;
}

body[data-gallery-layout="explore-v114"] .hero-actions .button {
  min-height: 40px;
  padding-inline: 14px;
  font-size: .82rem;
}

.hero-shortcuts {
  min-width: 0;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-shortcut {
  min-width: 0;
  min-height: 70px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 14px 15px;
  overflow: hidden;
  border-radius: 8px;
  background: #121613;
  color: var(--gallery-text);
  text-decoration: none;
  transition: background 180ms ease, transform 180ms var(--gallery-ease);
}

.hero-shortcut:hover {
  background: #19201c;
  transform: translateY(-1px);
}

.hero-shortcut.has-image::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: rgba(0, 0, 0, .58);
  pointer-events: none;
}

.hero-shortcut > img {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shortcut > span,
.hero-shortcut > .icon {
  position: relative;
  z-index: 2;
}

.hero-shortcut > span:not(.shortcut-icon) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.hero-shortcut small {
  color: #c1cac5;
  font-size: .69rem;
}

.hero-shortcut strong {
  font-size: .94rem;
}

.hero-shortcut > .icon {
  align-self: center;
  color: var(--gallery-teal-strong);
}

.hero-shortcut.is-utility {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
}

.shortcut-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #26322c;
  color: var(--gallery-teal-strong);
}

body[data-gallery-layout="explore-v114"] .category-section {
  padding: 22px 0 14px;
  border-bottom-color: #202622;
}

body[data-gallery-layout="explore-v114"] .section-heading.compact {
  display: flex;
  align-items: end;
}

body[data-gallery-layout="explore-v114"] .section-heading.compact > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

body[data-gallery-layout="explore-v114"] .section-heading.compact h2 {
  font-size: 1.05rem;
}

body[data-gallery-layout="explore-v114"] .section-heading.compact p {
  margin: 0;
  color: var(--gallery-muted);
  font-size: .76rem;
}

body[data-gallery-layout="explore-v114"] .category-chips {
  margin-top: 12px;
  gap: 6px;
}

body[data-gallery-layout="explore-v114"] .category-chip {
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: #111512;
  color: #c5cdc9;
  font-size: .78rem;
}

body[data-gallery-layout="explore-v114"] .category-chip:hover {
  background: #19201c;
}

body[data-gallery-layout="explore-v114"] .category-chip[aria-pressed="true"] {
  background: #20372f;
  color: var(--gallery-teal-strong);
}

body[data-gallery-layout="explore-v114"] .gallery-shell {
  padding-top: 0;
  display: block;
}

body[data-gallery-layout="explore-v114"] .feed-section {
  min-width: 0;
}

body[data-gallery-layout="explore-v114"] .feed-toolbar {
  position: sticky;
  z-index: 20;
  top: var(--gallery-explore-topbar);
  min-height: 68px;
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #202622;
  background: #050706;
}

body[data-gallery-layout="explore-v114"] .feed-title-row {
  flex: 1 1 auto;
  min-width: 180px;
}

body[data-gallery-layout="explore-v114"] .feed-toolbar h2 {
  font-size: 1rem;
}

body[data-gallery-layout="explore-v114"] .feed-toolbar p {
  margin-top: 3px;
  font-size: .73rem;
}

body[data-gallery-layout="explore-v114"] .feed-filters {
  margin-left: auto;
  gap: 8px;
}

body[data-gallery-layout="explore-v114"] .select-field select,
body[data-gallery-layout="explore-v114"] .sort-switcher {
  min-height: 40px;
  border-color: #29312d;
  border-radius: 8px;
  background-color: #111512;
}

body[data-gallery-layout="explore-v114"] .sort-switcher button {
  min-height: 38px;
  padding-inline: 12px;
  border-radius: 6px;
  font-size: .75rem;
}

body[data-gallery-layout="explore-v114"] .sort-switcher button[aria-pressed="true"] {
  background: #22342d;
  color: var(--gallery-teal-strong);
}

body[data-gallery-layout="explore-v114"] .active-filters {
  padding-top: 10px;
}

body[data-gallery-layout="explore-v114"] .gallery-grid {
  padding-top: 14px;
  column-count: 5;
  column-gap: 10px;
}

body[data-gallery-layout="explore-v114"] .gallery-card,
body[data-gallery-layout="explore-v114"] .gallery-skeleton {
  margin: 0 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-gallery-layout="explore-v114"] .gallery-card {
  position: relative;
  overflow: visible;
  transform: none;
}

body[data-gallery-layout="explore-v114"] .gallery-card:hover,
body[data-gallery-layout="explore-v114"] .gallery-card:focus-within {
  border-color: transparent;
  transform: none;
}

body[data-gallery-layout="explore-v114"] .card-media {
  overflow: hidden;
  border-radius: 8px;
  background: #111512;
}

body[data-gallery-layout="explore-v114"] .card-media::before {
  background: #111512;
}

body[data-gallery-layout="explore-v114"] .card-media img {
  transform: scale(1.002);
  transition: transform 220ms var(--gallery-ease), filter 180ms ease;
}

body[data-gallery-layout="explore-v114"] .gallery-card:hover .card-media img {
  transform: scale(1.018);
  filter: brightness(.9);
}

body[data-gallery-layout="explore-v114"] .media-badges {
  top: 8px;
  left: 8px;
  gap: 4px;
}

body[data-gallery-layout="explore-v114"] .model-badge,
body[data-gallery-layout="explore-v114"] .ratio-badge {
  min-height: 24px;
  padding-inline: 7px;
  border: 0;
  border-radius: 6px;
  background: rgba(5, 7, 6, .78);
  color: #e8eeeb;
  font-size: .66rem;
}

body[data-gallery-layout="explore-v114"] .card-body {
  padding: 9px 2px 4px;
}

body[data-gallery-layout="explore-v114"] .card-author-row {
  min-height: 30px;
}

body[data-gallery-layout="explore-v114"] .author-identity {
  gap: 7px;
  color: #cbd2ce;
  font-size: .74rem;
}

body[data-gallery-layout="explore-v114"] .author-avatar {
  width: 25px;
  height: 25px;
  background: #26322c;
  color: var(--gallery-teal-strong);
  font-size: .65rem;
}

body[data-gallery-layout="explore-v114"] .card-time {
  font-size: .66rem;
}

body[data-gallery-layout="explore-v114"] .card-title-button {
  margin-top: 7px;
  font-size: .86rem;
  line-height: 1.4;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body[data-gallery-layout="explore-v114"] .card-prompt-wrap {
  margin-top: 6px;
}

body[data-gallery-layout="explore-v114"] .card-prompt {
  color: #aeb8b2;
  font-size: .73rem;
  line-height: 1.55;
  -webkit-line-clamp: 2;
}

body[data-gallery-layout="explore-v114"] .prompt-toggle {
  margin-top: 4px;
  min-height: 28px;
  color: var(--gallery-teal-strong);
  font-size: .7rem;
}

body[data-gallery-layout="explore-v114"] .card-meta-row {
  margin-top: 7px;
  gap: 4px;
}

body[data-gallery-layout="explore-v114"] .meta-chip {
  min-height: 24px;
  padding-inline: 7px;
  border-radius: 6px;
  background: #111512;
  font-size: .65rem;
}

body[data-gallery-layout="explore-v114"] .card-stats {
  margin-top: 8px;
  gap: 10px;
  color: #909b95;
  font-size: .68rem;
}

body[data-gallery-layout="explore-v114"] .card-stats span:nth-child(2),
body[data-gallery-layout="explore-v114"] .card-stats span:nth-child(4) {
  display: none;
}

body[data-gallery-layout="explore-v114"] .card-actions {
  position: absolute;
  z-index: 4;
  top: 8px;
  right: 8px;
  width: auto;
  margin: 0;
  padding: 4px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px;
  border-radius: 8px;
  background: rgba(5, 7, 6, .82);
  opacity: 0;
  transition: opacity 160ms ease;
}

body[data-gallery-layout="explore-v114"] .gallery-card:hover .card-actions,
body[data-gallery-layout="explore-v114"] .gallery-card:focus-within .card-actions {
  opacity: 1;
}

body[data-gallery-layout="explore-v114"] .card-actions button,
body[data-gallery-layout="explore-v114"] .card-actions a {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 6px;
  background: transparent;
}

body[data-gallery-layout="explore-v114"] .card-actions button:hover,
body[data-gallery-layout="explore-v114"] .card-actions a:hover {
  background: #26312b;
}

body[data-gallery-layout="explore-v114"] .card-actions .card-open-action {
  display: none;
}

body[data-gallery-layout="explore-v114"] .gallery-rail {
  margin-top: 42px;
  padding-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border-top: 1px solid #202622;
}

body[data-gallery-layout="explore-v114"] .rail-section {
  min-width: 0;
  padding: 17px;
  border: 0;
  border-radius: 8px;
  background: #0e120f;
}

body[data-gallery-layout="explore-v114"] .site-footer {
  width: auto;
  max-width: none;
  margin: 48px 0 0 var(--gallery-explore-sidebar);
  padding: 24px;
  border-top-color: #202622;
}

@media (min-width: 1600px) {
  body[data-gallery-layout="explore-v114"] .gallery-grid {
    column-count: 6;
  }
}

@media (max-width: 1199px) {
  body[data-gallery-layout="explore-v114"] .gallery-grid {
    column-count: 4;
  }

  body[data-gallery-layout="explore-v114"] .gallery-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  body[data-gallery-layout="explore-v114"] .gallery-hero {
    grid-template-columns: minmax(0, 1.55fr) minmax(250px, .8fr);
  }

  body[data-gallery-layout="explore-v114"] .gallery-grid {
    column-count: 3;
  }

  .topbar-context {
    display: none;
  }

  .gallery-topbar .header-search {
    width: auto;
    flex: 1 1 auto;
  }
}

@media (max-width: 820px) {
  :root {
    --gallery-explore-sidebar: 0px;
    --gallery-explore-topbar: 64px;
  }

  body[data-gallery-layout="explore-v114"] {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  body[data-gallery-layout="explore-v114"] .site-header {
    inset: auto 0 0 0;
    width: 100%;
    min-height: calc(64px + env(safe-area-inset-bottom));
    border-right: 0;
    border-top: 1px solid #242b27;
  }

  body[data-gallery-layout="explore-v114"] .header-inner {
    width: 100%;
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 4px 8px env(safe-area-inset-bottom);
    display: flex;
    flex-direction: row;
  }

  body[data-gallery-layout="explore-v114"] .brand-link {
    display: none;
  }

  body[data-gallery-layout="explore-v114"] .primary-nav {
    height: 60px;
    margin: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
  }

  body[data-gallery-layout="explore-v114"] .primary-nav a {
    min-width: 0;
    min-height: 56px;
    flex: 1 1 25%;
    padding: 5px 2px;
    gap: 4px;
    font-size: .64rem;
  }

  .gallery-topbar {
    height: 64px;
    margin-left: 0;
    padding: 0 12px;
    gap: 8px;
  }

  .gallery-topbar .profile-entry {
    display: none !important;
  }

  .gallery-topbar .publish-button {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }

  .gallery-topbar .publish-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  body[data-gallery-layout="explore-v114"] main {
    margin-left: 0;
    padding: 12px 12px 0;
  }

  body[data-gallery-layout="explore-v114"] .gallery-hero {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hero-feature {
    min-height: 184px;
  }

  body[data-gallery-layout="explore-v114"] .hero-copy {
    padding: 20px;
  }

  body[data-gallery-layout="explore-v114"] .gallery-hero h1 {
    font-size: 1.55rem;
  }

  .hero-shortcuts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 1fr;
    gap: 6px;
  }

  .hero-shortcut,
  .hero-shortcut.is-utility {
    min-height: 82px;
    padding: 10px;
    grid-template-columns: minmax(0, 1fr);
    align-items: end;
  }

  .hero-shortcut > .icon,
  .hero-shortcut .shortcut-icon,
  .hero-shortcut small {
    display: none;
  }

  .hero-shortcut strong {
    font-size: .78rem;
  }

  body[data-gallery-layout="explore-v114"] .category-section {
    padding-top: 16px;
  }

  body[data-gallery-layout="explore-v114"] .category-chips {
    flex-wrap: nowrap;
    margin-right: -12px;
    padding-right: 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body[data-gallery-layout="explore-v114"] .category-chips::-webkit-scrollbar {
    display: none;
  }

  body[data-gallery-layout="explore-v114"] .category-chip {
    flex: 0 0 auto;
    min-height: 44px;
  }

  body[data-gallery-layout="explore-v114"] .feed-toolbar {
    top: 64px;
    min-height: 0;
    padding: 10px 0;
    display: grid;
    gap: 8px;
  }

  body[data-gallery-layout="explore-v114"] .feed-title-row {
    min-width: 0;
  }

  body[data-gallery-layout="explore-v114"] .feed-filters {
    width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
  }

  body[data-gallery-layout="explore-v114"] .sort-switcher button {
    min-height: 44px;
  }

  body[data-gallery-layout="explore-v114"] .prompt-toggle {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  body[data-gallery-layout="explore-v114"] .gallery-grid {
    column-count: 2;
    column-gap: 8px;
  }

  body[data-gallery-layout="explore-v114"] .gallery-rail {
    grid-template-columns: 1fr;
  }

  body[data-gallery-layout="explore-v114"] .site-footer {
    margin-left: 0;
    padding: 22px 12px;
  }
}

@media (max-width: 640px) {
  .gallery-topbar .header-search {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .gallery-topbar .search-submit {
    display: none;
  }

  body[data-gallery-layout="explore-v114"] .hero-actions .button {
    flex: 0 1 auto;
    width: auto;
  }

  body[data-gallery-layout="explore-v114"] .section-heading.compact > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  body[data-gallery-layout="explore-v114"] .gallery-grid {
    column-count: 1;
  }

  body[data-gallery-layout="explore-v114"] .gallery-card,
  body[data-gallery-layout="explore-v114"] .gallery-skeleton {
    margin-bottom: 16px;
  }

  body[data-gallery-layout="explore-v114"] .card-body {
    padding: 10px 2px 5px;
  }

  body[data-gallery-layout="explore-v114"] .card-actions {
    position: static;
    margin-top: 9px;
    padding: 0;
    justify-content: flex-start;
    background: transparent;
    opacity: 1;
  }

  body[data-gallery-layout="explore-v114"] .card-actions button,
  body[data-gallery-layout="explore-v114"] .card-actions a {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    background: #111512;
  }

  body[data-gallery-layout="explore-v114"] .card-actions .card-open-action {
    display: inline-flex;
    width: auto;
    min-width: 86px;
    padding-inline: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-shortcut,
  body[data-gallery-layout="explore-v114"] .card-media img {
    transform: none !important;
  }
}
