/* The Community Hub — wiki skin.
   Flat, bordered, text-first. Community colours appear only as small accents
   (infobox headers, the sidebar rule, link colours in dark mode). */

:root {
  /* light mode: warm peach / soft orange instead of stark white */
  --page-bg: #ffd9b3;
  --content-bg: #fff1e2;
  --text: #2b1a10;
  --muted: #6e4f3a;
  --border: #d49a68;
  --border-soft: #ebc39d;
  --rule: #f0a868;
  --link: #2450a8;
  --link-visited: #7a3fa0;
  --link-new: #c0392b;
  --box-bg: #ffe6cc;
  --box-head: #ffd2a6;
  --hl: #fff4c2;
  --pink: #d02f84;
  --teal: #12708d;
  --ok: #0f7a5f;
  --warn: #9a5400;
  --bad: #b32424;
  --input-bg: #fffaf4;
  --serif: "Linux Libertine", "Georgia", "Times", "Source Serif Pro", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Lato", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: #101418;
    --content-bg: #16191d;
    --text: #eaecf0;
    --muted: #a2a9b1;
    --border: #54595d;
    --border-soft: #3a3f44;
    --rule: #2c4a63;
    --link: #88a3e8;
    --link-visited: #a799cd;
    --link-new: #fd7865;
    --box-bg: #1d2125;
    --box-head: #262a2f;
    --hl: #3a2e12;
    --pink: #f07ab8;
    --teal: #5cc3e0;
    --ok: #4dc9a6;
    --warn: #f0b04a;
    --bad: #fd7865;
    --input-bg: #16191d;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page-bg); color: var(--text); font: 15px/1.6 var(--sans); }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a.external::after { content: "↗"; font-size: .75em; margin-left: 2px; vertical-align: super; line-height: 0; color: var(--muted); }
code { font-family: var(--mono); font-size: .88em; background: var(--box-bg); border: 1px solid var(--border-soft); padding: 1px 4px; border-radius: 2px; }
.muted { color: var(--muted); }
.small { font-size: .86em; }
.hidden { display: none !important; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--content-bg); padding: 6px 10px; border: 1px solid var(--border); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }

/* ---------- page frame ---------- */
.page { display: grid; grid-template-columns: 176px minmax(0, 1fr); max-width: 1500px; margin: 0 auto; min-height: 100vh; }
.sidebar { padding: 12px 10px 24px 14px; font-size: .86em; }
.logo { display: block; width: 135px; height: 135px; margin: 4px auto 18px 4px; }
.logo img { width: 135px; height: 135px; display: block; }
.portal { margin: 0 0 18px 4px; }
.portal h3 {
  margin: 0 0 6px; padding-bottom: 3px; font: 600 .86em var(--sans); color: var(--muted);
  border-bottom: 1px solid; border-image: linear-gradient(90deg, var(--pink), var(--teal) 60%, transparent) 1;
}
.portal ul { list-style: none; margin: 0; padding: 0 0 0 4px; }
.portal li { padding: 2px 0; line-height: 1.35; }
.portal a[aria-current="page"] { color: var(--text); font-weight: 600; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 10px 0 0; min-height: 52px; }
.tabs { display: flex; gap: 2px; padding-left: 1px; }
.tabs a {
  display: block; padding: 6px 12px 5px; font-size: .86em; background: var(--box-bg);
  border: 1px solid var(--rule); border-bottom: 0; color: var(--link);
}
.tabs a.selected { background: var(--content-bg); color: var(--text); position: relative; top: 1px; }
.search { display: flex; margin: 0 14px 6px 0; }
.search input {
  width: 260px; font: inherit; font-size: .9em; padding: 5px 8px; color: var(--text);
  background: var(--input-bg); border: 1px solid var(--border); border-right: 0; border-radius: 2px 0 0 2px;
}
.search button, .search-big button {
  font: inherit; font-size: .9em; padding: 5px 12px; cursor: pointer; color: var(--text);
  background: var(--box-bg); border: 1px solid var(--border); border-radius: 0 2px 2px 0;
}
.search button:hover, .search-big button:hover { background: var(--box-head); }

