/* ═══════════════════════════════════════════════════════════
   fandoms/ — shared stylesheet
   Wetpaint-era fandom wiki aesthetic, circa 2009–2012
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Nunito:wght@400;600;700;800;900&family=Quicksand:wght@400;500;600;700&display=swap');

/* ── RESET & ROOT ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* primary palette */
  --ink:         #2c1a3e;
  --pink:        #d64f8a;
  --pink-light:  #f7b8d8;
  --pink-pale:   #fff0f7;
  --purple:      #7c3aad;
  --purple-mid:  #b07dd3;
  --purple-pale: #f3edfb;
  --teal:        #0fa88a;
  --teal-pale:   #e0f7f3;
  --gold:        #e8b84b;
  --gold-pale:   #fffbe6;
  --red:         #c0392b;
  --off-white:   #fdfbff;
  --white:       #ffffff;
  --border:      #ddd0f0;
  --text:        #321949;
  --muted:       #907aaa;
  --shadow-sm:   0 2px 6px rgba(124,58,173,.12);
  --shadow-md:   0 4px 18px rgba(124,58,173,.15);
  --radius:      10px;
  --radius-sm:   6px;
  --radius-lg:   16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Quicksand', sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  background: #ede5f8;
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(214,79,138,.08) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 90%, rgba(124,58,173,.08) 0%, transparent 50%);
  min-height: 100vh;
}

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: 'Nunito', sans-serif; line-height: 1.2; }
a { color: var(--purple); font-weight: 600; text-decoration: none; transition: color .15s; }
a:hover { color: var(--pink); text-decoration: underline; }
p { margin-bottom: .8em; }
strong { font-weight: 800; }
em { font-style: italic; }

/* ── SITE HEADER ─────────────────────────────────────────── */
#site-header {
  background: linear-gradient(135deg, #5b1a8a 0%, #a8246e 50%, #d4543a 100%);
  position: relative;
  overflow: hidden;
}
#site-header::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 65% 40%, rgba(255,255,255,.18) 0%, transparent 55%),
    url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='40' cy='40' r='30'/%3E%3Ccircle cx='0'  cy='0'  r='25'/%3E%3Ccircle cx='80' cy='80' r='25'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px 12px;
  position: relative; z-index: 2;
  gap: 16px;
}

.site-brand  { display: flex; align-items: center; gap: 14px; }
.brand-icon  {
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 3px solid rgba(255,255,255,.55);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  box-shadow: 0 0 22px rgba(255,200,230,.35);
  text-decoration: none;
  transition: transform .2s;
  flex-shrink: 0;
}
.brand-icon:hover { transform: scale(1.1) rotate(8deg); }
.brand-name {
  font-family: 'Lilita One', cursive;
  font-size: 30px; color: #fff;
  text-shadow: 2px 3px 0 rgba(60,0,80,.4), 0 0 24px rgba(255,180,220,.4);
  line-height: 1.1;
}
.brand-tagline {
  font-family: 'Nunito', sans-serif; font-size: 11px; font-weight: 800;
  color: rgba(255,255,255,.82); letter-spacing: 1.6px; text-transform: uppercase;
  margin-top: 3px;
}

.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

