:root {
  --porn: #ff69b4;
  --porn-light: #ffb6d9;
  --porn-glow: rgba(255, 105, 180, 0.35);
  --porn-soft: #fff0f7;
  --bg-top: #1a1020;
  --bg-mid: #2d1b3d;
  --bg-bottom: #1a1020;
  --surface: rgba(255, 255, 255, 0.97);
  --surface-border: rgba(255, 105, 180, 0.25);
  --text: #1e1228;
  --text-muted: #6b5a75;
  --navbar-bg: rgba(26, 16, 32, 0.92);
  --nav-link: rgba(255, 255, 255, 0.75);
  --nav-input-bg: rgba(255, 255, 255, 0.1);
  --nav-input-border: rgba(255, 105, 180, 0.4);
  --glow-1: rgba(255, 105, 180, 0.15);
  --glow-2: rgba(255, 182, 217, 0.1);
  --btn-hover: #e0559f;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  --shadow-pink: 0 8px 32px var(--porn-glow);
}

body {
  background: linear-gradient(160deg, var(--bg-top) 0%, var(--bg-mid) 45%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, var(--glow-1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, var(--glow-2) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

/* navbar */
.navbar {
  background: var(--navbar-bg) !important;
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--porn);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--porn) !important;
  letter-spacing: -0.02em;
  text-shadow: 0 0 20px var(--porn-glow);
}

.navbar-brand:hover {
  color: var(--porn-light) !important;
}

.nav-link {
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--nav-link) !important;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--porn) !important;
}

.navbar-toggler {
  border-color: var(--porn);
}

[data-theme-mode="dark"] .navbar-toggler-icon {
  filter: invert(1) sepia(1) saturate(5) hue-rotate(280deg);
}

[data-theme-mode="light"] .navbar-toggler-icon {
  filter: sepia(1) saturate(5) hue-rotate(280deg);
}

.navbar .form-control {
  background: var(--nav-input-bg);
  border: 1px solid var(--nav-input-border);
  color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
}

.navbar .form-control::placeholder {
  color: var(--text-muted);
}

.navbar .form-control:focus {
  background: var(--nav-input-bg);
  border-color: var(--porn);
  box-shadow: 0 0 0 3px var(--porn-glow);
  color: var(--text);
}

.btn-primary {
  background: var(--porn);
  border-color: var(--porn);
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 600;
  box-shadow: 0 2px 12px var(--porn-glow);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--btn-hover);
  border-color: var(--btn-hover);
  box-shadow: 0 4px 20px var(--porn-glow);
}

/* search highlight */
.hl { display: inline-block; }
.hl mark {
  background: var(--porn);
  color: #fff;
  clip-path: inset(0 100% 0 0);
  animation: sweep 0.3s ease forwards;
}
.hl.removing mark {
  clip-path: inset(0 0% 0 0);
  animation: unsweep 0.3s ease forwards;
}
@keyframes sweep {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0% 0 0); }
}
@keyframes unsweep {
  from { clip-path: inset(0 0% 0 0); }
  to { clip-path: inset(0 100% 0 0); }
}

/* content panels */
.content-panel {
  background: var(--surface);
  border: 2px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow), var(--shadow-pink);
}

.home-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.welcome-panel .form-label {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 600;
  color: var(--text);
}

.welcome-panel .form-control {
  border: 2px solid var(--surface-border);
  border-radius: 8px;
  font-family: system-ui, -apple-system, sans-serif;
}

.welcome-panel .form-control:focus {
  border-color: var(--porn);
  box-shadow: 0 0 0 3px var(--porn-glow);
}

#home-status {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
}

.welcome-panel h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--porn);
  margin-bottom: 1rem;
  text-shadow: 0 0 30px var(--porn-glow);
}

.welcome-panel p {
  font-size: 1.1rem;
  line-height: 1.75;
  margin: 0;
}

.welcome-panel a {
  color: var(--porn);
  font-weight: 600;
}

