:root {
  --bg: #0a0b18;
  --panel: #13152a;
  --panel-2: #1b1e38;
  --line: #262a4a;
  --text: #eef0ff;
  --muted: #959bc4;
  --accent: #5b8cff;
  --accent-2: #a35bff;
  --t1: #4fc3f7;
  --t2: #ff4f8b;
  --t3: #ffb347;
  --t4: #b388ff;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
/* the slow glide to the archive is done in app.js (SCROLL_MS) */
#archive { scroll-margin-top: 70px; } /* stop below the sticky header, not under it */
body {
  background: var(--bg);
  background-image: radial-gradient(1200px 500px at 80% 110%, #241448 0%, transparent 60%),
                    radial-gradient(900px 400px at -10% 60%, #10224a 0%, transparent 55%);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
}
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .7em 1.2em; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
  transition: transform .12s, background .12s, border-color .12s;
}
.btn:hover { transform: translateY(-1px); border-color: #4a4160; }
.btn.small { padding: .45em .9em; font-size: 13px; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 0; }
.btn.ghost { background: transparent; }
.btn.patreon { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 0; color: #fff; }
.btn.big { padding: .95em 2em; font-size: 17px; box-shadow: 0 10px 40px rgba(91, 140, 255, .35); }
/* gradient buttons (Sign in, Go to Archives, Open Full Set, Join, Back...) light up on hover */
.btn.primary, .btn.patreon { transition: transform .15s, box-shadow .2s, filter .2s; }
.btn.primary:hover, .btn.patreon:hover {
  transform: translateY(-2px);
  filter: brightness(1.12) saturate(1.1);
  box-shadow: 0 0 0 1px rgba(196, 139, 255, .35), 0 0 26px rgba(127, 120, 255, .55), 0 12px 44px rgba(163, 91, 255, .45);
}
.btn.primary:active, .btn.patreon:active { transform: translateY(0); filter: brightness(1.05); }
/* outline buttons (Sign out, Leave): glowing edge + the text in the Details gradient */
.btn.ghost { transition: transform .15s, border-color .15s, box-shadow .2s; }
.btn.ghost:hover {
  border-color: #5b63b8; box-shadow: 0 0 18px rgba(110, 90, 255, .3);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---- hero: full-screen header with dimmed art behind ---- */
.hero {
  position: relative; min-height: calc(100vh - 62px); margin-top: -62px; padding: 120px 16px 90px;
  display: grid; place-items: center; overflow: hidden; isolation: isolate;
}
/* header background: rows of pictures drifting slowly to the right, each row at its own speed */
.hero-bg {
  position: absolute; inset: -120px -200px; z-index: -2;
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
  transform: rotate(-6deg);
}
.hero-row { display: flex; gap: 12px; width: max-content; animation: drift linear infinite; will-change: transform; }
.hero-row div { flex: none; height: 36vh; min-height: 220px; aspect-ratio: 2 / 3; background: center / cover no-repeat var(--panel-2); border-radius: 12px; }
/* each row holds its pictures twice; sliding by exactly one copy loops without a jump */
@keyframes drift { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .hero-row { animation: none; } }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at center, rgba(10, 11, 24, .55) 0%, rgba(10, 11, 24, .92) 70%),
    linear-gradient(135deg, rgba(43, 76, 200, .45), rgba(120, 50, 210, .45)),
    linear-gradient(to bottom, transparent 70%, var(--bg));
}
.hero-text { max-width: 760px; text-align: center; }
.hero-title {
  margin: 0; font-size: clamp(46px, 10vw, 104px); line-height: 1; font-weight: 800; letter-spacing: -.04em;
  text-shadow: 0 6px 40px rgba(0, 0, 0, .6);
}
.hero-title span { background: linear-gradient(135deg, #7fa6ff, #c48bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { margin: 18px 0 8px; font-size: clamp(22px, 4vw, 34px); font-weight: 700; letter-spacing: -.02em; }
.hero-sub { margin: 0 auto 30px; max-width: 560px; color: #c6cbef; font-size: 16px; }
.hero-note { margin: 18px 0 0; font-size: 12px; color: #a3a9d6; }
.hero-note a { color: #c6cbef; text-decoration: underline; text-underline-offset: 3px; }
/* on hover "Details" takes the button's blue-to-purple gradient (text + underline) */
.hero-note a:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-decoration-color: var(--accent-2);
}
.hero-down {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  font-size: 34px; line-height: 1; color: #c6cbef; animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 6px); } }
@media (prefers-reduced-motion: reduce) { .hero-down { animation: none; } }
@media (max-width: 700px) { .hero-row div { height: 26vh; min-height: 170px; } }

/* ---- header ---- */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px max(16px, calc((100vw - 1200px) / 2));
  background: rgba(10, 11, 24, .72); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
/* same "AI" gradient as the big DijiAI Hub title, and a soft glow on hover */
.logo span { background: linear-gradient(135deg, #7fa6ff, #c48bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo { transition: filter .2s; }
.logo:hover { filter: brightness(1.12) drop-shadow(0 0 10px rgba(127, 166, 255, .6)); }
.logo.big { font-size: 28px; margin-bottom: 8px; }
.account { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

/* ---- layout ---- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px 60px; }
.intro h1 { font-size: clamp(28px, 5vw, 42px); margin: 36px 0 4px; letter-spacing: -.03em; }
.intro p { margin: 0 0 22px; }

.tag {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(0,0,0,.55); border: 1px solid currentColor; backdrop-filter: blur(6px);
}
.t1 { color: var(--t1); } .t2 { color: var(--t2); } .t3 { color: var(--t3); } .t4 { color: var(--t4); }
.t0 { color: var(--muted); }

.archives { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 26px; }
.archive {
  display: flex; flex-direction: column; gap: 6px; padding: 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, transform .15s;
}
.archive:hover { border-color: #5b63b8; transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(127, 166, 255, .15), 0 10px 34px rgba(110, 90, 255, .22); }
/* same as the sets: the title takes the blue-to-purple gradient on hover */
.archive:hover strong {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.archive .tag { align-self: flex-start; }
.archive strong { font-size: 17px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: .45em 1em; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.tools { display: flex; gap: 10px; flex: 1 1 360px; justify-content: flex-end; }
.sort {
  padding: .6em 2.2em .6em 1em; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23959bc4' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--text); font: inherit; font-size: 14px; cursor: pointer; appearance: none; -webkit-appearance: none;
}
.sort:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.sort option { background: var(--panel); color: var(--text); }
.search {
  flex: 1 1 200px; max-width: 320px; padding: .6em 1em; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit;
}
.search:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }

/* ---- gallery ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.card {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); transition: transform .15s, border-color .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); border-color: #5b63b8; box-shadow: 0 0 0 1px rgba(127, 166, 255, .15), 0 10px 34px rgba(110, 90, 255, .28); z-index: 2; }
.cover { position: relative; aspect-ratio: 2 / 3; background: var(--panel-2); overflow: hidden; border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }

/* Hu Tao peeks out from behind the card's left edge on hover */
.card::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: 34%; left: -6px; width: 72px; height: 72px;
  background: url("/img/hutao-peek.png") center / contain no-repeat;
  transform: translateX(10px) rotate(0deg); opacity: 0;
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), opacity .2s;
}
.card:hover::before { transform: translateX(-46px) rotate(-14deg); opacity: 1; filter: drop-shadow(0 0 5px rgba(127, 166, 255, .4)); }
/* Easter egg: Hu Tao next to "The Archive"; click her and she teleports to an empty spot */
.egg {
  position: absolute; z-index: 4; width: 58px; height: 58px; padding: 0; border: 0; cursor: pointer;
  background: url("/img/hutao-peek.png") center / contain no-repeat; transform: rotate(-8deg);
  transition: transform .18s ease, opacity .18s ease;
}
.egg { transition: transform .18s ease, opacity .18s ease, filter .2s; }
.egg:hover { transform: rotate(8deg) scale(1.08); filter: drop-shadow(0 0 5px rgba(127, 166, 255, .4)); }
.egg.poof { transform: scale(0) rotate(180deg); opacity: 0; }
.egg.pop { animation: pop .35s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes pop { from { transform: scale(0) rotate(-180deg); opacity: 0; } to { transform: rotate(-8deg); opacity: 1; } }
.egg-face { width: 84px; height: 84px; margin: -6px auto 10px; background: url("/img/hutao-peek.png") center / contain no-repeat; animation: pop .45s cubic-bezier(.34, 1.56, .64, 1); }
/* the 🎉 keeps its own colours (the heading's gradient would paint it purple) and shakes */
.party { display: inline-block; -webkit-text-fill-color: initial; color: initial; background: none; transform-origin: 30% 80%; }
.party.shake { animation: shake .9s ease-in-out 3; }
@keyframes shake {
  0%, 100% { transform: rotate(0) scale(1); }
  15% { transform: rotate(-22deg) scale(1.15); } 30% { transform: rotate(18deg) scale(1.2); }
  45% { transform: rotate(-14deg) scale(1.15); } 60% { transform: rotate(10deg) scale(1.1); } 75% { transform: rotate(-5deg); }
}
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 10; }
@media (prefers-reduced-motion: reduce) { .party.shake { animation: none; } .confetti { display: none; } }
.egg-code {
  display: inline-flex; align-items: center; gap: 14px; margin: 0 0 6px; padding: 12px 22px;
  font: 700 26px/1 ui-monospace, Consolas, monospace; letter-spacing: .12em; color: var(--text);
  background: var(--panel-2); border: 2px dashed #6f78c9; border-radius: 14px; cursor: pointer;
}
.egg-code span { font: 600 12px/1 system-ui, sans-serif; letter-spacing: 0; color: #9db6ff; }
.egg-code:hover { border-color: var(--accent-2); }
#eggReward .contact-note { margin: 10px 0 22px; }
.egg:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 50%; }

/* the card to her left (same row) steps aside so she doesn't cover it */
.card.make-room { transform: translateX(-40px); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
@media (hover: none), (prefers-reduced-motion: reduce) { .card::before { display: none; } }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover .tag { position: absolute; top: 10px; left: 10px; }
.lock {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 10px; text-align: center;
  font-weight: 700; font-size: 13px; background: linear-gradient(transparent, rgba(0,0,0,.85));
}
.lock.buy { background: linear-gradient(transparent, rgba(20, 10, 50, .92)); color: #d9c4ff; }
.lock.open { background: linear-gradient(transparent, rgba(10, 20, 50, .85)); color: #b9ccff; }
.chip.shop { border-color: #5a3f9e; color: #c9b3ff; }
.chip.shop.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; }
.card.off .cover img { filter: saturate(.75) brightness(.8); }
.meta { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.meta strong { font-size: 14px; line-height: 1.3; }
/* hovering a set paints its name in the button's blue-to-purple gradient */
.card:hover .meta strong {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.meta .muted { font-size: 12px; }

/* ---- age gate ---- */
.gate {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: rgba(8, 6, 12, .9); backdrop-filter: blur(18px);
}
.gate[hidden] { display: none; }
.gate-box {
  max-width: 460px; width: 100%; padding: 30px 26px; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
}
.gate-box h1 { margin: 6px 0 10px; font-size: 24px; }
.gate-box p { color: var(--muted); margin: 0 0 10px; }
.gate-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

.privacy-note { font-size: 12px; color: #7d7590; margin: -12px 0 22px; }
.privacy-note a { text-decoration: underline; text-underline-offset: 3px; }
.gate-box .privacy-note { margin: 18px 0 0; }

/* ---- contact box ---- */
.contact {
  width: min(560px, calc(100vw - 32px)); padding: 40px 30px 30px; text-align: center;
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.contact::backdrop { background: rgba(6, 7, 16, .75); backdrop-filter: blur(6px); }
.contact h2 {
  margin: 0 0 14px; font-size: 28px; letter-spacing: -.02em;
  background: linear-gradient(135deg, #7fa6ff, #c48bff); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.contact p { color: var(--muted); margin: 0 0 26px; }
.contact .contact-note { font-size: 12px; color: #6c7299; margin: 24px 0 0; }
.contact-x {
  position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: transparent; color: var(--muted); font-size: 24px; cursor: pointer;
}
.contact-x:hover { background: var(--panel-2); color: var(--text); }

/* ---- admin box ---- */
.contact.admin { width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; }
.admin-form { display: grid; gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); }
.admin-form:first-of-type { border-top: 0; padding-top: 4px; }
.admin-form h3 { margin: 0; font-size: 15px; color: #9db6ff; }
.admin-form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.admin-form input, .admin-form select {
  padding: .6em .8em; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit; font-size: 14px;
}
.admin-form input:focus, .admin-form select:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.admin-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-form .btn { justify-self: start; }
.admin-form .btn:disabled { opacity: .5; cursor: wait; }
.cover-preview { width: 120px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.admin-msg { margin: 0; font-size: 13px; min-height: 1em; }
.admin-msg.ok { color: #8fd6a8; } .admin-msg.bad { color: #ff8d9e; }
.manual-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.manual-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.manual-list em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }

/* ---- pages ---- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 28px 0 0; }
.pager button {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
}
.pager button:hover:not(:disabled) { border-color: #4a5290; }
.pager button.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 0; }
.pager button:disabled { opacity: .35; cursor: default; }
.pager .dots { color: var(--muted); padding: 0 4px; }

/* ---- feature blocks ---- */
/* features: no boxes - one band between two lines, columns split by thin vertical lines */
.features {
  display: grid; grid-template-columns: repeat(6, 1fr); margin: 70px 0 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.feature { position: relative; padding: 26px 22px 28px; }
.feature + .feature { border-left: 1px solid var(--line); }
/* a thin gradient line slides in along the top on hover */
.feature::after {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.feature:hover::after { transform: scaleX(1); }
.feature svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feature:nth-child(even) svg { stroke: var(--accent-2); }
.feature:hover h3 {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* text links glow the same way: FAQ questions + links in the answers, footer links, links on Privacy/Terms */
.faq summary:hover span, .chip:not(.on):hover, .faq a:hover, .foot-cols a:hover, .doc a:not(.btn):hover, .gate-box .privacy-note a:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-decoration-color: #a35bff;
}
.faq summary:hover::after { color: #c48bff; }
/* filter buttons and the sort menu glow on hover too */
.chip, .sort, .search { transition: border-color .15s, box-shadow .15s, color .15s; }
.chip:not(.on):hover, .sort:hover, .search:hover { border-color: #5b63b8; box-shadow: 0 0 18px rgba(110, 90, 255, .25); }
/* sort menu + search box: form fields can't hold a gradient in their text, so they take its middle colour */
.sort:hover, .search:hover { color: #a99bff; }
.search:hover::placeholder { color: #a99bff; }
/* info boxes (Compliance / Cookie info): text left-aligned, a bit wider */
.contact.info { width: min(640px, calc(100vw - 32px)); text-align: left; }
.contact.info h2 { text-align: center; }
.contact.info p { margin: 0 0 14px; line-height: 1.65; }
.contact.info a:not(.btn) { color: #9db6ff; text-decoration: underline; text-underline-offset: 3px; }
.contact.info a:not(.btn):hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-decoration-color: #a35bff;
}
/* page numbers glow like the filter buttons (not the current page or a disabled arrow) */
.pager button { transition: border-color .15s, box-shadow .15s; }
.pager button:not(.on):not(:disabled):hover { box-shadow: 0 0 18px rgba(110, 90, 255, .25); }
.pager button:not(.on):not(:disabled):hover span {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* the filter buttons' text takes the gradient (like "Details") - must come after the rule above */
.chip:not(.on):hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.feature h3 { margin: 14px 0 6px; font-size: 15px; display: table; } /* only as wide as its words, so the hover gradient fits the text */
.feature p { margin: 0; color: var(--muted); font-size: 13px; }
/* smaller screens: stack as rows split by horizontal lines */
@media (max-width: 980px) {
  .features { grid-template-columns: 1fr; }
  .feature + .feature { border-left: 0; border-top: 1px solid var(--line); }
  .feature { padding: 20px 6px; }
}

/* ---- FAQ ---- */
.faq { max-width: 780px; margin: 70px auto 0; }
.faq h2 { text-align: center; font-size: clamp(22px, 4vw, 30px); letter-spacing: -.02em; margin: 0 0 22px; }
.faq h2.glow, .intro h1.glow { animation: glow 1.4s ease-out; }
@keyframes glow {
  0%   { text-shadow: 0 0 0 transparent; color: var(--text); }
  25%  { text-shadow: 0 0 18px rgba(127, 166, 255, .95), 0 0 42px rgba(164, 107, 255, .8); color: #dfe6ff; }
  100% { text-shadow: 0 0 0 transparent; color: var(--text); }
}
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 36px 18px 4px; position: relative; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--accent); transition: transform .2s; }
.faq details[open]:not(.closing) summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-a { overflow: hidden; } /* the animated answer box; overflow keeps the text inside while it grows/shrinks */
.faq-a p:first-child { margin-top: 0; padding-top: 0; }
.faq details p { margin: -6px 4px 18px; color: var(--muted); }
.faq a { color: #9db6ff; text-decoration: underline; text-underline-offset: 3px; }

/* ---- footer, toast, plain pages ---- */
.foot { margin-top: 80px; padding: 40px 16px 30px; font-size: 13px; border-top: 1px solid var(--line); background: rgba(8, 9, 20, .6); }
.foot-cols { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.foot h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #9db6ff; }
.foot-cols a, .foot-cols span { display: block; color: var(--muted); margin: 0 0 7px; }

.foot-line { text-align: center; color: #6c7299; margin: 30px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
@media (max-width: 620px) { .foot-cols { grid-template-columns: 1fr 1fr; } }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20;
  max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.toast[hidden] { display: none; }
.msg, .doc { max-width: 720px; margin: 60px auto; padding: 0 16px; }
/* Privacy / Terms pages: same look as the site's popups */
.doc {
  padding: 34px 36px 30px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.doc > p:first-child { margin: 0 0 6px; }
.doc h1 {
  margin: 10px 0 4px; font-size: clamp(30px, 6vw, 42px); letter-spacing: -.03em;
  background: linear-gradient(135deg, #7fa6ff, #c48bff); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.doc h1 + p { color: var(--muted); font-size: 13px; margin-top: 0; }
.doc h2 { font-size: 17px; margin: 30px 0 8px; color: #9db6ff; }
.doc p, .doc li { color: #c6cbef; line-height: 1.7; }
.doc ul { padding-left: 20px; }
.doc li::marker { color: var(--accent-2); }
.doc a:not(.btn) { color: #9db6ff; text-decoration: underline; text-underline-offset: 3px; }
.doc .back .btn { color: #fff; }
.doc .back { margin-top: 30px; }
@media (max-width: 520px) { .doc { padding: 26px 20px; margin: 30px auto; } }

@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .top { padding: 12px 16px; }
  .logo { font-size: 17px; }
  .search { max-width: none; }
  .who .tag { display: none; }
}

/* DijiAI's profile picture right after "DijiAI Hub" in the top bar */
.logo { display: inline-flex; align-items: center; }
.logo .pfp {
  width: 34px; height: 34px; margin-left: 10px; border-radius: 50%; object-fit: cover;
  border: 2px solid transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box, linear-gradient(135deg, #7fa6ff, #c48bff) border-box;
}
@media (max-width: 520px) { .logo .pfp { width: 28px; height: 28px; margin-left: 8px; } }

/* "Oops!" box for locked sets: Hu Tao's face on top, links glow like everywhere else */
.oops-face { width: 78px; height: 78px; margin: -6px auto 10px; background: url("/img/hutao-peek.png") center / contain no-repeat; transform: rotate(-8deg); }
#lockedBox .contact-note a { color: #9db6ff; text-decoration: underline; text-underline-offset: 3px; }
#lockedBox .contact-note a:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent; text-decoration-color: #a35bff;
}

/* private-set box: two buttons side by side (stacked on phones), links glow on hover */
.shop-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
#shopNote { line-height: 1.7; }
#shopNote a { color: #9db6ff; text-decoration: underline; text-underline-offset: 3px; }
#shopNote a:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent; text-decoration-color: #a35bff;
}

/* fields marked hidden (e.g. "Patreon post" when it isn't a shop product) really stay hidden */
.admin-form [hidden], .cover-preview[hidden] { display: none !important; }

/* "…" in the pager: clickable, turns into a small page-number box */
.pager button.dots { color: var(--muted); }
.page-jump {
  width: 58px; height: 40px; padding: 0 8px; border-radius: 10px; text-align: center;
  border: 1px solid var(--accent-2); background: var(--panel); color: var(--text); font: inherit; font-weight: 600;
  box-shadow: 0 0 18px rgba(110, 90, 255, .3); -moz-appearance: textfield;
}
.page-jump::-webkit-outer-spin-button, .page-jump::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.page-jump:focus { outline: none; }
.pager button.dots:hover { border-color: #5b63b8; box-shadow: 0 0 18px rgba(110, 90, 255, .3); }
.pager button.dots:hover span {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* logo text wrapper (keeps the space before "Hub" next to the profile picture); only "AI" gets the gradient */
.logo .lt { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: inherit; }

/* "Before you sign in" box */
.heads-up { padding: 16px 18px; margin: 4px 0 22px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .02); }
.heads-up p { margin: 0 0 10px; color: #c6cbef; }
.heads-up p:last-child { margin: 0; }
#signinBox .center { text-align: center; }
#signinBox .contact-note { margin-top: 16px; }