.user-bar {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35);
  border-radius: 20px; padding: 5px 14px;
  backdrop-filter: blur(6px);
}
.user-bar span { font-family: 'Nunito', sans-serif; font-size: 12px; font-weight: 700; color: #fff; }
.user-bar a {
  font-family: 'Nunito', sans-serif; font-size: 12px; font-weight: 900;
  color: var(--gold); background: rgba(255,255,255,.15);
  border-radius: 10px; padding: 2px 9px;
  transition: background .15s;
}
.user-bar a:hover { background: rgba(255,255,255,.3); text-decoration: none; }

.header-search { display: flex; gap: 6px; }
.header-search input {
  background: rgba(255,255,255,.22); border: 1.5px solid rgba(255,255,255,.45);
  border-radius: 20px; padding: 6px 15px;
  font-family: 'Quicksand', sans-serif; font-size: 13px; color: #fff;
  width: 200px; outline: none; backdrop-filter: blur(6px);
  transition: background .2s, width .3s;
}
.header-search input::placeholder { color: rgba(255,255,255,.65); }
.header-search input:focus { background: rgba(255,255,255,.32); width: 235px; }
.header-search button {
  background: rgba(255,255,255,.88); border: none; border-radius: 20px;
  padding: 6px 15px;
  font-family: 'Nunito', sans-serif; font-size: 12px; font-weight: 900; color: var(--purple);
  cursor: pointer; transition: background .15s, transform .1s;
}
.header-search button:hover { background: #fff; transform: scale(1.04); }

/* sparkles in header */
.sparkle {
  position: absolute; pointer-events: none; opacity: .6;
  animation: sparkle-float 3s ease-in-out infinite;
}
@keyframes sparkle-float {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-9px) rotate(18deg); }
}

/* ── MAIN NAV ─────────────────────────────────────────────── */
#main-nav {
  background: linear-gradient(90deg, #5b1a8a 0%, #a8246e 55%, #c0392b 100%);
  border-bottom: 3px solid rgba(255,255,255,.2);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
#main-nav ul { list-style: none; display: flex; padding: 0 18px; overflow-x: auto; }
#main-nav ul::-webkit-scrollbar { display: none; }
#main-nav li a {
  display: inline-block; padding: 10px 16px;
  color: rgba(255,255,255,.85);
  font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 800;
  white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -3px;
  transition: color .15s, border-color .15s, background .15s;
}
#main-nav li a:hover,
#main-nav li.active a {
  color: #fff; border-bottom-color: var(--gold);
  background: rgba(255,255,255,.12); text-decoration: none;
}
#main-nav li.active a { background: rgba(255,255,255,.2); }

/* ── THREE-COLUMN LAYOUT ─────────────────────────────────── */
#layout {
  display: grid;
  grid-template-columns: 200px 1fr 210px;
  gap: 14px;
  max-width: 1180px; margin: 0 auto; padding: 16px 12px;
}

/* ── SIDEBAR WIDGETS ─────────────────────────────────────── */
.widget {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); margin-bottom: 12px;
}
.widget:last-child { margin-bottom: 0; }