.welcome-panel a:hover {
  color: var(--btn-hover);
}

/* alert */
.alert-info {
  background: linear-gradient(135deg, var(--porn-soft) 0%, #ffe0f0 100%);
  border: 2px solid var(--porn);
  border-radius: var(--radius);
  color: var(--text);
  box-shadow: var(--shadow-pink);
  padding: 1.5rem 2rem;
}

.alert-info .alert-heading {
  color: var(--porn);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.alert-warning {
  border-radius: var(--radius);
  border: 2px solid #ffc107;
}

/* gallery */
.gallery-toolbar {
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.5rem;
}

.gallery-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.post-count {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 700;
  color: var(--porn);
  margin: 0;
  font-size: 1.1rem;
}

.sort-select {
  width: auto;
  min-width: 7rem;
  border: 2px solid var(--surface-border);
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 600;
}

.sort-select:focus {
  border-color: var(--porn);
  box-shadow: 0 0 0 3px var(--porn-glow);
}

.gallery-search-row {
  margin-bottom: 0.75rem;
}

.gallery-search-row .form-control {
  font-family: system-ui, -apple-system, sans-serif;
  border: 2px solid var(--surface-border);
  border-radius: 8px;
}

.gallery-search-row .form-control:focus {
  border-color: var(--porn);
  box-shadow: 0 0 0 3px var(--porn-glow);
}

.tag-search-wrap {
  position: relative;
}

.modal-description {
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.tag-search-wrap .form-control {
  font-family: system-ui, -apple-system, sans-serif;
  border: 2px solid var(--surface-border);
  border-radius: 8px;
}

.tag-search-wrap .form-control:focus {
  border-color: var(--porn);
  box-shadow: 0 0 0 3px var(--porn-glow);
}

.tag-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--surface);
  border: 2px solid var(--surface-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--shadow-pink);
  max-height: 12rem;
  overflow-y: auto;
}

.tag-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: none;
  border-bottom: 1px solid var(--surface-border);
  background: transparent;
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.tag-suggestion:last-child {
  border-bottom: none;
}

.tag-suggestion:hover {
  background: var(--porn-soft);
  color: var(--porn);
}

.tag-suggestion-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.tag-suggestion-empty {
  padding: 0.75rem 0.85rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.tag-btn {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border: 2px solid var(--surface-border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.tag-btn:hover {
  border-color: var(--porn);
  color: var(--porn);
}

.tag-btn.active {
  background: var(--porn);
  border-color: var(--porn);
  color: #fff;
}

.tag-btn-sm {
  font-size: 0.8rem;
  padding: 0.2rem 0.65rem;
}

.tag-pill {
  display: inline-block;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--porn-soft);
  color: var(--porn);
  margin-right: 0.25rem;
  margin-top: 0.25rem;
}

.card-tags {
  margin-top: 0.25rem;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.gallery-card {
  background: var(--surface);
  border: 2px solid var(--surface-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: var(--shadow);
}

.gallery-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--porn);
  box-shadow: var(--shadow), var(--shadow-pink);
}

.gallery-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.gallery-card .card-body {
  background: var(--porn-soft);
  border-top: 1px solid var(--surface-border);
}

.gallery-card .card-body small {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 600;
  color: var(--text);
}

.container .text-muted {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1.1rem;
  padding: 2rem;
  text-align: center;
  background: var(--surface);
  border: 2px dashed var(--surface-border);
  border-radius: var(--radius);
}

/* modal */
.modal-content {
  border: 2px solid var(--porn);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-pink);
}

.modal-footer {
  background: var(--porn-soft);
  border-top: 1px solid var(--surface-border);
  font-family: system-ui, -apple-system, sans-serif;
}

#modal-title {
  font-weight: 700;
  color: var(--text);
}

/* upload */
.upload-panel h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--porn);
  margin-bottom: 1.5rem;
  text-shadow: 0 0 20px var(--porn-glow);
}