.content {
  background: var(--content-bg); border: 1px solid var(--rule); border-right: 0;
  padding: 18px 24px 24px; flex: 1; line-height: 1.6;
}
.firstHeading {
  font: 400 1.85em/1.3 var(--serif); margin: 0 0 2px; padding-bottom: 2px; border-bottom: 1px solid var(--border);
}
.siteSub { font-size: .86em; color: var(--muted); margin: 4px 0 14px; }
.body-content { overflow-wrap: anywhere; }
.body-content::after { content: ""; display: block; clear: both; }
.body-content h2 {
  font: 400 1.5em/1.3 var(--serif); margin: 1.1em 0 .4em; padding-bottom: 2px;
  border-bottom: 1px solid var(--border); overflow: hidden;
}
.body-content h3 { font: 700 1.08em/1.4 var(--sans); margin: .9em 0 .3em; }
.body-content h4 { font: 700 1em/1.4 var(--sans); margin: .8em 0 .2em; }
.body-content p { margin: .4em 0 .6em; }
.body-content ul, .body-content ol { margin: .3em 0 .6em 1.6em; padding: 0; }
.body-content li { margin-bottom: .15em; }
.hatnote { font-style: italic; padding-left: 1.6em; margin: -.1em 0 .5em; color: var(--muted); }
.hatnote a { font-style: normal; }

.footer { padding: 12px 24px 28px; font-size: .78em; color: var(--muted); }
.footer p { margin: 0 0 4px; }
.footer-links { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }

/* ---------- contents box ---------- */
.toc { display: table; background: var(--box-bg); border: 1px solid var(--border); padding: 7px 14px 8px; margin: 10px 0 14px; font-size: .92em; max-width: 100%; }
.toc-title { text-align: center; font-weight: 700; margin-bottom: 4px; }
.toc ol { list-style: none; margin: 0 !important; padding: 0; }
.toc li { margin: 0 !important; }
.toc .toc-l3 { padding-left: 1.6em; }
.tocnumber { color: var(--text); padding-right: 4px; }

/* ---------- infobox ---------- */
.infobox {
  float: right; clear: right; width: 290px; margin: 0 0 14px 18px; border: 1px solid var(--border);
  background: var(--box-bg); border-collapse: collapse; font-size: .88em; line-height: 1.45;
}
.infobox th, .infobox td { padding: 4px 8px; vertical-align: top; text-align: left; }
.infobox th[scope="row"] { width: 38%; font-weight: 700; }
.ib-title {
  text-align: center !important; font: 700 1.2em/1.3 var(--sans); padding: 7px 8px !important;
  background: color-mix(in srgb, var(--accent) 30%, var(--box-bg)); border-bottom: 1px solid var(--border);
}
.ib-section { text-align: center !important; background: var(--box-head); }
.ib-image { text-align: center !important; padding: 8px !important; }
.ib-image img { width: 250px; height: 250px; object-fit: cover; display: block; margin: 0 auto; border: 1px solid var(--border-soft); }
.ib-caption { font-size: .92em; color: var(--muted); margin-top: 4px; }
.noimage {
  display: inline-grid; place-items: center; background: var(--box-head); color: var(--muted);
  font: 700 1.1em var(--serif); border: 1px solid var(--border-soft);
}
.ib-noimage { width: 250px; height: 160px; font-size: 3.2em; }

/* status words (commissions) */
.status { font-weight: 700; }
.s-open { color: var(--ok); }
.s-waitlist { color: var(--warn); }
.s-closed { color: var(--muted); font-weight: 400; }