.widget-title {
  font-family: 'Nunito', sans-serif; font-size: 11.5px; font-weight: 900;
  letter-spacing: 1.2px; text-transform: uppercase;
  padding: 8px 12px; color: #fff;
}
.wt-pink   { background: linear-gradient(90deg, var(--pink), var(--red)); }
.wt-purple { background: linear-gradient(90deg, var(--purple), #5b1a8a); }
.wt-teal   { background: linear-gradient(90deg, var(--teal), #0d7a66); }
.wt-gold   { background: linear-gradient(90deg, #c0851a, var(--gold)); }

.widget-body { padding: 10px 12px; }

/* nav list */
.nav-list { list-style: none; }
.nav-list > li > a {
  display: block; padding: 6px 8px;
  color: var(--purple); font-weight: 700; font-size: 13px;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.nav-list > li > a:hover { background: var(--purple-pale); color: var(--pink); border-left-color: var(--pink); text-decoration: none; }
.nav-list > li > a.current { background: var(--pink-pale); color: var(--pink); border-left-color: var(--pink); }
.subnav { list-style: none; padding-left: 14px; }
.subnav li a { display: block; padding: 3px 8px; font-size: 12px; color: var(--muted); border-radius: var(--radius-sm); transition: color .15s; }
.subnav li a:hover { color: var(--purple); text-decoration: none; }

/* recent / small list */
.small-list { list-style: none; }
.small-list li { padding: 5px 0; border-bottom: 1px dashed var(--border); font-size: 12px; }
.small-list li:last-child { border-bottom: none; }
.small-list .byline { color: var(--muted); font-size: 11px; }

/* tag cloud */
.tags { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 0; }
.tags a {
  background: var(--purple-pale); border: 1px solid var(--purple-mid);
  border-radius: 12px; padding: 2px 9px;
  font-size: 11px; font-weight: 700; color: var(--purple);
  transition: background .15s, color .15s;
}
.tags a:hover { background: var(--pink-pale); color: var(--pink); border-color: var(--pink); text-decoration: none; }
.tags a.big { font-size: 13.5px; }
.tags a.sm  { font-size: 10px; }

/* stats grid */
.stat-row { display: flex; justify-content: space-between; font-size: 12px; line-height: 2.1; }
.stat-row .k { color: var(--muted); font-weight: 700; }
.stat-row .v { font-weight: 900; color: var(--purple); }

/* star rating widget */
.star-row { display: flex; justify-content: center; gap: 4px; padding: 6px 0; }
.star { font-size: 22px; cursor: pointer; color: #ddd; transition: color .15s, transform .1s; }
.star.lit { color: var(--gold); }
.star:hover { transform: scale(1.2); }
.star-note { font-size: 11px; color: var(--muted); text-align: center; margin-top: 2px; }

/* poll */
.poll-q { font-size: 12px; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.poll-opt { margin-bottom: 8px; }
.poll-opt label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; cursor: pointer; }
.poll-opt input[type=radio] { accent-color: var(--pink); }
.bar-wrap { height: 6px; background: var(--border); border-radius: 3px; margin-top: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--pink), var(--purple)); border-radius: 3px; }
.bar-pct  { font-size: 10px; color: var(--muted); text-align: right; margin-top: 1px; }

/* ── MAIN CONTENT ─────────────────────────────────────────── */
#main-col { min-width: 0; }

.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted); margin-bottom: 12px;
}
.breadcrumb a { color: var(--purple); font-weight: 700; }
.breadcrumb .sep { color: var(--border); }

.notice {
  background: linear-gradient(90deg, #fffae0, #fff8d0);
  border: 1.5px solid #f0d060; border-radius: var(--radius);
  padding: 10px 15px; margin-bottom: 14px;
  font-size: 12.5px; font-weight: 700; color: #7a5700;
  display: flex; align-items: center; gap: 10px;
}
.notice .ni { font-size: 17px; }

/* page-head box */
.page-head {
  background: linear-gradient(135deg, var(--purple-pale), var(--pink-pale));
  border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 14px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  box-shadow: var(--shadow-sm);
}
.page-head h1 {
  font-family: 'Lilita One', cursive; font-size: 26px;
  color: var(--purple); text-shadow: 1px 2px 0 rgba(124,58,173,.18); line-height: 1.15;
}
.page-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; max-width: 450px; }
.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff; border: none; border-radius: 20px;
  padding: 8px 18px;
  font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 900;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 3px 12px rgba(214,79,138,.35);
  transition: transform .15s, box-shadow .15s; text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(214,79,138,.45); color: #fff; text-decoration: none; }
.btn-sm { padding: 5px 13px; font-size: 12px; }
.btn-teal { background: linear-gradient(135deg, var(--teal), #0d7a66); box-shadow: 0 3px 10px rgba(15,168,138,.3); }
.btn-gold  { background: linear-gradient(135deg, #c0851a, var(--gold)); box-shadow: 0 3px 10px rgba(232,184,75,.3); color: var(--ink); }

/* tabs */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 0; }
.tab-btn {
  background: var(--off-white); border: 1.5px solid var(--border); border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 8px 16px; margin-right: 3px;
  font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 800; color: var(--muted);
  cursor: pointer; position: relative; bottom: -2px;
  transition: background .15s, color .15s;
}
.tab-btn.active { background: #fff; color: var(--purple); border-color: var(--border); border-bottom-color: #fff; z-index: 1; }
.tab-btn:hover:not(.active) { background: var(--purple-pale); color: var(--purple); }

.panel {
  background: #fff; border: 1.5px solid var(--border);
  border-top: none; border-radius: 0 var(--radius) var(--radius) var(--radius);
  padding: 20px 22px; margin-bottom: 14px; box-shadow: var(--shadow-sm);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* wiki typography */
.wiki h2 {
  font-size: 16.5px; font-weight: 900; color: var(--purple);
  border-bottom: 2px solid var(--pink-light); padding-bottom: 4px; margin: 20px 0 10px;
}
.wiki h2:first-child { margin-top: 0; }
.wiki h3 { font-size: 14px; font-weight: 900; color: var(--pink); margin: 14px 0 6px; }
.wiki h4 { font-size: 13px; font-weight: 800; color: var(--purple); margin: 10px 0 5px; }
.wiki p  { font-size: 13.5px; line-height: 1.8; color: var(--text); margin-bottom: 10px; }
.wiki ul, .wiki ol { padding-left: 22px; margin-bottom: 10px; }
.wiki li { font-size: 13.5px; line-height: 1.7; margin-bottom: 3px; }
.wiki blockquote {
  background: var(--purple-pale); border-left: 4px solid var(--purple-mid);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px; margin: 12px 0; font-style: italic; color: var(--muted);
  font-size: 13px;
}
.wiki blockquote cite { display: block; margin-top: 5px; font-size: 11.5px; font-weight: 700; font-style: normal; color: var(--purple); }
.wiki .source-note {
  font-size: 11.5px; color: var(--muted); background: var(--off-white);
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  padding: 6px 10px; margin: 8px 0;
}
.wiki .source-note a { font-size: 11.5px; }
.wiki hr { border: none; border-top: 2px dashed var(--pink-light); margin: 18px 0; }

/* infobox */
.infobox {
  float: right; clear: right; margin: 0 0 16px 20px; width: 210px;
  background: var(--purple-pale); border: 1.5px solid var(--purple-mid);
  border-radius: var(--radius); overflow: hidden; font-size: 12px;
}
.infobox-title {
  background: linear-gradient(90deg, var(--purple), #5b1a8a); color: #fff;
  padding: 7px 10px; font-family: 'Nunito', sans-serif; font-weight: 900;
  font-size: 12px; text-align: center;
}
.infobox-img {
  width: 100%; height: 120px; overflow: hidden;
  background: linear-gradient(135deg, var(--purple-mid), var(--pink-light));
  display: flex; align-items: center; justify-content: center; font-size: 44px;
}
.infobox-img img { width: 100%; height: 100%; object-fit: cover; }
.infobox-row { display: flex; padding: 5px 10px; border-top: 1px solid var(--border); }
.infobox-row .ik { color: var(--muted); font-weight: 800; min-width: 68px; flex-shrink: 0; }
.infobox-row .iv { color: var(--text); font-weight: 600; }

/* dynamic/type cards */
.dynamic-cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 12px 0; }
.dcard {
  border: 2px solid var(--border); border-radius: var(--radius);
  padding: 14px 12px; text-align: center; transition: transform .15s, box-shadow .15s;
}
.dcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.dcard.alpha  { border-color: #c0392b; background: #fff5f3; }
.dcard.beta   { border-color: #2980b9; background: #f0f8ff; }
.dcard.omega  { border-color: var(--pink); background: var(--pink-pale); }
.dcard .dc-icon { font-size: 32px; margin-bottom: 6px; }
.dcard .dc-name {
  font-family: 'Lilita One', cursive; font-size: 17px;
  margin-bottom: 6px;
}
.dcard.alpha .dc-name { color: #c0392b; }
.dcard.beta  .dc-name { color: #2980b9; }
.dcard.omega .dc-name { color: var(--pink); }
.dcard .dc-trait { font-size: 11.5px; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.dcard .dc-desc  { font-size: 12px; line-height: 1.55; color: var(--text); }

/* image gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.gal-item {
  border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--purple-pale); transition: transform .15s, box-shadow .15s;
}
.gal-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.gal-thumb {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
  background: linear-gradient(135deg, var(--purple-mid), var(--pink-light));
}
.gal-thumb-placeholder {
  width: 100%; aspect-ratio: 1;
  background: linear-gradient(135deg, var(--purple-pale), var(--pink-pale));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; font-size: 28px;
}
.gal-caption { padding: 7px 9px; }
.gal-caption .gc-title { font-weight: 800; font-size: 12px; color: var(--text); line-height: 1.3; }
.gal-caption .gc-artist { font-size: 11px; color: var(--muted); margin-top: 2px; }
.gal-caption .gc-artist a { color: var(--purple); font-size: 11px; }
.gal-caption .gc-src { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.gal-caption .gc-src a { font-size: 10.5px; color: var(--teal); }

/* fic recs table */
.fic-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.fic-table th {
  background: var(--purple-pale); color: var(--purple);
  font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 12px;
  padding: 7px 10px; text-align: left; border-bottom: 2px solid var(--border);
}
.fic-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.fic-table tr:nth-child(even) td { background: var(--off-white); }
.fic-table tr:hover td { background: var(--purple-pale); }
.fic-table .fic-title a { font-weight: 800; color: var(--purple); }
.fic-table .fic-title a:hover { color: var(--pink); }
.fic-table .ship-tag {
  background: var(--pink-pale); border: 1px solid var(--pink-light);
  border-radius: 10px; padding: 1px 7px; font-size: 11px; font-weight: 700;
  color: var(--pink); white-space: nowrap;
}
.fic-table .rating-tag {
  border-radius: 10px; padding: 1px 7px; font-size: 11px; font-weight: 800; white-space: nowrap;
}
.rt-t   { background: #e8f8e8; color: #2e7d32; border: 1px solid #a5d6a7; }
.rt-m   { background: #fff8e1; color: #e65100; border: 1px solid #ffcc80; }
.rt-e   { background: #fce4ec; color: #c62828; border: 1px solid #ef9a9a; }

/* giscus wrapper */
.giscus-wrap {
  margin-top: 20px; padding-top: 18px;
  border-top: 2px dashed var(--pink-light);
}
.giscus-wrap h3 {
  font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 900;
  color: var(--purple); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.giscus-wrap h3::after {
  content: ''; flex: 1; height: 2px;
  background: linear-gradient(90deg, var(--pink-light), transparent);
}

/* ── FOOTER ───────────────────────────────────────────────── */
#footer {
  background: linear-gradient(135deg, #5b1a8a 0%, #a8246e 60%, #c0392b 100%);
  color: rgba(255,255,255,.8); text-align: center;
  padding: 18px 20px; margin-top: 14px; font-size: 12px;
}
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-bottom: 8px; }
.footer-links a { color: var(--gold); font-weight: 800; }
.footer-links a:hover { text-decoration: underline; }
#footer p { color: rgba(255,255,255,.65); font-size: 11px; }
#footer a { color: var(--gold); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  #layout { grid-template-columns: 1fr; }
  #left-col,#right-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  #left-col .widget, #right-col .widget { margin-bottom: 0; }
  .dynamic-cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .infobox { float: none; width: 100%; margin: 0 0 14px; }
}
@media (max-width: 560px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .brand-name { font-size: 22px; }
  #left-col,#right-col { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .fic-table .hide-sm { display: none; }
}

/* ── UTILITY ──────────────────────────────────────────────── */
.mt-0 { margin-top: 0 !important; }
.mb-10 { margin-bottom: 10px; }
.mb-14 { margin-bottom: 14px; }
.center { text-align: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.badge {
  display: inline-block; border-radius: 10px; padding: 1.5px 9px;
  font-size: 11px; font-weight: 900; color: #fff;
}
.badge-pink   { background: var(--pink); }
.badge-purple { background: var(--purple); }
.badge-teal   { background: var(--teal); }
.badge-gold   { background: var(--gold); color: var(--ink); }
.clearfix::after { content: ''; display: table; clear: both; }