.upload-panel .form-label {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 600;
  color: var(--text);
}

.upload-panel .form-control {
  border: 2px solid var(--surface-border);
  border-radius: 8px;
  font-family: system-ui, -apple-system, sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.upload-panel .form-control:focus {
  border-color: var(--porn);
  box-shadow: 0 0 0 3px var(--porn-glow);
}

#status {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
}

#status a {
  color: var(--porn);
  font-weight: 700;
}

.upload-panel .input-group-text {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 700;
  color: var(--porn);
  background: var(--porn-soft);
  border: 2px solid var(--surface-border);
  border-right: none;
}

.upload-panel .input-group .form-control {
  border-left: none;
}

.upload-panel .input-group:focus-within .input-group-text,
.upload-panel .input-group:focus-within .form-control {
  border-color: var(--porn);
}

.upload-panel .input-group:focus-within .form-control {
  box-shadow: 0 0 0 3px var(--porn-glow);
}

/* settings / themes */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.theme-card {
  font-family: system-ui, -apple-system, sans-serif;
  border: 2px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 0.75rem;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  text-align: left;
}

.theme-card:hover {
  border-color: var(--porn);
  transform: translateY(-2px);
}

.theme-card.active {
  border-color: var(--porn);
  box-shadow: var(--shadow-pink);
}

.theme-swatches {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.theme-swatch {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
}

.theme-card-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.theme-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.theme-creator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 576px) {
  .theme-creator {
    grid-template-columns: 1fr;
  }
}

.color-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.color-field input[type="color"] {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 2px solid var(--surface-border);
  border-radius: 8px;
  cursor: pointer;
  background: none;
}

.share-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.share-row .form-control {
  flex: 1;
  min-width: 12rem;
}

.settings-section {
  margin-bottom: 1.5rem;
}

.settings-section h4 {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 700;
  color: var(--porn);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.friend-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.friend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--surface-border);
  font-family: system-ui, -apple-system, sans-serif;
}

.friend-item:last-child {
  border-bottom: none;
}

.friend-item-name {
  font-weight: 600;
  color: var(--text);
}

.friend-item-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.friend-empty {
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* people search */
.people-search-wrap {
  position: relative;
}

.people-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--surface);
  border: 2px solid var(--surface-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--shadow-pink);
  max-height: 18rem;
  overflow-y: auto;
}

.people-suggestion {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: none;
  border-bottom: 1px solid var(--surface-border);
  background: transparent;
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.people-suggestion:last-child { border-bottom: none; }
.people-suggestion:hover { background: var(--porn-soft); color: var(--porn); }

.people-suggestion-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface-border);
  flex-shrink: 0;
  background: var(--porn-soft);
}

.people-suggestion-avatar-placeholder {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid var(--surface-border);
  flex-shrink: 0;
  background: var(--porn-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--porn);
  font-weight: 700;
  font-family: system-ui, -apple-system, sans-serif;
}

.people-suggestion-info { display: flex; flex-direction: column; min-width: 0; }
.people-suggestion-name { font-weight: 700; font-size: 0.9rem; }
.people-suggestion-handle { font-size: 0.8rem; color: var(--text-muted); }

.people-search-empty {
  padding: 0.75rem 0.85rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* profile page */
.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.profile-avatar-wrap { flex-shrink: 0; }

.profile-avatar {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--porn);
  box-shadow: 0 0 20px var(--porn-glow);
}

.profile-avatar-placeholder {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  border: 3px solid var(--porn);
  box-shadow: 0 0 20px var(--porn-glow);
  background: var(--porn-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--porn);
  font-weight: 700;
  font-family: system-ui, -apple-system, sans-serif;
}

.profile-info { flex: 1; min-width: 0; }

.profile-display-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--porn);
  margin: 0 0 0.15rem;
  text-shadow: 0 0 20px var(--porn-glow);
  line-height: 1.2;
}