/* ---------- tables ---------- */
.wikitable { border-collapse: collapse; background: var(--box-bg); border: 1px solid var(--border); margin: 10px 0 14px; font-size: .93em; }
.wikitable th, .wikitable td { border: 1px solid var(--border); padding: 5px 9px; vertical-align: middle; }
.wikitable th { background: var(--box-head); text-align: center; font-weight: 700; }
.wikitable td p { margin: 0; }
.roster { width: 100%; }
.roster .col-img { width: 52px; text-align: center; padding: 4px; }
.roster .col-img img { width: 40px; height: 40px; object-fit: cover; display: block; margin: 0 auto; }
.roster .noimage { font-size: .95em; }

/* ---------- galleries ---------- */
.gallery-wiki { list-style: none; margin: 8px 0 12px !important; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.gallerybox { width: 182px; margin: 0 !important; background: var(--box-bg); border: 1px solid var(--border-soft); text-align: center; }
.gallerybox .thumb { display: grid; place-items: center; height: 172px; padding: 6px; }
.gallerybox img { max-width: 160px; max-height: 160px; width: auto; height: auto; display: block; border: 1px solid var(--border-soft); }
.gallerytext { font-size: .82em; padding: 0 6px 6px; line-height: 1.35; }
.gallery-small .gallerybox { width: 122px; }
.gallery-small .gallerybox .thumb { height: 116px; padding: 4px; }
.gallery-small .gallerybox img { max-width: 106px; max-height: 106px; }

.lightbox { display: none; position: fixed; inset: 0; z-index: 100; place-items: center; padding: 56px 16px 24px; }
.lightbox:target { display: grid; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .9); }
.lightbox figure { position: relative; margin: 0; max-width: min(1200px, 100%); display: grid; gap: 8px; justify-items: center; }
.lightbox figure img { max-height: calc(100vh - 130px); width: auto; max-width: 100%; background: #fff; }
.lightbox figcaption { color: #eee; font-size: .95em; text-align: center; }
.lb-count { color: #aaa; margin-left: 8px; }
.lb-close, .lb-nav {
  position: absolute; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px;
  color: #eee; text-decoration: none !important; font-size: 2rem; line-height: 1; background: rgba(255, 255, 255, .08);
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .2); }
.lb-close { top: 10px; right: 10px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }

/* ---------- external links ---------- */
.extlinks { list-style: square; }
.exturl { color: var(--muted); font-size: .86em; font-family: var(--mono); }

/* ---------- categories ---------- */
.catlinks { clear: both; margin-top: 22px; padding: 5px 8px; border: 1px solid var(--border); background: var(--box-bg); font-size: .88em; }
.catlinks ul { display: inline; margin: 0; padding: 0; list-style: none; }
.catlinks li { display: inline; }
.catlinks li + li::before { content: " | "; color: var(--muted); }

/* ---------- main page ---------- */
.mp-welcome { text-align: center; background: var(--box-bg); border: 1px solid var(--border-soft); padding: 14px 16px 10px; margin-bottom: 14px; }
.mp-title { font: 400 1.9em/1.25 var(--serif); margin: 0 0 4px; }
.mp-welcome p { margin: 2px 0; }
.mp-stats { font-size: .9em; }
.mp-columns { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.mp-col { display: grid; gap: 14px; }
.mp-box { border: 1px solid var(--border-soft); padding: 0 12px 6px; background: var(--content-bg); overflow: hidden; }
.mp-box h2 {
  font: 700 1.05em/1.4 var(--sans) !important; margin: 0 -12px 8px !important; padding: 5px 12px !important;
  background: var(--box-head); border-bottom: 1px solid var(--border-soft) !important;
}
.mp-col:first-child .mp-box h2 { border-left: 3px solid var(--pink); }
.mp-col:last-child .mp-box h2 { border-left: 3px solid var(--teal); }
.thumb.tright { float: right; clear: right; margin: 2px 0 8px 14px; border: 1px solid var(--border-soft); background: var(--box-bg); padding: 3px; font-size: .84em; width: 330px; max-width: 50%; }
.thumb.tright img { display: block; width: 100%; height: auto; border: 1px solid var(--border-soft); }
.thumb.tright figcaption { padding: 4px 2px 1px; line-height: 1.35; color: var(--text); }
.mp-banner { margin-top: 2px; }
.featured { display: flow-root; }
.featured-img { float: left; margin: 4px 12px 4px 0; }
.featured-img img, .featured-img .noimage { width: 96px; height: 96px; object-fit: cover; border: 1px solid var(--border-soft); display: block; }
.featured-img .noimage { font-size: 2em; }
.mp-more { color: var(--muted); border-top: 1px solid var(--border-soft); padding-top: 4px; margin-top: 8px !important; }
.hlist { line-height: 1.8; }

/* ---------- search ---------- */
.search-big { display: flex; max-width: 560px; margin: 4px 0 12px; }
.search-big input { flex: 1; font: inherit; padding: 6px 9px; color: var(--text); background: var(--input-bg); border: 1px solid var(--border); border-right: 0; }
.search-info { color: var(--muted); }
.search-results { list-style: none; margin: 0 !important; padding: 0; }
.search-results li { margin-bottom: 14px !important; }
.sr-title { font-size: 1.05em; }
.sr-kind { font-size: .8em; color: var(--muted); border: 1px solid var(--border-soft); padding: 0 5px; margin-left: 4px; }
.sr-snippet { font-size: .9em; color: var(--muted); }
.noarticle { border: 1px solid var(--border-soft); background: var(--box-bg); padding: 10px 14px; }

/* ---------- forms + notices (public + editor) ---------- */
.form { display: grid; gap: 14px; max-width: 760px; }
.form label { display: grid; gap: 4px; font-weight: 600; font-size: .95em; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; color: var(--text); background: var(--input-bg);
  border: 1px solid var(--border); border-radius: 2px; padding: 6px 8px; width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
.form textarea { resize: vertical; font-family: var(--mono); font-size: .9em; line-height: 1.5; }
.form input[type="color"] { padding: 2px; height: 36px; width: 80px; cursor: pointer; }
.form input[type="file"] { padding: 5px; }
.form .check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.form .check input { width: auto; }
.form fieldset { border: 1px solid var(--border-soft); padding: 10px 14px 14px; margin: 0; display: grid; gap: 12px; background: var(--content-bg); }
.form legend { font-weight: 700; padding: 0 6px; }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hp { position: absolute !important; left: -9999px; }

.btn {
  display: inline-block; font: inherit; font-weight: 700; font-size: .95em; padding: 6px 14px; cursor: pointer;
  color: #fff; background: #36c; border: 1px solid #36c; border-radius: 2px; text-decoration: none !important;
}
.btn:hover { background: #447ff5; border-color: #447ff5; color: #fff; }
.btn-danger { background: var(--content-bg); color: var(--bad); border-color: var(--bad); }
.btn-danger:hover { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn-small { padding: 3px 9px; font-size: .85em; }

.notice { border: 1px solid var(--border-soft); border-left: 4px solid var(--teal); background: var(--box-bg); padding: 8px 12px; margin: 0 0 14px; }
.notice.ok { border-left-color: var(--ok); }
.notice.err { border-left-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, var(--box-bg)); }
.link-notice { border-left-color: var(--pink); }

/* ---------- editor (/admin) ---------- */
.admin { background: var(--page-bg); }
.admin .site-header { background: var(--content-bg); border-bottom: 1px solid var(--border-soft); }
.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 52px; flex-wrap: wrap; padding: 4px 0; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; text-decoration: none !important; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.admin-nav a { padding: 4px 10px; font-size: .92em; }
.admin-nav a:hover { background: var(--box-bg); text-decoration: none; }
.admin-user { margin-left: auto; }
.admin-main { padding: 20px 0 48px; max-width: 980px; }
.admin-main h1 { font: 400 1.75em/1.3 var(--serif); border-bottom: 1px solid var(--border); padding-bottom: 2px; margin: 0 0 14px; }
.admin-main h2 { font: 400 1.35em/1.3 var(--serif); border-bottom: 1px solid var(--border); margin: 22px 0 10px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.card { background: var(--content-bg); border: 1px solid var(--border-soft); padding: 12px; color: var(--text); }
.stat { display: grid; gap: 2px; text-align: center; text-decoration: none !important; }
.stat:hover { border-color: var(--link); }
.stat b { font: 400 1.8em var(--serif); }
.stat span { color: var(--muted); font-size: .9em; }
.table { width: 100%; border-collapse: collapse; background: var(--content-bg); border: 1px solid var(--border); font-size: .93em; }
.table th, .table td { border: 1px solid var(--border-soft); padding: 6px 9px; text-align: left; vertical-align: middle; }
.table th { background: var(--box-head); font-weight: 700; }
.avatar { object-fit: cover; display: block; }
.avatar-sm { width: 36px; height: 36px; }
.avatar-xl { width: 120px; height: 120px; border: 1px solid var(--border-soft); margin-top: 6px; }
.danger-zone { margin-top: 32px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.inline-form { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-items: end; max-width: none; }
.gallery-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gallery-admin-item { display: grid; gap: 4px; border: 1px solid var(--border-soft); background: var(--box-bg); padding: 6px; }
.gallery-admin-item img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.form .gallery-admin-item input { padding: 3px 6px; font-size: .85em; }

/* ---------- mobile ---------- */
.mobile-bar { display: none; }
@media (max-width: 860px) {
  .page { display: block; }
  .sidebar { display: none; }
  .mobile-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--content-bg); border-bottom: 1px solid var(--border-soft); padding: 6px 12px; position: relative;
  }
  .mobile-brand { display: flex; align-items: center; gap: 8px; color: var(--text); font: 400 1.15em var(--serif); }
  .mobile-menu summary { list-style: none; cursor: pointer; padding: 5px 12px; border: 1px solid var(--border); background: var(--box-bg); font-size: .9em; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu[open] summary { background: var(--box-head); }
  .mobile-menu-panel {
    position: absolute; right: 8px; left: 8px; top: calc(100% + 4px); z-index: 30; background: var(--content-bg);
    border: 1px solid var(--border); padding: 12px 14px 2px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
  }
  .mobile-menu-panel .portal { margin-left: 0; }
  .topbar { padding: 8px 12px 0; flex-wrap: wrap-reverse; }
  .search { margin: 0; flex: 1 1 100%; }
  .search input { width: auto; flex: 1; min-width: 0; }
  .content { border-left: 0; padding: 14px 14px 20px; }
  .footer { padding: 12px 14px 24px; }
  .infobox { float: none; width: 100%; margin: 0 0 14px; }
  .ib-image img { width: 200px; height: 200px; }
  .mp-columns { grid-template-columns: 1fr; }
  .thumb.tright { float: none; width: auto; max-width: none; margin: 0 0 10px; }
  .roster { display: block; overflow-x: auto; }
  .roster th:nth-child(4), .roster td:nth-child(4) { display: none; }
  .gallerybox { width: calc(50% - 5px); }
  .gallerybox .thumb, .gallery-small .gallerybox .thumb { display: block; height: auto; aspect-ratio: 1; padding: 6px; }
  .gallerybox img, .gallery-small .gallerybox img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; border: 0; }
  .gallery-small { gap: 6px; }
  .gallery-small .gallerybox { width: calc(25% - 4.5px); }
  .gallery-small .gallerytext { font-size: .72em; }
  .lb-nav { top: auto; bottom: 14px; transform: none; }
}
@media (max-width: 420px) {
  .mobile-menu-panel { grid-template-columns: 1fr; }
}

/* ================= a little more fun ================= */
:root { --purple: #7b44b8; --orange: #e8731a; }
@media (prefers-color-scheme: dark) { :root { --purple: #b48ae6; --orange: #f5a25a; } }

/* Fandom-style: the group banner, blurred, behind the whole wiki */
body.wiki { background: transparent; }
body.wiki::before {
  content: ""; position: fixed; inset: -30px; z-index: -2;
  background: url("/img/banner.webp") center 30% / cover no-repeat;
  filter: blur(8px) saturate(1.15);
}
body.wiki::after {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--page-bg) 80%, transparent);
}

/* logo-colour stripe across the top */
.stripe { height: 5px; background: linear-gradient(90deg, var(--pink) 0 25%, var(--purple) 25% 50%, var(--teal) 50% 75%, var(--orange) 75%); }

/* sidebar sits on a frosted panel so it reads over the art */
.sidebar { background: color-mix(in srgb, var(--content-bg) 70%, transparent); backdrop-filter: blur(4px); border-right: 1px solid var(--border-soft); }
.logo img { transition: transform .25s ease; }
.logo:hover img { transform: rotate(-6deg) scale(1.05); }
.portal li a:hover { text-decoration: none; background: color-mix(in srgb, var(--pink) 12%, transparent); }
.portal li a { padding: 1px 4px; margin-left: -4px; border-radius: 3px; }
.topbar { padding-left: 4px; }
.footer { background: color-mix(in srgb, var(--page-bg) 70%, transparent); }

/* section headings get a little two-tone underline */
.body-content h2 {
  background: linear-gradient(90deg, var(--pink), var(--teal)) left bottom / 72px 3px no-repeat;
}
.firstHeading { border-bottom: 0; background: linear-gradient(90deg, var(--pink), var(--purple), var(--teal), var(--orange)) left bottom / 100% 2px no-repeat; padding-bottom: 4px; }

/* infobox header in the person's own colour */
.ib-title { background: color-mix(in srgb, var(--accent) 55%, var(--box-bg)); }
.ib-image img { border-radius: 4px; }

/* commission status as a little tag */
.status { display: inline-block; padding: 0 7px; border-radius: 3px; line-height: 1.5; }
.s-open { background: color-mix(in srgb, var(--ok) 14%, transparent); }
.s-waitlist { background: color-mix(in srgb, var(--warn) 14%, transparent); }
.s-closed { background: var(--box-head); }

/* main page */
.mp-welcome {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 8% 120%, color-mix(in srgb, var(--pink) 22%, transparent), transparent 45%),
    radial-gradient(circle at 92% -20%, color-mix(in srgb, var(--teal) 22%, transparent), transparent 45%),
    var(--box-bg);
}
.mp-logo { width: 84px; height: 84px; margin: 0 auto 2px; display: block; transition: transform .3s ease; }
.mp-welcome:hover .mp-logo { transform: rotate(8deg) scale(1.06); }
.mp-col .mp-box:nth-child(1) h2 { border-left-color: var(--pink); }
.mp-col .mp-box:nth-child(2) h2 { border-left-color: var(--purple); }
.mp-col:last-child .mp-box:nth-child(1) h2 { border-left-color: var(--teal); }
.mp-col:last-child .mp-box:nth-child(2) h2 { border-left-color: var(--orange); }
.mp-col:last-child .mp-box:nth-child(3) h2 { border-left-color: var(--pink); }
.mp-col:last-child .mp-box:nth-child(4) h2 { border-left-color: var(--purple); }
.mp-box h2 { background: color-mix(in srgb, var(--box-head) 80%, transparent); }
.mp-dyk ul { list-style: none; margin-left: 0 !important; }
.mp-dyk li { padding-left: 1.4em; position: relative; }
.mp-dyk li::before { content: "✦"; position: absolute; left: 0; color: var(--pink); }
.mp-dyk li:nth-child(2n)::before { color: var(--teal); }

/* galleries + rosters: a bit of bounce */
.gallerybox { transition: transform .15s ease, border-color .15s ease; }
.gallerybox:hover { transform: translateY(-2px) rotate(-.6deg); border-color: var(--pink); }
.gallerybox:nth-child(2n):hover { transform: translateY(-2px) rotate(.6deg); border-color: var(--teal); }
.roster tbody tr:hover td { background: color-mix(in srgb, var(--pink) 6%, var(--box-bg)); }
.roster .col-img img { border-radius: 50%; }
.featured-img img { border-radius: 4px; }

/* buttons in the community colours */
.btn { background: var(--pink); border-color: var(--pink); }
.btn:hover { background: color-mix(in srgb, var(--pink) 85%, #000); border-color: color-mix(in srgb, var(--pink) 85%, #000); }
@media (prefers-color-scheme: dark) { .btn { color: #16191d; } .btn:hover { color: #16191d; background: color-mix(in srgb, var(--pink) 85%, #fff); } }

/* editor keeps a plain background */
body.admin::before, body.admin::after { content: none; }

@media (max-width: 860px) {
  .sidebar { background: none; backdrop-filter: none; }
  .mobile-bar { border-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .logo img, .mp-logo, .gallerybox { transition: none; }
  .logo:hover img, .mp-welcome:hover .mp-logo, .gallerybox:hover { transform: none; }
}

/* stub notice */
.stub { display: flex; align-items: center; gap: 12px; padding: 8px 12px; margin: 6px 0 10px; max-width: 640px;
  background: var(--box-bg); border: 1px solid var(--border-soft); border-left: 4px solid var(--purple); font-size: .93em; }
.stub img { flex: none; transform: rotate(-8deg); }
.stub p { margin: 0 !important; }

/* ================= trading cards (list pages) ================= */
.roster-bar {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px;
  padding: 8px 12px; margin: 4px 0 14px; font-size: .93em;
  background: var(--box-bg); border: 1px solid var(--border-soft); border-left: 4px solid var(--pink);
}
.roster-bar-label { font-weight: 700; margin-right: 4px; }
.roster-bar .sep { color: var(--pink); font-size: .8em; }
.roster-bar .sep:nth-of-type(2n) { color: var(--teal); }

.tcg-grid {
  display: grid; gap: 22px 18px; margin: 14px 0 8px;
  grid-template-columns: repeat(auto-fill, minmax(206px, 1fr));
  perspective: 900px;
}
.tcg {
  --card-ink: #2b1a10;
  --card-paper: color-mix(in srgb, var(--accent) 10%, #fff8ee);
  position: relative; display: block; aspect-ratio: 63 / 88; border-radius: 14px; padding: 8px;
  color: var(--card-ink); text-decoration: none !important;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 85%, #fff) 0%, var(--accent) 45%, color-mix(in srgb, var(--accent) 70%, #000) 100%);
  box-shadow: 0 2px 0 rgba(0,0,0,.25), 0 6px 14px rgba(60, 30, 10, .22);
  transition: transform .22s cubic-bezier(.2,.8,.3,1.2), box-shadow .22s ease;
  overflow: hidden; isolation: isolate;
}
.tcg:hover, .tcg:focus-visible {
  transform: translateY(-10px) rotateX(4deg) rotate(-.8deg) scale(1.03);
  box-shadow: 0 4px 0 rgba(0,0,0,.2), 0 22px 34px rgba(60, 30, 10, .35);
  z-index: 2;
}
.tcg:nth-child(2n):hover, .tcg:nth-child(2n):focus-visible { transform: translateY(-10px) rotateX(4deg) rotate(.8deg) scale(1.03); }

.tcg-frame {
  height: 100%; display: flex; flex-direction: column; gap: 5px; padding: 6px;
  border-radius: 8px; background: var(--card-paper);
  border: 2px solid color-mix(in srgb, var(--accent) 55%, #000);
}
.tcg-head {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 3px 7px; border-radius: 12px 12px 4px 4px;
  background: linear-gradient(180deg, #fffdf8, color-mix(in srgb, var(--accent) 22%, #fff4e6));
  border: 1px solid color-mix(in srgb, var(--accent) 45%, #000);
}
.tcg-name { font: 700 1em/1.2 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcg-icon { font-size: .8em; flex: none; }
.tcg-art {
  flex: 1 1 0; min-height: 64px; overflow: hidden; border-radius: 3px;
  border: 2px solid color-mix(in srgb, var(--accent) 50%, #000);
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 35%, #fff), color-mix(in srgb, var(--accent) 70%, #000));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
}
.tcg-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tcg-noart { display: grid; place-items: center; height: 100%; font: 700 3.4em var(--serif); color: rgba(255,255,255,.88); text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.tcg-typeline {
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  font-size: .74em; font-weight: 700; padding: 2px 7px; border-radius: 3px;
  background: linear-gradient(180deg, #fffdf8, color-mix(in srgb, var(--accent) 18%, #fff4e6));
  border: 1px solid color-mix(in srgb, var(--accent) 45%, #000);
}
.tcg-typeline span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcg-rarity { color: color-mix(in srgb, var(--accent) 60%, #000); letter-spacing: 1px; flex: none; }
.tcg-text {
  flex: 0 1 auto; min-height: 44px; max-height: 50%; overflow: hidden; padding: 4px 7px; border-radius: 3px;
  font-size: .74em; line-height: 1.38; background: #fffdf8;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, #000);
}
.tcg-text p { margin: 0 0 3px; }
.tcg-text b { color: color-mix(in srgb, var(--accent) 55%, #000); }
.tcg-text code { font-size: .95em; padding: 0 3px; background: transparent; }
.tcg-text .status { padding: 0 5px; }
.tcg-flavor { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--serif); font-style: italic; color: #6e4f3a; border-top: 1px solid color-mix(in srgb, var(--accent) 25%, #e8d6c2); padding-top: 3px; margin-top: 4px !important; }
.tcg-foot { display: flex; align-items: center; gap: 5px; font-size: .62em; font-weight: 700; letter-spacing: .04em; color: color-mix(in srgb, var(--accent) 45%, #000); padding: 0 2px; }
.tcg-foot img { width: 14px; height: 14px; }
.tcg-foot-r { margin-left: auto; text-transform: uppercase; }

/* foil shine that sweeps across on hover */
.tcg-shine {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 45%, rgba(255,215,240,.35) 50%, rgba(190,255,255,.35) 55%, transparent 70%);
  background-size: 250% 100%; background-position: 150% 0; mix-blend-mode: soft-light; opacity: 0;
  transition: background-position .7s ease, opacity .3s ease;
}
.tcg:hover .tcg-shine, .tcg:focus-visible .tcg-shine { opacity: 1; background-position: -50% 0; }

/* rare cards get a faint permanent foil */
.tcg:has(.tcg-rarity[title="Legendary"]) .tcg-frame { box-shadow: inset 0 0 0 2px rgba(255, 215, 120, .9), inset 0 0 18px rgba(255, 200, 80, .35); }
.tcg:has(.tcg-rarity[title="Rare"]) .tcg-frame { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8), inset 0 0 12px rgba(180, 220, 255, .35); }

@media (prefers-color-scheme: dark) {
  .tcg { box-shadow: 0 2px 0 rgba(0,0,0,.5), 0 8px 18px rgba(0,0,0,.5); }
  .tcg:hover, .tcg:focus-visible { box-shadow: 0 4px 0 rgba(0,0,0,.4), 0 24px 36px rgba(0,0,0,.6); }
}
@media (max-width: 860px) {
  .tcg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .tcg { padding: 5px; border-radius: 10px; }
  .tcg-frame { padding: 4px; gap: 3px; }
  .tcg-name { font-size: .88em; }
  .tcg-text { font-size: .66em; padding: 3px 5px; }
  .tcg-typeline { font-size: .64em; padding: 1px 5px; }
  .tcg-foot { font-size: .55em; }
}
@media (prefers-reduced-motion: reduce) {
  .tcg, .tcg-shine { transition: none; }
  .tcg:hover, .tcg:focus-visible, .tcg:nth-child(2n):hover { transform: none; }
}

/* editor: upload status under file inputs */
.upload-status { display: block; font-weight: 400; color: var(--ok); margin-top: 2px; }
.upload-status.warn { color: var(--warn); }
