* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scrollbar-gutter: stable;
}
body {
  background: #0a0c0d;
  color: #f0f0f0;
  font-family: 'Lato', Arial, sans-serif;
  min-height: 100vh;
}
a { color: inherit; }

.fp-content-z { position: relative; z-index: 1; }

.fp-search-sub { color: #ccc; font-size: 0.95rem; margin: 1.75rem 0 0.85rem; }
.fp-search-page-label { color: #f0c060; font-weight: 700; margin-left: 0.5rem; }
.fp-search-sub strong { color: #fff; }

.fp-layout {
  padding: 0 2.5rem 5rem;
  display: grid; grid-template-columns: 250px 1fr 250px; column-gap: 2rem; align-items: stretch;
}
.fp-results-col { grid-column: 2; min-width: 0; contain: layout; }

@media (min-width: 981px) {
  .fp-layout--filters-collapsed { grid-template-columns: 250px 1fr 0px; }
  .fp-layout--sidebar-collapsed { grid-template-columns: 0px 1fr 250px; }
  .fp-layout--sidebar-collapsed.fp-layout--filters-collapsed { grid-template-columns: 0px 1fr 0px; }
  .fp-layout--sidebar-collapsed.fp-layout--submissions { grid-template-columns: 0px 1fr 250px; }
  .fp-layout--sidebar-collapsed.fp-layout--profiles { grid-template-columns: 0px 1fr; }
  .fp-layout--submissions { grid-template-columns: 250px 1fr 250px; }
  .fp-layout--submissions.fp-layout--filters-collapsed { grid-template-columns: 250px 1fr 0px; }
  .fp-layout--sidebar-collapsed.fp-layout--filters-collapsed.fp-layout--submissions { grid-template-columns: 0px 1fr 0px; }
}
.fp-layout--sidebar-collapsed .fp-side-panel { display: none; }
.fp-layout--submissions .fp-filter-panel { display: none; }
.fp-posts-panel { display: none; }
.fp-layout--submissions .fp-posts-panel { display: flex; }

.fp-layout--no-side { grid-template-columns: 1fr; }
.fp-layout--no-side .fp-side-panel,
.fp-layout--no-side .fp-filter-panel,
.fp-layout--no-side .fp-filter-fab { display: none; }
.fp-layout--no-side .fp-results-col { grid-column: 1; }
.fp-layout--no-side .fp-posts-panel { display: none; }
.fp-browse-heading-row:not([hidden]) { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.75rem 0 0.2rem; }
.fp-browse-heading {
  font-family: 'Lato', Arial, sans-serif; font-size: 1.7rem; font-weight: 700; color: #cfe0f5;
  margin: 0; display: flex; align-items: center; gap: 0.5rem;
  text-shadow: 0 2px 6px rgba(0,0,0,0.55);
}
.rs-tile { display: flex; flex-direction: column; min-width: 0; }
.rs-card {
  position: relative; display: block; text-decoration: none; color: inherit;
  border-radius: 8px; overflow: hidden; background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.08); transition: transform 0.15s, box-shadow 0.15s;
  aspect-ratio: 6 / 7;
}
.rs-card:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0,0,0,0.45); z-index: 3; }
.rs-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rs-card .wiki-generated-cover { width: 100%; height: 100%; border-radius: 0; border: none; }
.rs-card-badge {
  position: absolute; bottom: 6px; right: 7px; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; border-radius: 5px; background-color: #000;
}
.rs-card-badge::before {
  content: ''; width: 68%; height: 68%; background-color: #f3e6e6;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain;
}
.rs-card-badge--art::before { -webkit-mask-image: url(/images/icons/art_icon-96.png); mask-image: url(/images/icons/art_icon-96.png); }
.rs-card-badge--story::before { -webkit-mask-image: url(/images/icons/write_icon-96.png); mask-image: url(/images/icons/write_icon-96.png); }
.rs-card-badge--story::before { -webkit-mask-size: 84%; mask-size: 84%; -webkit-mask-position: 80% 50%; mask-position: 80% 50%; }
.rs-card-caption { padding: 0.5rem 0.05rem 0; min-width: 0; text-align: center; }
.rs-card-caption-title {
  display: block; font-family: 'Lato', sans-serif; font-size: 0.86rem; font-weight: 700; color: #6fb3e0; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rs-card-caption-title:hover { color: #96cbef; text-decoration: underline; }
.rs-card-caption-author { display: block; font-size: 0.78rem; color: #999; margin-top: 0.15rem; }
.rs-card-caption-author a { color: #a8c6e8; text-decoration: none; }
.rs-card-caption-author a:hover { text-decoration: underline; }

.fp-layout--profiles { grid-template-columns: 250px 1fr; }
.fp-layout--profiles .fp-filter-panel,
.fp-layout--profiles .fp-filter-fab { display: none; }
.fp-layout--profiles .fp-results-col {
  width: 100%; max-width: 680px; margin: 0 auto;
  transition: max-width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.fp-layout--sidebar-collapsed.fp-layout--profiles .fp-results-col { max-width: 960px; }

.fp-profile-card {
  display: flex; align-items: center; gap: 1.3rem; padding: 1.3rem 1.5rem; cursor: pointer;
  border-radius: 14px; margin-bottom: 1rem; position: relative; overflow: hidden;
  background: #0e0f12;
  border: 1px solid rgba(255,255,255,0.12);
  transition: border-color 0.15s;
}
.fp-profile-card:hover { border-color: rgba(240,192,96,0.4); }
.fp-profile-avatar, .fp-profile-avatar-fallback {
  width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.fp-profile-avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #7fa8d9, #d97a72); color: #fff; font-weight: 700; font-size: 1.4rem;
}
.fp-profile-card > a { text-decoration: none; }
.fp-profile-info { min-width: 0; flex: 1; }
.fp-profile-name { font-size: 1.3rem; font-weight: 700; color: #fff; text-decoration: none; }
.fp-profile-name:hover { text-decoration: underline; }
.fp-profile-handle { font-size: 0.88rem; color: #999; margin-top: 0.1rem; }
.fp-profile-stats { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; margin-top: 0.5rem; font-size: 0.82rem; color: #999; }
.fp-profile-stats strong { color: #eee; }
.fp-profile-follow-btn {
  flex-shrink: 0; display: flex; align-items: center; gap: 0.4rem;
  background: linear-gradient(135deg, #3d6fa8, #7fa8d9); color: #fff; border: none; border-radius: 20px;
  padding: 0.55em 1.1em; font-family: 'Lato', sans-serif; font-size: 0.85rem; font-weight: 700; cursor: pointer;
   transition: box-shadow 0.15s, transform 0.15s, background 0.15s;
}
.fp-profile-follow-btn:hover { box-shadow: 0 0 0 1px rgba(127,168,217,0.65); transform: translateY(-1px); }
.fp-profile-follow-btn--following { background: #1fb6a8; box-shadow: none; }
.fp-profile-follow-btn--following:hover { background: #d97a72; box-shadow: none; }

.fp-results-list { display: flex; flex-direction: column; gap: 1.1rem; }
.fp-results-list--grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (min-width: 721px) {
  .fp-layout--submissions.fp-layout--sidebar-collapsed.fp-layout--filters-collapsed .fp-results-list--grid,
  .fp-layout--no-side.fp-layout--submissions .fp-results-list--grid { grid-template-columns: repeat(6, 1fr); }
}
.fp-result {
  display: flex; gap: 1.75rem; padding: 1.5rem; cursor: pointer;
  background: linear-gradient(160deg, rgba(10,8,14,0.82), rgba(10,8,14,0.72)), url('/images/home/box-background-5.png');
  background-size: cover; background-position: center;
  border: 1px solid rgba(255,255,255,0.22); border-radius: 14px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.25);
  transition: border-color 0.15s;
}
.fp-result:hover { border-color: rgba(240,192,96,0.35); }
.fp-result-cover-link { flex-shrink: 0; text-decoration: none; display: flex; align-items: flex-start; }
.fp-result-cover {
  width: 130px; height: 195px; object-fit: cover; object-position: top left; border-radius: 12px; display: block;
  background: #1e1e1e; border: 1px solid rgba(255,255,255,0.15); box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.fp-result-cover-link .wiki-generated-cover {
  width: 130px; height: 195px; border-radius: 12px;
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: #6b3fa0;
  border: 1px solid rgba(255,255,255,0.15); box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.fp-result-cover-link .wiki-generated-cover-bg {
  position: absolute; inset: -25%; background-size: cover; background-position: center;
  filter: blur(12px) saturate(1.3) brightness(0.6); transform: scale(1.15);
}
.fp-result-cover-link .wiki-generated-cover-title {
  position: relative; z-index: 1; color: #fff; text-align: center; padding: 0 0.6rem;
  font-family: 'Fredoka', 'Lato', cursive; font-weight: 700; font-size: 0.92rem; line-height: 1.35;
  text-shadow: 0 2px 10px rgba(0,0,0,0.85);
}
.fp-result-body { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.fp-result-title {
  font-size: 1.7rem; font-weight: 700; color: #fff;
}
.fp-result-title:hover { color: #f0c060; }

.fp-result-author {
  display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none;
  margin: 0.5rem 0 0.85rem; width: fit-content;
}
.fp-result-author:hover .fp-result-author-name { color: #7fa8d9; text-decoration: underline; }
.fp-result-author-avatar, .fp-result-author-avatar-fallback {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.fp-result-author-avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #7fa8d9, #d97a72); color: #fff; font-weight: 700; font-size: 0.72rem;
}
.fp-result-author-name { font-size: 0.92rem; font-weight: 600; color: #ccc; }
.fp-tag-pill {
  display: inline-block; border-radius: 20px; padding: 0.32em 0.9em; font-size: 0.82rem; font-weight: 700;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap;
}
.fp-tag-pill:hover { filter: brightness(1.25); }
.fp-tag-pill--rating-general { background: rgba(122,201,141,0.14); color: #7ac98d; border-color: rgba(122,201,141,0.4); }
.fp-tag-pill--rating-teen { background: rgba(240,192,96,0.14); color: #f0c060; border-color: rgba(240,192,96,0.4); }
.fp-tag-pill--rating-mature { background: rgba(224,140,74,0.16); color: #e08c4a; border-color: rgba(224,140,74,0.45); }
.fp-tag-pill--fandom { background: rgba(194,84,122,0.1); color: #c2547a; border-color: rgba(194,84,122,0.3); }
.fp-tag-pill--relationship { background: rgba(194,84,122,0.1); color: #c2547a; border-color: rgba(194,84,122,0.3); }
.fp-tag-pill--category { background: rgba(194,84,122,0.1); color: #c2547a; border-color: rgba(194,84,122,0.3); }
.fp-tag-pill--tag { background: rgba(127,168,217,0.16); color: #bcd4f0; border-color: rgba(127,168,217,0.55); }

.fp-result-synopsis {
  font-size: 0.98rem; color: #ccc; line-height: 1.6; margin-bottom: 0.9rem;
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
}

.fp-result-stats { display: flex; flex-wrap: wrap; gap: 0.4rem 1.35rem; margin-top: auto; font-size: 0.95rem; color: #999; }
.fp-result-stats strong { color: #c9c9c9; font-weight: 700; }

.fp-bcard-grid, .fp-bcard-grid--narrow { display: flex; flex-direction: column; gap: 0; }
.fp-bcard {
  display: flex; flex-direction: row; cursor: pointer; overflow: hidden; position: relative; line-height: normal;
  background: transparent; padding: 1rem 0;
  border-top: 1px solid rgba(255,255,255,0.22);
}
.fp-bcard:hover .fp-bcard-title { color: #f0c060; }
.fp-bcard-innerwrap { display: flex; flex-direction: row; width: 100%; height: 220px; }
.fp-bcard-cover-link { width: auto; height: 100%; aspect-ratio: 2 / 3; flex-shrink: 0; display: block; overflow: hidden; position: relative; }
.fp-bcard-cover-link img, .fp-bcard-cover-link .wiki-generated-cover { width: 100%; height: 100%; border-radius: 0; border: none; box-shadow: none; object-fit: cover; }
.fp-bcard-body { min-width: 0; flex: 1; display: flex; flex-direction: column; padding: 0.65rem 0.85rem 0.6rem; overflow: hidden; }
.fp-bcard-head { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 0.85rem; }
.fp-bcard-title { font-family: 'Lato', sans-serif; font-size: 1.22rem; font-weight: 700; color: #fff; line-height: 1.15; text-decoration: none; transition: color 0.25s; }
.fp-bcard-author { display: inline-flex; align-items: center; gap: 0.35rem; margin-left: 0.6rem; text-decoration: none; }
.fp-bcard-author:hover .fp-bcard-author-name { color: #7fa8d9; text-decoration: underline; }
.fp-bcard-author-avatar, .fp-bcard-author-avatar-fallback { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.fp-bcard-author-avatar-fallback { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #7fa8d9, #d97a72); color: #fff; font-weight: 700; font-size: 0.68rem; }
.fp-bcard-author-name { font-size: 0.86rem; font-weight: 600; color: #ccc; }
.fp-bcard-tags-row { display: flex; margin-bottom: 0.35rem; min-width: 0; }
.fp-bcard-tags-scroll .fp-tag-pill--rating-general { background: rgba(90,200,110,0.18); color: #6fe08a; border-color: rgba(90,200,110,0.5); }
.fp-bcard-tags-scroll .fp-tag-pill--rating-teen { background: rgba(240,192,96,0.18); color: #f5cf7c; border-color: rgba(240,192,96,0.5); }
.fp-bcard-tags-scroll .fp-tag-pill--rating-mature { background: rgba(224,80,74,0.2); color: #ff8079; border-color: rgba(224,80,74,0.55); }
.fp-tag-pill--status-ongoing { background: rgba(90,200,110,0.18); color: #6fe08a; border-color: rgba(90,200,110,0.5); }
.fp-tag-pill--status-complete { background: rgba(127,168,217,0.2); color: #a8c6e8; border-color: rgba(127,168,217,0.5); }
.fp-bcard-tags-scroll-wrap { position: relative; flex: 1; min-width: 0; }
.fp-bcard-tags-scroll { display: flex; gap: 0.5rem; overflow: hidden; }
.fp-bcard-tags-scroll .fp-tag-pill { flex-shrink: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 0.95rem; padding: 0.4em 1em; white-space: nowrap; }
.fp-bcard-tags-scroll-wrap.fp-bcard-tags-can-next .fp-bcard-tags-scroll { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 3.4rem), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 3.4rem), transparent); }
.fp-bcard-tags-scroll-wrap.fp-bcard-tags-can-prev .fp-bcard-tags-scroll { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 3.4rem), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 3.4rem), transparent); }
.fp-bcard-tags-scroll-wrap.fp-bcard-tags-can-prev.fp-bcard-tags-can-next .fp-bcard-tags-scroll { -webkit-mask-image: linear-gradient(to right, transparent, #000 3.4rem, #000 calc(100% - 3.4rem), transparent); mask-image: linear-gradient(to right, transparent, #000 3.4rem, #000 calc(100% - 3.4rem), transparent); }
.fp-bcard-tags-arrow {
  display: none; position: absolute; z-index: 1; top: 0; bottom: 0; width: 2.2rem; align-items: center;
  background: none; border: none; padding: 0; cursor: pointer; color: #7fa8d9; font-size: 2rem; line-height: 1;
  transition: color 0.2s;
}
.fp-bcard-tags-arrow:hover { color: #fff; }
.fp-bcard-tags-arrow--left { left: 0; justify-content: flex-start; }
.fp-bcard-tags-arrow--right { right: 0; justify-content: flex-end; }
.fp-bcard-tags-scroll-wrap.fp-bcard-tags-can-prev .fp-bcard-tags-arrow--left,
.fp-bcard-tags-scroll-wrap.fp-bcard-tags-can-next .fp-bcard-tags-arrow--right { display: flex; }

.fp-bcard-synopsis { font-family: 'Lato', sans-serif;
  font-size: 0.97rem; line-height: 1.4; color: #ddd; margin: 0.15rem 0 0.5rem;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.fp-bcard-bottom-row { display: flex; align-items: center; gap: 0.5rem; margin-top: auto; }
.fp-bcard-chars { display: flex; flex-wrap: nowrap; overflow: hidden; gap: 0.35rem; flex: 1; min-width: 0; }
.fp-bcard-char-chip {
  display: flex; align-items: center; gap: 0.35rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px; padding: 0.2rem 0.65rem 0.2rem 0.2rem; font-size: 0.74rem; color: #ddd; font-weight: 600;
  text-decoration: none; transition: border-color 0.15s, color 0.15s; flex-shrink: 0;
}
.fp-bcard-char-chip:hover { border-color: #7fa8d9; color: #fff; }
.fp-bcard-char-chip img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.fp-bcard-char-chip--empty { color: #888; cursor: default; font-style: italic; }
.fp-bcard-char-chip--empty:hover { border-color: rgba(255,255,255,0.1); color: #888; }
.fp-bcard-statpanel { display: flex; gap: 1.1rem; flex-shrink: 0; }
.fp-bcard-stat { display: flex; align-items: center; gap: 0.3rem; white-space: nowrap; font-size: 0.9rem; color: #ccc; }
.fp-bcard-stat-val { font-weight: 800; color: #fff; }

.fp-search-empty { color: #ddd; font-size: 1rem; padding: 2rem 0; }
.fp-pagination { display: flex; justify-content: center; gap: 0.6rem; margin-top: 2.5rem; }
.fp-pagination[hidden] { display: none; }
.fp-layout--no-side .fp-pagination-top-row { margin-top: 1rem; }
.fp-pagination button {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.25); color: #ddd; border-radius: 0;
  padding: 0.55em 1.2em; cursor: pointer; font-family: inherit; font-size: 0.9rem;
}
.fp-pagination button:hover:not(:disabled) { border-color: #7fa8d9; color: #7fa8d9; }
.fp-pagination button:disabled { opacity: 0.4; cursor: default; }

.fp-page-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.18); color: #ccc; border-radius: 0;
  min-width: 2.2rem; height: 2.2rem; padding: 0 0.5em; cursor: pointer; font-family: inherit; font-size: 0.9rem; font-weight: 600;
}
.fp-page-btn:hover:not(:disabled):not(.fp-page-btn--active) { border-color: #7fa8d9; color: #7fa8d9; }
.fp-page-btn:disabled { opacity: 0.35; cursor: default; }
.fp-pagination .fp-page-btn--active { border-color: #7fa8d9; box-shadow: 0 0 0 1px rgba(127,168,217,0.35); }
.fp-page-ellipsis { color: #777; padding: 0 0.2rem; font-size: 0.9rem; }
#fp-pagination-top { margin-bottom: 1.75rem; }
#fp-pagination-top:not([hidden]) { margin-top: 0.5rem; }

.fp-side-panel {
  grid-column: 1;
  position: sticky; top: 76px;
  margin-bottom: -5rem; margin-left: -2.5rem;
  height: calc(100vh - 76px); max-height: calc(100vh - 76px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #0a0c0d; border-right: 1px solid rgba(255,255,255,0.22);
  padding: 3.5rem 1.5rem 3.5rem; overflow-y: auto;
  scrollbar-color: #444 transparent;
}
.fp-side-panel::-webkit-scrollbar { width: 8px; }
.fp-side-panel::-webkit-scrollbar-track { background: transparent; }
.fp-side-panel::-webkit-scrollbar-thumb { background: #444; border-radius: 8px; }
.fp-side-menu { display: flex; flex-direction: column; gap: 1.1rem; width: 100%; }
.fp-side-menu-item {
  display: flex; align-items: center; justify-content: center; width: 100%; box-sizing: border-box;
  color: #ccc; text-decoration: none; border-radius: 0;
  border: 1px solid rgba(255,255,255,0.12);
  background: #0e0f12;
  padding: 1.05em 1.15em;
  transition: color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.fp-side-menu-item:hover {
  color: #fff; border-color: rgba(127,168,217,0.7);
  box-shadow: 0 0 0 1px rgba(127,168,217,0.35);
}
.fp-side-menu-item--active {
  color: #fff; font-weight: 700; border-color: #7fa8d9;
  box-shadow: 0 0 0 1px rgba(127,168,217,0.4);
}
.fp-side-menu-item--active .fp-side-menu-count { color: rgba(255,255,255,0.75); }
.fp-side-menu-text { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; width: 100%; min-width: 0; text-align: center; }
.fp-side-menu-label { font-family: 'Lato', Arial, sans-serif; font-size: 1.65rem; font-weight: 700; }
.fp-side-menu-count {
  font-size: 0.95rem; font-weight: 600; color: #888; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.fp-side-menu-item:hover .fp-side-menu-count { color: #cfe0f5; }
.fp-side-menu-item[hidden] { display: none; }

.fp-side-search-wrap { position: relative; width: 100%; margin-bottom: 1rem; }
.fp-side-search-wrap svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: #888; pointer-events: none;
}
.fp-side-search-wrap input {
  width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.16); border-radius: 0;
  color: #f0f0f0; font-family: inherit; font-size: 0.92rem; padding: 0.6em 0.9em 0.6em 2.4rem;
}
.fp-side-search-wrap input:focus { outline: none; border-color: #7fa8d9; }

.fp-filter-panel {
  grid-column: 3;
  position: sticky; top: 76px;
  margin-bottom: -5rem; margin-right: -2.5rem;
  height: calc(100vh - 76px);
  display: flex; flex-direction: column;
  background: #0a0c0d;
  border-left: 1px solid rgba(255,255,255,0.22);
  padding: 3.5rem 1.5rem 1.5rem; max-height: calc(100vh - 76px); overflow-y: auto;
  scrollbar-color: #444 #1a1a1e;
  overscroll-behavior: contain;
  contain: layout;
}
.fp-filter-panel::-webkit-scrollbar { width: 8px; }
.fp-filter-panel::-webkit-scrollbar-track { background: #1a1a1e; border-radius: 8px; }
.fp-filter-panel::-webkit-scrollbar-thumb { background: #444; border-radius: 8px; }
.fp-filter-panel::-webkit-scrollbar-thumb:hover { background: #555; }
.fp-layout--filters-collapsed .fp-filter-panel,
.fp-layout--filters-collapsed .fp-posts-panel { display: none; }
.fp-filter-fab {
  position: fixed; top: calc(76px + 0.75rem); right: calc(250px + 2.5rem - 32px - 0.75rem);
  width: 32px; height: 32px; border-radius: 50%; z-index: 60;
  background: #0e0f12; border: 1px solid rgba(255,255,255,0.2);
  color: #ccc; cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}
.fp-filter-fab:hover { color: #fff; border-color: rgba(127,168,217,0.7); }
.fp-filter-fab--collapsed { right: 10px; }
.fp-filter-fab--collapsed::after {
  content: ''; position: absolute; top: -0.75rem; right: 42px; width: 1px;
  height: calc(100vh - 76px); background: rgba(255,255,255,0.22);
}

.fp-sidebar-fab {
  position: fixed; top: calc(76px + 0.75rem); left: calc(250px + 2.5rem - 32px - 0.75rem);
  width: 32px; height: 32px; border-radius: 50%; z-index: 60;
  background: #0e0f12; border: 1px solid rgba(255,255,255,0.2);
  color: #ccc; cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}
.fp-sidebar-fab:hover { color: #fff; border-color: rgba(127,168,217,0.7); }
.fp-sidebar-fab--collapsed { left: 10px; }
.fp-sidebar-fab--collapsed::after {
  content: ''; position: absolute; top: -0.75rem; left: 42px; width: 1px;
  height: calc(100vh - 76px); background: rgba(255,255,255,0.22);
}
.fp-layout--no-side .fp-sidebar-fab { display: none; }
.fp-filter-query {
  font-size: 0.85rem; color: #bbb; background: rgba(127,168,217,0.1); border: 1px solid rgba(127,168,217,0.3);
  border-radius: 0; padding: 0.6em 0.85em; margin-bottom: 1.25rem;
}
.fp-filter-query strong { color: #a8c6e8; }
.fp-filter-section { margin-bottom: 1.4rem; }
.fp-filter-section-title { font-family: 'Lato', sans-serif; font-size: 1.3rem; font-weight: 700; color: #ddd; margin-bottom: 0.7rem; }

.fp-posts-panel {
  grid-column: 3;
  position: sticky; top: 76px;
  margin-bottom: -5rem; margin-right: -2.5rem;
  height: calc(100vh - 76px);
  flex-direction: column;
  background: #0a0c0d;
  border-left: 1px solid rgba(255,255,255,0.22);
  padding: 3.5rem 1.5rem 1.5rem; max-height: calc(100vh - 76px); overflow-y: auto;
  scrollbar-color: #444 #1a1a1e;
  overscroll-behavior: contain;
  contain: layout;
}
.fp-posts-panel::-webkit-scrollbar { width: 8px; }
.fp-posts-panel::-webkit-scrollbar-track { background: #1a1a1e; border-radius: 8px; }
.fp-posts-panel::-webkit-scrollbar-thumb { background: #444; border-radius: 8px; }
.fp-posts-count { font-size: 0.95rem; color: #ddd; margin-bottom: 1.25rem; }
.fp-posts-count strong { color: #fff; }
.fp-posts-panel input[type="text"] {
  width: 100%; background: #1a1a1e; border: 1px solid rgba(255,255,255,0.16); border-radius: 0;
  color: #f0f0f0; font-family: inherit; font-size: 0.98rem; padding: 0.6em 0.75em;
}
.fp-posts-panel input[type="text"]:focus { outline: none; border-color: #7fa8d9; }

.fp-sort-select {
  width: 100%; background: transparent; border: 1px solid rgba(255,255,255,0.16); border-radius: 0;
  color: #f0f0f0; font-family: inherit; font-size: 1.05rem; font-weight: 600; padding: 0.7em 0.8em;
  cursor: pointer;
}
.fp-sort-select:focus { outline: none; border-color: #7fa8d9; }
.fp-sort-select option { background: #1a1a1e; color: #f0f0f0; }

.fp-filter-details { border-top: 1px solid rgba(255,255,255,0.1); padding: 0.75rem 0; }
.fp-filter-details summary {
  cursor: pointer; font-family: 'Lato', sans-serif; font-size: 1.15rem; font-weight: 600; color: #ddd; list-style: none;
  display: flex; align-items: center; gap: 0.5rem;
}
.fp-filter-details summary::-webkit-details-marker { display: none; }
.fp-filter-details summary::before { content: '▸'; font-size: 0.9rem; color: #888; transition: transform 0.15s; }
.fp-filter-details[open] summary::before { transform: rotate(90deg); }
.fp-filter-options { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 0.8rem; padding-left: 0.2rem; }
.fp-filter-options label { display: flex; align-items: center; gap: 0.55rem; font-size: 1rem; color: #ccc; cursor: pointer; }
.fp-filter-options label.fp-rating-locked { filter: blur(3px); opacity: 0.6; cursor: not-allowed; pointer-events: none; }
.fp-rating-sfw-notice {
  margin: 0.7rem 0 0; padding-left: 0.2rem; font-size: 0.82rem; line-height: 1.5; color: #999;
}
.fp-rating-sfw-notice a { color: #7fa8d9; text-decoration: underline; cursor: pointer; }

.fp-filter-panel input[type="text"], .fp-filter-panel input[type="number"] {
  width: 100%; background: #1a1a1e; border: 1px solid rgba(255,255,255,0.16); border-radius: 0;
  color: #f0f0f0; font-family: inherit; font-size: 0.98rem; padding: 0.6em 0.75em;
}
.fp-filter-panel input:focus { outline: none; border-color: #7fa8d9; }
.fp-filter-word-row { display: flex; align-items: center; gap: 0.5rem; }
.fp-filter-word-row input { flex: 1; min-width: 0; }
.fp-filter-word-row span { color: #888; }

.wiki-suggest-input-wrap { position: relative; }
.wiki-fandom-suggest {
  position: fixed; z-index: 3000;
  background: #141018; border: 1px solid rgba(255,255,255,0.14); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55); overflow: hidden;
}
.wiki-fandom-suggest-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  color: #f0f0f0; font-family: 'Lato', sans-serif; font-size: 0.88rem;
  padding: 0.65rem 0.9rem; cursor: pointer;
}
.wiki-fandom-suggest-item:hover, .wiki-fandom-suggest-item.active { background: rgba(127,168,217,0.15); }

.fp-filter-apply-btn {
  width: 100%; background: linear-gradient(135deg, #3d6fa8, #7fa8d9); color: #fff; border: none; border-radius: 0;
  padding: 0.7em; font-family: 'Lato', sans-serif; font-size: 0.95rem; font-weight: 700; cursor: pointer;
   transition: box-shadow 0.15s, transform 0.15s;
}
.fp-filter-apply-btn:hover { box-shadow: 0 0 0 1px rgba(127,168,217,0.75); transform: translateY(-1px); }
.fp-filter-apply-btn--top { margin-bottom: 1.1rem; }
.fp-filter-apply-btn--bottom { margin-top: auto; }

@media (max-width: 980px) {
  .fp-layout, .fp-layout--filters-collapsed, .fp-layout--submissions, .fp-layout--profiles, .fp-layout--no-side { grid-template-columns: 1fr; row-gap: 1.5rem; }
  .fp-layout--profiles .fp-results-col { max-width: none; }
  .fp-results-col { grid-column: 1; }
  .fp-layout:not(.fp-layout--submissions, .fp-layout--profiles, .fp-layout--no-side) .fp-filter-panel {
    grid-column: 1; display: flex;
    position: static; max-height: none; height: auto; overflow-y: visible;
    margin-bottom: 0; margin-right: 0; border: 1px solid rgba(255,255,255,0.14); border-radius: 18px; padding-top: 1.5rem;
  }
  .fp-filter-fab { display: none; }
  .fp-sidebar-fab { display: none; }
  .fp-layout--submissions:not(.fp-layout--no-side) .fp-posts-panel {
    grid-column: 1; display: flex;
    position: static; max-height: none; height: auto; overflow-y: visible;
    margin-bottom: 0; margin-right: 0; border: 1px solid rgba(255,255,255,0.14); border-radius: 18px; padding-top: 1.5rem;
  }
  .fp-side-panel {
    position: static; max-height: none; height: auto;
    margin-bottom: 0; margin-left: 0;
    padding: 1.5rem 0; border-right: none; border-bottom: 2px solid rgba(255,255,255,0.4);
  }
  .fp-results-list--grid { grid-template-columns: repeat(3, 1fr); }
  .fp-layout--profiles .fp-results-col { padding-right: 0; min-width: 0; max-width: 100%; }
}
.fp-tabdrawer-toggle, .fp-tabdrawer-backdrop { display: none; }
.fp-mobile-options-btn, .fp-options-backdrop { display: none; }
@media (max-width: 720px) {
  .fp-result { flex-direction: column; }
  .fp-result-cover { width: 100%; height: auto; aspect-ratio: 2 / 3; }
  .fp-bcard-grid, .fp-bcard-grid--narrow { gap: 0; }
  .fp-results-list--grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .rs-card-caption-title { font-size: 0.72rem; }
  .rs-card-caption-author { font-size: 0.64rem; }
  .rs-card-badge { width: 1.25rem; height: 1.25rem; }

  .fp-bcard-innerwrap { height: 125px; }
  .fp-bcard-body { padding: 0.4rem 0.55rem 0.4rem; }
  .fp-bcard-head { gap: 0.3rem; margin-bottom: 0.2rem; }
  .fp-bcard-author { margin-left: 0; }
  .fp-bcard-title { font-size: 0.88rem; }
  .fp-bcard-author-avatar, .fp-bcard-author-avatar-fallback { width: 15px; height: 15px; }
  .fp-bcard-author-name { font-size: 0.68rem; }
  .fp-bcard-tags-row { gap: 0.25rem; margin-bottom: 0.25rem; }
  .fp-bcard-tags-scroll .fp-tag-pill { font-size: 0.7rem; padding: 0.3em 0.7em; }
  .fp-bcard-tags-arrow { width: 1.7rem; font-size: 1.5rem; }
  .fp-bcard-bottom-row { margin-top: 0.2rem; }
  .fp-bcard-statpanel { gap: 0.5rem; }
  .fp-bcard-stat { font-size: 0.56rem; }
  .fp-bcard-stat-val { font-size: 0.66rem; }
  .fp-bcard-synopsis { font-size: 0.68rem; line-height: 1.28; -webkit-line-clamp: 2; margin-bottom: 0; }
  .fp-bcard-chars { display: none; }

  .fp-profile-card { gap: 0.7rem; padding: 0.6rem 0.7rem; margin-bottom: 0.5rem; border-radius: 10px; }
  .fp-profile-avatar, .fp-profile-avatar-fallback { width: 42px; height: 42px; }
  .fp-profile-avatar-fallback { font-size: 1rem; }
  .fp-profile-name { font-size: 0.92rem; }
  .fp-profile-handle { font-size: 0.72rem; margin-top: 0; }
  .fp-profile-stats { display: block; margin-top: 0.15rem; font-size: 0.72rem; }
  .fp-profile-stats span:not(:nth-child(3)) { display: none; }
  .fp-profile-follow-btn { font-size: 0.72rem; padding: 0.4em 0.7em; gap: 0.25em; }
}
@media (max-width: 720px), (max-width: 980px) and (pointer: coarse) {
  .fp-layout, .fp-layout--no-side, .fp-layout--profiles, .fp-layout--submissions, .fp-layout--filters-collapsed {
    padding: 4rem 0.6rem 3rem;
    position: relative;
  }

  .fp-tabdrawer-toggle {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 0.5rem; left: 0.7rem; z-index: 1;
    width: 40px; height: 40px; padding: 0; border-radius: 50%;
    background: none; border: none; color: #ccc; cursor: pointer;
  }
  .fp-tabdrawer-toggle svg { width: 24px; height: 24px; }
  .fp-tabdrawer-toggle:hover { color: #f0f0f0; }
  .fp-layout.fp-tabdrawer-open .fp-tabdrawer-toggle { visibility: hidden; }
  .fp-side-panel {
    position: fixed; top: 0; left: -80vw; bottom: 0; width: 78vw; max-width: 300px;
    height: auto; max-height: none; z-index: 300; border-right: 1px solid rgba(255,255,255,0.22);
    margin: 0; padding: 1.5rem 1.1rem;
    display: flex; flex-direction: column; justify-content: center; align-items: stretch;
    background: #0a0c0d;
    transition: left 0.28s ease;
    box-shadow: 8px 0 40px rgba(0,0,0,0.55);
  }
  .fp-layout.fp-tabdrawer-open .fp-side-panel { left: 0; }
  .fp-tabdrawer-backdrop {
    display: none; position: fixed; inset: 0; z-index: 290;
    background: rgba(0,0,0,0.5); }
  .fp-layout.fp-tabdrawer-open .fp-tabdrawer-backdrop { display: block; }
  .fp-layout--no-side .fp-tabdrawer-toggle { display: none; }
  .fp-side-menu-item { padding: 1.1rem 1rem; }

  .fp-pagination-top-row { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; min-height: 2.2rem; }
  .fp-pagination-top-row .fp-pagination { margin-top: 0; }
  .fp-mobile-options-btn:not([hidden]) {
    display: flex; align-items: center; gap: 0.4rem;
    height: 2.2rem; box-sizing: border-box;
    background: rgba(20,16,26,0.5); border: 1px solid rgba(127,168,217,0.45); border-radius: 20px;
    color: #cfe0f5; font-family: 'Fredoka', 'Lato', cursive; font-weight: 700; font-size: 0.82rem;
    padding: 0 0.9em; cursor: pointer; 
    margin-left: auto;
  }
  .fp-mobile-options-btn:hover { border-color: rgba(127,168,217,0.75); color: #fff; }
  .fp-layout:not(.fp-layout--no-side) .fp-options-panel {
    display: flex; position: fixed; top: 0; bottom: 0; right: -85vw; width: 82vw; max-width: 320px;
    height: auto; max-height: none; z-index: 310; margin: 0; box-sizing: border-box; contain: none;
    overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
    background: #0a0c0d; border: none; border-left: 1px solid rgba(255,255,255,0.18); border-radius: 0;
    padding: 1.5rem 1.1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    visibility: hidden; transition: right 0.28s ease, visibility 0.28s;
  }
  .fp-layout.fp-options-open:not(.fp-layout--no-side) .fp-options-panel { right: 0; visibility: visible; box-shadow: -8px 0 40px rgba(0,0,0,0.55); }
  .fp-options-panel > * { flex-shrink: 0; }
  .fp-options-panel .fp-filter-section-title { font-size: 1.1rem; }
  .fp-options-panel .fp-filter-details summary { font-size: 1.05rem; }
  .fp-options-panel input[type="search"], .fp-options-panel input[type="text"], .fp-options-panel input[type="number"], .fp-options-panel select { font-size: 16px; }
  .fp-options-backdrop { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,0.5); touch-action: none; }
  .fp-layout.fp-options-open .fp-options-backdrop { display: block; }
  .fp-content-z:has(.fp-options-open), .fp-content-z:has(.fp-tabdrawer-open) { z-index: 400; }
  html:has(.fp-options-open) { overflow: hidden; }
  body:has(.fp-options-open) .fpnav-bottombar, body:has(.fp-tabdrawer-open) .fpnav-bottombar { visibility: hidden; }
}

@media (max-width: 720px), (max-width: 1360px) and (pointer: coarse) {
  .fp-layout { padding-bottom: 1rem; }
  .fp-bcard-grid > .fp-bcard:last-child { padding-bottom: 0; }
}