.profile-username {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.profile-bio {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 0.5rem;
  white-space: pre-wrap;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.profile-link {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--porn);
  text-decoration: none;
  border: 1.5px solid var(--porn);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  transition: background 0.18s, color 0.18s;
}

.profile-link:hover { background: var(--porn); color: #fff; }

.profile-post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

/* edit profile */
.profile-avatar-preview-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.profile-avatar-preview {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface-border);
  display: none;
}

.profile-avatar-preview.active { display: block; }

.profile-avatar-initials {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  border: 2px solid var(--surface-border);
  background: var(--porn-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--porn);
  font-weight: 700;
  font-family: system-ui, -apple-system, sans-serif;
}

.links-list { list-style: none; padding: 0; margin: 0 0 0.5rem; }

.link-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--surface-border);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
}

.link-item:last-child { border-bottom: none; }
.link-item-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-item-label { color: var(--text-muted); font-size: 0.8rem; margin-left: 0.25rem; }

/* people page */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.person-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  background: var(--surface);
  border: 2px solid var(--surface-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  box-shadow: var(--shadow);
  text-align: center;
}

.person-card:hover {
  border-color: var(--porn);
  transform: translateY(-4px);
  box-shadow: var(--shadow), var(--shadow-pink);
  color: var(--text);
}

.person-card-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--porn);
}

.person-card-placeholder {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: 2px solid var(--porn);
  background: var(--porn-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--porn);
  font-weight: 700;
  font-family: system-ui, -apple-system, sans-serif;
}

.person-card-name {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--porn);
}

.person-card-handle {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.person-card-bio {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── upload toggles ──────────────────────────────────────────────────────── */
.upload-toggles {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.upload-toggle-item {
  cursor: pointer;
  display: block;
  margin: 0;
}
.upload-toggle-input { display: none; }
.upload-toggle-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.9rem;
  border: 2px solid var(--surface-border);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 0.18s, background 0.18s;
  user-select: none;
}
.upload-toggle-item:hover .upload-toggle-box {
  border-color: var(--porn);
  background: var(--porn-soft);
}
.upload-toggle-input:checked + .upload-toggle-box {
  border-color: var(--porn);
  background: var(--porn-soft);
  box-shadow: 0 0 0 3px var(--porn-glow);
}
.upload-toggle-icon { font-size: 1.15rem; flex-shrink: 0; }
.upload-toggle-label {
  font-family: system-ui,-apple-system,sans-serif;
  font-weight: 700; font-size: 0.9rem; color: var(--text);
}
.upload-toggle-desc {
  font-family: system-ui,-apple-system,sans-serif;
  font-size: 0.78rem; color: var(--text-muted); margin-left: auto;
}

/* ── nsfw pill / badge ───────────────────────────────────────────────────── */
.gallery-img-wrap { position: relative; }
.nsfw-pill {
  position: absolute; top: 0.4rem; left: 0.4rem;
  background: #c0392b; color: #fff;
  font-family: system-ui,-apple-system,sans-serif;
  font-size: 0.65rem; font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
  pointer-events: none;
}
.nsfw-badge {
  position: absolute; top: 0.6rem; left: 0.6rem;
  background: #c0392b; color: #fff;
  font-family: system-ui,-apple-system,sans-serif;
  font-size: 0.75rem; font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 5px;
  letter-spacing: 0.05em;
  pointer-events: none;
}

/* ── post id badge (modal) ───────────────────────────────────────────────── */
.post-id-badge {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--porn-soft);
  border: 1px solid var(--surface-border);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  letter-spacing: 0.04em;
}

/* ── active filter pills ─────────────────────────────────────────────────── */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--surface-border);
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: system-ui,-apple-system,sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--porn-soft);
  border: 1.5px solid var(--porn);
  color: var(--porn);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
}
.filter-pill-x {
  background: none; border: none; padding: 0;
  color: var(--porn); cursor: pointer;
  font-size: 0.72rem; line-height: 1;
  margin-left: 0.1rem;
}
.filter-pill-x:hover { color: #c0392b; }

/* ── gallery card author strip ───────────────────────────────────────────── */
.gallery-card-author {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border-top: 1px solid var(--surface-border);
  background: var(--porn-soft);
  font-family: system-ui,-apple-system,sans-serif;
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-muted);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.gallery-card-author-avatar {
  width: 1.3rem; height: 1.3rem;
  border-radius: 50%; object-fit: cover;
  border: 1.5px solid var(--porn); flex-shrink: 0;
}
.gallery-card-author-placeholder {
  width: 1.3rem; height: 1.3rem; border-radius: 50%;
  border: 1.5px solid var(--porn); background: var(--porn-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; color: var(--porn); font-weight: 700; flex-shrink: 0;
}

/* ── modal author ────────────────────────────────────────────────────────── */
.modal-author-row {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.1rem;
}
.modal-author-avatar {
  width: 1.8rem; height: 1.8rem;
  border-radius: 50%; object-fit: cover; border: 2px solid var(--porn);
}
.modal-author-avatar-placeholder {
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  border: 2px solid var(--porn); background: var(--porn-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: var(--porn); font-weight: 700;
}
.modal-author-name {
  font-family: system-ui,-apple-system,sans-serif;
  font-weight: 700; font-size: 0.9rem;
  color: var(--porn); text-decoration: none;
}
.modal-author-name:hover { color: var(--btn-hover); }

/* ── comments ────────────────────────────────────────────────────────────── */
.comments-section {
  border-top: 1px solid var(--surface-border);
  padding-top: 0.65rem; margin-top: 0.4rem;
  font-family: system-ui,-apple-system,sans-serif;
}
.comments-heading {
  font-weight: 700; font-size: 0.82rem;
  color: var(--text-muted); margin-bottom: 0.5rem; text-transform: uppercase;
  letter-spacing: 0.04em;
}
.comment-list {
  display: flex; flex-direction: column; gap: 0.45rem;
  max-height: 13rem; overflow-y: auto; margin-bottom: 0.5rem;
}
.comment-item { display: flex; gap: 0.45rem; align-items: flex-start; }
.comment-avatar {
  width: 1.55rem; height: 1.55rem; border-radius: 50%;
  object-fit: cover; border: 1.5px solid var(--porn); flex-shrink: 0;
}
.comment-avatar-placeholder {
  width: 1.55rem; height: 1.55rem; border-radius: 50%;
  border: 1.5px solid var(--porn); background: var(--porn-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.58rem; color: var(--porn); font-weight: 700; flex-shrink: 0;
}
.comment-body {
  background: var(--porn-soft); border: 1px solid var(--surface-border);
  border-radius: 0 9px 9px 9px; padding: 0.3rem 0.6rem;
  font-size: 0.83rem; line-height: 1.4; flex: 1; min-width: 0;
}
.comment-author { font-weight: 700; font-size: 0.76rem; color: var(--porn); margin-bottom: 0.05rem; }
.comment-text { color: var(--text); word-break: break-word; }
.comment-time { font-size: 0.68rem; color: var(--text-muted); margin-top: 0.1rem; }
.comment-empty { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }
.comment-input-row { display: flex; gap: 0.4rem; align-items: flex-end; }
.comment-input-row textarea {
  flex: 1; border: 2px solid var(--surface-border); border-radius: 8px;
  font-family: system-ui,-apple-system,sans-serif; font-size: 0.83rem;
  padding: 0.4rem 0.55rem; resize: none; min-height: 2.3rem; max-height: 5rem;
  overflow-y: auto; transition: border-color 0.2s;
}
.comment-input-row textarea:focus {
  border-color: var(--porn); box-shadow: 0 0 0 3px var(--porn-glow); outline: none;
}
.comment-login-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.25rem; }
