:root {
  --bg: #170a2e;
  --bg2: #20103f;
  --panel: rgba(255, 255, 255, .06);
  --pink: #ff7ac8;
  --pink-soft: #ffc2e6;
  --violet: #a77bff;
  --text: #f6eaff;
  --muted: #c3acdf;
  --green: #5cf2a0;
  --red: #ff6b8a;
  --radius: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: #5a3a9a var(--bg); }
body {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
code { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; }
::selection { background: var(--pink); color: #2a0f4d; }
:focus-visible { outline: 3px solid var(--pink-soft); outline-offset: 3px; border-radius: 6px; }
section[id] { scroll-margin-top: 72px; }
h1, h2, .ip-label, .brand span { font-family: "Press Start 2P", monospace; }

/* nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px clamp(16px, 4vw, 48px);
  background: linear-gradient(#170a2ecc, #170a2e00);
  backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--pink-soft); text-decoration: none; }
.brand img { border-radius: 10px; border: 2px solid var(--pink); }
.brand span { font-size: 12px; }
.nav-start { display: flex; align-items: center; gap: 12px; min-width: 0; }
.nav-divider {
  width: 1px; align-self: stretch; min-height: 26px;
  background: linear-gradient(180deg, transparent, rgba(255, 194, 230, .55), transparent);
}
.nav-login {
  display: inline-flex; align-items: center; min-height: 34px; padding: 7px 14px;
  font: inherit; font-size: 13px; font-weight: 800; color: var(--pink-soft); text-decoration: none; white-space: nowrap;
  background: rgba(50, 24, 79, .72); border: 1px solid rgba(167, 123, 255, .45); border-radius: 9px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25);
  transition: border-color .15s, color .15s, background .15s, transform .15s;
}
.nav-login:hover { color: #fff; border-color: var(--pink); background: rgba(74, 38, 110, .9); transform: translateY(-1px); }
.nav nav { display: flex; gap: clamp(12px, 2.5vw, 28px); }
.nav nav a { color: var(--text); text-decoration: none; font-weight: 800; font-size: 15px; opacity: .85; }
.nav nav a:hover { color: var(--pink); opacity: 1; }

/* hero */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; overflow: hidden;
  padding: 110px clamp(20px, 6vw, 96px) 70px;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url("assets/hero.jpg") center / cover no-repeat;
  filter: saturate(1.1);
  animation: drift 30s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: scale(1.04); } to { transform: scale(1.12) translateX(-1.5%); } }
.hero-fade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(23,10,46,.92) 0%, rgba(23,10,46,.72) 38%, rgba(23,10,46,.15) 75%),
    linear-gradient(0deg, var(--bg) 0%, transparent 28%);
}
.hero-inner { position: relative; max-width: 640px; z-index: 2; }
h1 {
  font-size: clamp(28px, 5.2vw, 58px); line-height: 1.25; margin: 0 0 18px;
  text-shadow: 4px 4px 0 #6b2fd6, 0 0 30px rgba(255, 122, 200, .5);
}
h1 .h-line { display: block; }
h1 .accent { color: var(--pink); }
.tagline { font-size: clamp(17px, 2vw, 21px); color: var(--pink-soft); margin: 0 0 30px; max-width: 30em; }

.ip-card {
  display: inline-block; max-width: 100%;
  padding: 18px 20px 14px; border-radius: var(--radius);
  background: rgba(23, 10, 46, .82);
  border: 1px solid rgba(255, 255, 255, .14);
}
.ip-label { font-size: 9px; color: var(--muted); margin-bottom: 10px; }
.ip-copy {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  width: 100%; cursor: pointer; font: inherit; color: inherit;
  background: rgba(0, 0, 0, .3); border: 1px solid rgba(167, 123, 255, .4);
  border-radius: 12px; padding: 12px 16px; text-align: left;
  transition: border-color .2s, background-color .2s;
}
.ip-copy:hover { border-color: rgba(255, 122, 200, .7); background: rgba(255, 255, 255, .04); }
.ip-copy code { font-size: clamp(15px, 2.6vw, 22px); font-weight: 600; color: var(--text); word-break: break-all; }
.ip-action {
  margin-left: auto; font-size: 12px; font-weight: 700; color: var(--pink-soft);
  background: rgba(255, 122, 200, .14); border: 1px solid rgba(255, 122, 200, .4);
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
  transition: background-color .2s;
}
.ip-copy:hover .ip-action { background: rgba(255, 122, 200, .24); }
.ip-copy.copied .ip-action { color: var(--green); background: rgba(92, 242, 160, .14); border-color: rgba(92, 242, 160, .4); }
.status { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #888; }
.status.online .dot { background: var(--green); }
.status.offline .dot { background: var(--red); }
.status.online { color: var(--text); }

.sweepy-wrap {
  position: absolute; right: clamp(16px, 5vw, 80px); bottom: clamp(24px, 6vh, 70px);
  width: clamp(150px, 20vw, 280px); z-index: 3;
  animation: float 4s ease-in-out infinite;
}
.sweepy-btn { display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
.sweepy-btn:focus-visible { border-radius: 50%; }
.sweepy {
  display: block; width: 100%; height: auto;
  border-radius: 50%; border: 4px solid #fff;
  box-shadow: 0 0 0 6px rgba(255, 122, 200, .5), 0 0 50px rgba(255, 122, 200, .6);
  transition: box-shadow .2s;
}
.sweepy-stack { position: relative; display: block; border-radius: 50%; animation: tilt 4s ease-in-out infinite; }
.sweepy-b {
  --e: -1; --s: .4; --a: 90deg;
  position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px);
  border-radius: 50%; pointer-events: none;
  -webkit-mask-image: linear-gradient(var(--a), #000 calc(var(--e) * 100% - var(--s) * 50%), rgba(0,0,0,.844) calc(var(--e) * 100% - var(--s) * 25%), rgba(0,0,0,.5) calc(var(--e) * 100%), rgba(0,0,0,.156) calc(var(--e) * 100% + var(--s) * 25%), transparent calc(var(--e) * 100% + var(--s) * 50%));
  mask-image: linear-gradient(var(--a), #000 calc(var(--e) * 100% - var(--s) * 50%), rgba(0,0,0,.844) calc(var(--e) * 100% - var(--s) * 25%), rgba(0,0,0,.5) calc(var(--e) * 100%), rgba(0,0,0,.156) calc(var(--e) * 100% + var(--s) * 25%), transparent calc(var(--e) * 100% + var(--s) * 50%));
}
.sweepy-btn:hover .sweepy, .sweepy-btn[aria-expanded="true"] .sweepy { box-shadow: 0 0 0 6px rgba(255, 122, 200, .8), 0 0 60px rgba(255, 122, 200, .9); }
.discord-menu {
  position: absolute; right: 0; bottom: calc(100% + 14px); width: max-content; min-width: 100%;
  display: grid; gap: 8px;
  visibility: hidden; opacity: 0; transform: translateY(8px);
  transition: opacity .2s cubic-bezier(.16, 1, .3, 1), transform .2s cubic-bezier(.16, 1, .3, 1), visibility 0s .2s;
}
.sweepy-wrap:has([aria-expanded="true"]) .discord-menu { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.mc-btn {
  display: block; padding: 14px 22px; text-align: center; text-decoration: none; white-space: nowrap;
  font-family: "Press Start 2P", monospace; font-size: 13px; line-height: 1.2; color: #fff;
  text-shadow: 2px 2px #3f3f3f;
  background: #707070; border: 2px solid #000;
  box-shadow: inset -3px -3px #3a3a3a, inset 3px 3px #a8a8a8;
}
.mc-btn:hover, .mc-btn:focus-visible { background: #6f77c4; box-shadow: inset -3px -3px #3b4280, inset 3px 3px #b4baf0; text-shadow: 2px 2px #1f2350; color: #ffffa0; }
.mc-btn:active { box-shadow: inset 3px 3px #3a3a3a, inset -3px -3px #a8a8a8; }
.mc-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; border-radius: 0; }
@keyframes float { 50% { transform: translateY(-12px); } }
@keyframes tilt { 50% { transform: rotate(2deg); } }

/* join */
.join-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 28px; margin-top: 8px; }
.join-card {
  --glow: 255, 122, 200;
  padding: 20px 22px 22px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.035));
  border: 1px solid rgba(var(--glow), .3);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.09),
    0 0 0 1px rgba(var(--glow), .06),
    0 0 28px rgba(var(--glow), .16),
    0 3px 6px rgba(6,2,16,.35),
    0 26px 46px -10px rgba(6,2,16,.7);
}
.join-card:has(.badge.bedrock) { --glow: 167, 123, 255; }
.join-card .join-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 12px; }
.join-card h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--muted); }
.badge { display: inline-block; font-family: "Press Start 2P", monospace; font-size: 10px; padding: 7px 10px; border-radius: 8px; color: var(--pink-soft); background: rgba(255,122,200,.14); border: 1px solid rgba(255,122,200,.4); }
.badge.bedrock { color: #d9c6ff; background: rgba(167,123,255,.16); border-color: rgba(167,123,255,.45); }
.info { display: grid; gap: 6px; margin-bottom: 12px; padding: 10px 12px; background: rgba(0,0,0,.24); border-radius: 12px; }
.info > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.info > div > span { color: var(--muted); font-weight: 600; flex: none; }
.info b { text-align: right; min-width: 0; font-weight: 700; }
.mini-copy { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; max-width: 100%; text-align: left; cursor: pointer; font: inherit; font-size: 14px; color: var(--text); background: rgba(255,255,255,.06); border: 1px solid rgba(167,123,255,.45); border-radius: 9px; padding: 3px 5px 3px 9px; }
.mini-copy code { font-weight: 700; overflow-wrap: anywhere; }
.mini-copy em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--pink-soft); background: rgba(255,122,200,.16); border-radius: 999px; padding: 2px 9px; }
.mini-copy:hover { border-color: var(--pink); }
.mini-copy.copied em { background: var(--green); color: #0d3a24; }
.join-card .steps { gap: 8px; }
.join-card .steps li { gap: 12px; background: rgba(255,255,255,.035); padding: 9px 12px; align-items: flex-start; border-radius: 10px; }
.join-card .steps .n { width: 28px; height: 28px; font-size: 11px; border-radius: 8px; color: var(--pink-soft); background: rgba(255,122,200,.14); border: 1px solid rgba(255,122,200,.35); box-shadow: none; }
.join-card .steps h4 { margin: 0 0 1px; font-size: 15px; font-weight: 700; line-height: 1.35; }
.join-card .steps p { font-size: 14.5px; line-height: 1.45; }
.join-card .steps p b { color: var(--text); font-weight: 700; }
.tips { margin-top: 28px; padding: 22px 26px; border-radius: var(--radius); border: 1px solid rgba(167,123,255,.4); background: var(--panel); }
.tips h3 { margin: 0 0 10px; font-size: 19px; color: var(--pink-soft); }
.tips ul { margin: 0; padding-left: 20px; color: var(--muted); }
.tips li { margin: 6px 0; }
.tips code { color: var(--pink-soft); }

/* sections */
.section { padding: clamp(60px, 9vw, 110px) clamp(20px, 6vw, 96px); max-width: 1200px; margin: 0 auto; }
.section.alt { max-width: none; background: var(--bg2); }
.section.alt > * { max-width: 1008px; margin-left: auto; margin-right: auto; }
#join > * { max-width: 1180px; }
.center { text-align: center; }
h2 { font-size: clamp(18px, 3vw, 28px); margin: 0 0 26px; color: var(--pink-soft); line-height: 1.4; }

/* section titles: thin pink-to-violet frame with a slow streak of light travelling along the line */
.title-frame {
  --frame-r: 6px; --frame-w: 2px;
  position: relative; isolation: isolate; display: inline-block; vertical-align: top; max-width: 100%;
  padding: .6em .9em .66em; border-radius: var(--frame-r);
}
.title-frame > [data-edit] { position: relative; }
.tf-ring {
  position: absolute; inset: 0; padding: var(--frame-w); border-radius: inherit; pointer-events: none;
  background: linear-gradient(90deg, rgb(255 122 200 / .8), rgb(167 123 255 / .8));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
@supports (offset-path: inset(0)) {
  .tf-ring::after {
    content: ""; position: absolute; top: 0; left: 0; width: 56px; height: var(--frame-w);
    offset-path: inset(calc(var(--frame-w) / 2) round calc(var(--frame-r) - var(--frame-w) / 2)); offset-anchor: 50% 50%; offset-rotate: auto;
    background: linear-gradient(90deg, rgb(255 255 255 / 0), rgb(255 255 255 / .95), rgb(255 255 255 / 0));
    mix-blend-mode: plus-lighter;
    animation: tf-run 10s linear infinite;
  }
}
@keyframes tf-run { to { offset-distance: 100%; } }
@media (prefers-reduced-motion: reduce) { .tf-ring::after { display: none; } }
.lead { font-size: 19px; color: var(--muted); max-width: 40em; margin: 0 0 28px; }
.center .lead { margin-left: auto; margin-right: auto; }

.feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: center; margin-bottom: clamp(24px, 3.5vw, 40px); }
.feature figure { margin: 0; }
.feature.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.feature.flip figure { order: 2; }
.feature img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, .12); background: var(--bg2); }
.feature .icon { color: var(--pink); display: block; margin-bottom: 14px; }
.feature h3 { margin: 0 0 10px; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.25; }
.feature p { margin: 0; color: var(--muted); font-size: 18px; max-width: 28em; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.steps li { display: flex; gap: 16px; }
.steps .n {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center;
  font-family: "Press Start 2P", monospace; font-size: 16px; color: #2a0f4d;
  background: var(--pink); border-radius: 12px; box-shadow: 3px 3px 0 #6b2fd6;
}
.steps p { margin: 0; color: var(--muted); }
.steps li > div { min-width: 0; }
.steps code { color: var(--pink-soft); font-size: 15px; overflow-wrap: anywhere; }

.rules { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; counter-reset: r; }
.rules li {
  counter-increment: r; position: relative; padding: 16px 20px 16px 62px;
  background: var(--panel); border: 1px solid rgba(255,255,255,.1); border-radius: 12px;
}
.rules li::before {
  content: counter(r); position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  font-family: "Press Start 2P", monospace; font-size: 14px; color: var(--pink);
}

.btn {
  display: inline-block; padding: 14px 28px; border-radius: 999px; text-decoration: none; border: 0; cursor: pointer; font-family: inherit;
  font-weight: 800; font-size: 18px; color: #2a0f4d;
  background: linear-gradient(90deg, var(--pink), var(--violet)); box-shadow: 0 6px 30px rgba(255, 122, 200, .4);
  transition: transform .15s;
}
.btn:hover { transform: translateY(-3px) scale(1.03); }
.btn.copied { background: var(--green); }

footer { text-align: center; padding: 36px 20px 48px; color: var(--muted); background: #10061f; }
footer p { margin: 4px 0; }
footer code { color: var(--pink-soft); }
footer .small { font-size: 12px; opacity: .65; }

@media (max-width: 760px) {
  .feature, .feature.flip { grid-template-columns: minmax(0, 1fr); }
  .feature figure, .feature.flip figure { order: 2; }
  .nav nav { gap: 14px; }
  .nav nav a { font-size: 13px; }
  .nav { gap: 12px; }
  .brand span { display: none; }
  .hero { align-items: flex-start; padding-top: 100px; }
  .hero-fade { background: linear-gradient(180deg, rgba(23,10,46,.88) 0%, rgba(23,10,46,.7) 60%, var(--bg) 100%); }
  .sweepy-wrap { width: 120px; right: 16px; bottom: 20px; }
  .mc-btn { font-size: 12px; padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* scroll intro: hero pins, fills with mist, then About is revealed */
.intro { position: relative; }
.intro .hero { position: sticky; top: 0; }
.intro-runway { height: 40vh; height: 40svh; }
.hero-mist { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.hero-mist-fill { position: absolute; inset: 0; background: var(--bg); opacity: 0; }
.hm {
  position: absolute; width: 85vmax; height: 85vmax; border-radius: 50%; opacity: 0;
  background: radial-gradient(closest-side, var(--c) 30%, transparent 100%);
  filter: blur(30px); will-change: transform, opacity;
}
.hm1 { --c: rgba(167,123,255,.95); left: -30vmax; top: -20vmax; }
.hm2 { --c: rgba(255,122,200,.75); right: -35vmax; top: -10vmax; }
.hm3 { --c: rgba(107,47,214,.95); left: 10vw; top: 15vh; }
.hm4 { --c: rgba(255,170,225,.6); right: -20vmax; bottom: -35vmax; }
.hm5 { --c: rgba(90,58,154,1); left: -35vmax; bottom: -35vmax; }
.hm6 { --c: rgba(167,123,255,.8); left: 25vw; top: -40vmax; }
.hm7 { --c: rgba(47,20,92,1); left: 20vw; bottom: -45vmax; }

.about-stage { position: relative; z-index: 6; overflow: clip; margin-top: -45vh; margin-top: -45svh; }
.about-stage > .section { position: relative; z-index: 1; padding-top: clamp(24px, 3vw, 40px); }
.mist-sides {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 10%, #000 92%, transparent);
  mask-image: linear-gradient(transparent, #000 10%, #000 92%, transparent);
}
.sm {
  position: absolute; width: clamp(320px, 38vw, 640px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, var(--c) 0%, transparent 100%);
  filter: blur(30px); opacity: 1; will-change: transform;
  animation: mist-drift 9s ease-in-out infinite alternate;
}
.sm:nth-child(even) { animation-duration: 13s; animation-direction: alternate-reverse; }
.sm1 { --c: rgba(167,123,255,.8); left: -13vw; top: 2%; }
.sm2 { --c: rgba(255,122,200,.6); right: -14vw; top: 12%; }
.sm3 { --c: rgba(125,70,235,.9); left: -15vw; top: 28%; }
.sm4 { --c: rgba(167,123,255,.8); right: -13vw; top: 40%; }
.sm5 { --c: rgba(255,122,200,.55); left: -12vw; top: 54%; }
.sm6 { --c: rgba(125,70,235,.9); right: -15vw; top: 66%; }
.sm7 { --c: rgba(167,123,255,.8); left: -14vw; top: 80%; }
.sm8 { --c: rgba(255,122,200,.55); right: -12vw; top: 90%; }
@keyframes mist-drift {
  0% { translate: -4vw -3vh; rotate: 0deg; scale: .92; }
  50% { translate: 3vw 4vh; rotate: 25deg; scale: 1.1; }
  100% { translate: 6vw -2vh; rotate: -15deg; scale: 1.2; }
}
@keyframes mist-swirl {
  0% { translate: -6vw -4vh; rotate: 0deg; }
  100% { translate: 7vw 5vh; rotate: 40deg; }
}
.hm { animation: mist-swirl 9s ease-in-out infinite alternate; }
.hm:nth-child(even) { animation-duration: 12s; animation-direction: alternate-reverse; }
.hm:nth-child(3n) { animation-duration: 15s; }

.motion .reveal { opacity: 0; }

@media (max-width: 760px) {
  .sm { opacity: .45; }
}
@media (max-height: 560px) {
  .intro .hero { position: relative; }
  .intro-runway, .hero-mist { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .intro .hero { position: relative; }
  .intro-runway, .hero-mist { display: none; }
}

/* gallery page */
.nav nav a[aria-current="page"] { color: var(--pink-soft); opacity: 1; }
.gallery-stage { position: relative; overflow: clip; min-height: 100vh; min-height: 100svh; }
.gallery-stage > .section { position: relative; z-index: 1; padding-top: clamp(100px, 12vw, 140px); }
.page-title { font-size: clamp(18px, 3vw, 28px); line-height: 1.4; margin: 0 0 26px; color: var(--pink-soft); text-shadow: none; }
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(18px, 2.5vw, 28px); }
.g-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius); overflow: hidden; backdrop-filter: blur(4px); }
.g-card h3 { margin: 0; padding: 16px 20px; font-size: 20px; line-height: 1.3; color: var(--pink-soft); }
.g-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg2); }
.g-desc { margin: 0; padding: 16px 20px 0; color: var(--muted); font-size: 16px; flex: 1; }
.g-user { margin: 0; padding: 10px 20px 16px; text-align: right; color: var(--violet); font-weight: 800; font-size: 14px; }

/* admin */
.admin-bar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 16px; max-width: calc(100vw - 24px); flex-wrap: wrap; justify-content: center;
  background: #241046f2; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; box-shadow: 0 10px 40px #000a; backdrop-filter: blur(8px);
}
.admin-bar button, .g-btn {
  font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; color: var(--text);
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: 7px 16px;
}
.admin-bar button:hover, .g-btn:hover { background: rgba(255, 255, 255, .18); }
.admin-bar button[data-act="save"], .g-btn.primary { background: var(--pink); border-color: var(--pink); color: #2a0f4d; }
.admin-tag { font-family: "Press Start 2P", monospace; font-size: 10px; color: var(--pink-soft); }
.g-btn.danger:hover { background: var(--red); border-color: var(--red); color: #2a0f4d; }
.toast {
  position: fixed; left: 50%; bottom: 84px; z-index: 60; transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: #2b1356; border: 1px solid var(--green); color: var(--text); padding: 10px 18px; border-radius: 12px; font-weight: 700; transition: .25s;
}
.toast.bad { border-color: var(--red); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.editing main, .editing .nav, .editing footer { cursor: text; }
.editing .admin-bar, .editing .admin-drawer, .editing .sweepy-wrap { cursor: default; }
.editing [data-edit] { border-radius: 4px; cursor: text; }
.editing [data-edit]:hover { outline: 2px dashed rgba(255, 122, 200, .5); outline-offset: 4px; }
.editing [data-edit]:focus { outline: 2px solid var(--pink); outline-offset: 4px; background: rgba(255, 122, 200, .08); }
.editing [data-edit]:empty { outline: 2px dashed rgba(255, 122, 200, .35); outline-offset: 4px; min-height: 1em; }
.editing [data-edit-img] { cursor: pointer; }
.editing [data-edit-img]:hover { outline: 3px dashed rgba(255, 122, 200, .7); outline-offset: 3px; }
.kk-text-edit { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 3px; background: rgba(255, 122, 200, .12); cursor: text; }
.editing .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }

/* admin backups drawer */
.admin-drawer-tab {
  position: fixed; left: 0; top: 50%; z-index: 46; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px 9px; cursor: pointer;
  font: inherit; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--pink-soft);
  background: #241046f2; border: 1px solid rgba(255, 255, 255, .2); border-left: 0; border-radius: 0 14px 14px 0;
  box-shadow: 6px 0 24px #0006; backdrop-filter: blur(8px);
  transition: transform .25s ease, background-color .2s, color .2s;
}
.admin-drawer-tab:hover { background: #321060f2; color: var(--text); }
.admin-drawer-tab:focus-visible { outline-offset: -2px; }
.admin-drawer-grip { width: 4px; height: 26px; border-radius: 999px; background: var(--pink); box-shadow: 0 0 10px rgba(255, 122, 200, .8); }
.admin-drawer-label { writing-mode: vertical-rl; transform: rotate(180deg); }
.admin-drawer-open .admin-drawer-tab { transform: translate(-110%, -50%); }

.admin-drawer {
  position: fixed; z-index: 47; inset: 0 auto 0 0; width: min(360px, 90vw);
  display: flex; flex-direction: column; gap: 14px; padding: 26px 22px 22px;
  background: #1e0d3af7; border-right: 1px solid rgba(167, 123, 255, .35); box-shadow: 18px 0 60px #000a;
  backdrop-filter: blur(12px); overflow-y: auto;
  transform: translateX(-101%); visibility: hidden;
  transition: transform .3s cubic-bezier(.22, .68, .36, 1), visibility .3s;
}
.admin-drawer-open .admin-drawer { transform: none; visibility: visible; }
.admin-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-drawer-kicker { margin: 0 0 8px; font-family: "Press Start 2P", monospace; font-size: 9px; letter-spacing: 0; color: var(--pink); }
.admin-drawer-title { margin: 0; font-family: "Nunito", system-ui, sans-serif; font-size: 23px; line-height: 1.2; letter-spacing: 0; }
.admin-drawer-close {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  font: inherit; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted);
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px;
  transition: background-color .2s, color .2s;
}
.admin-drawer-close:hover { background: rgba(255, 255, 255, .16); color: var(--text); }
.admin-drawer-note { margin: 0; color: var(--muted); font-size: 14px; }
.admin-drawer-tabs { display: flex; gap: 4px; padding: 4px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; }
.admin-drawer-tabs button {
  flex: 1; font: inherit; font-size: 13px; font-weight: 800; padding: 8px 10px; cursor: pointer;
  color: var(--muted); background: transparent; border: 0; border-radius: 9px; transition: background-color .15s, color .15s, box-shadow .15s;
}
.admin-drawer-tabs button:hover { color: var(--text); }
.admin-drawer-tabs button[aria-selected="true"] { color: var(--text); background: rgba(255, 122, 200, .16); box-shadow: inset 0 0 0 1px rgba(255, 122, 200, .45); }
.admin-drawer-panel { display: flex; flex: 1 1 auto; flex-direction: column; gap: 14px; min-height: 0; }
.admin-drawer-subhead { margin: 4px 0 -4px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.admin-drawer-item-main em { font-style: normal; font-size: 14px; overflow-wrap: anywhere; }
.admin-drawer-css-label { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.admin-drawer-css {
  width: 100%; min-height: 260px; flex: 1 1 auto; resize: vertical;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 12.5px; line-height: 1.55;
  color: var(--text); background: rgba(0, 0, 0, .38); border: 1px solid rgba(167, 123, 255, .4);
  border-radius: 12px; padding: 12px 14px; tab-size: 2; white-space: pre; overflow: auto;
}
.admin-drawer-css:focus { outline: 2px solid var(--pink-soft); outline-offset: 2px; }
.admin-drawer-css::placeholder { color: #9d86bd; }
.admin-drawer-css-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-drawer-ghost {
  font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; padding: 9px 14px; border-radius: 12px;
  color: var(--text); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .18);
  transition: background-color .2s, border-color .2s, color .2s;
}
.admin-drawer-ghost:hover { background: rgba(255, 255, 255, .14); }
.admin-drawer-ghost.danger:hover { background: var(--red); border-color: var(--red); color: #2a0f4d; }
.admin-drawer-reset { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); color: var(--text); }
.admin-drawer-reset:hover { background: rgba(255, 255, 255, .14); }
.admin-drawer-save {
  font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; padding: 11px 16px;
  color: #2a0f4d; background: var(--pink); border: 1px solid var(--pink); border-radius: 12px;
  transition: background-color .2s;
}
.admin-drawer-save:hover { background: var(--pink-soft); }
.admin-drawer-status { margin: -4px 0 0; min-height: 18px; font-size: 13px; font-weight: 700; color: var(--muted); }
.admin-drawer-status:empty { display: none; }
.admin-drawer-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.admin-drawer-item {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  padding: 12px 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px;
}
.admin-drawer-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-drawer-item-main b { font-size: 14px; }
.admin-drawer-item-main span { font-size: 12px; color: var(--muted); }
.admin-drawer-item-actions { display: flex; gap: 6px; }
.admin-drawer-item-actions button {
  font: inherit; font-size: 13px; font-weight: 800; padding: 5px 12px; cursor: pointer; border-radius: 999px;
  color: var(--text); background: rgba(167, 123, 255, .24); border: 1px solid rgba(167, 123, 255, .5);
  transition: background-color .2s, border-color .2s, color .2s;
}
.admin-drawer-restore:hover { background: var(--pink); border-color: var(--pink); color: #2a0f4d; }
.admin-drawer-delete { background: transparent; border-color: rgba(255, 107, 138, .45); color: var(--pink-soft); }
.admin-drawer-delete:hover { background: var(--red); border-color: var(--red); color: #2a0f4d; }
.admin-drawer-badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 800; color: #2a0f4d;
  background: linear-gradient(90deg, var(--pink), var(--violet));
}
.admin-drawer-empty { padding: 18px 14px; border: 1px dashed rgba(167, 123, 255, .4); border-radius: 12px; color: var(--muted); font-size: 14px; text-align: center; }
.admin-drawer-foot { margin: auto 0 0; padding-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.5; }
@media (max-width: 640px) {
  .admin-drawer { padding-bottom: 104px; }
}
@media (max-width: 520px) {
  .admin-drawer { width: min(330px, 94vw); padding: 22px 18px 104px; }
  .admin-drawer-tab { padding: 12px 7px; font-size: 9px; }
  .admin-drawer-grip { height: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .admin-drawer, .admin-drawer-tab { transition: none; }
}

/* site music */
.music-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 44;
  display: grid; place-items: center; width: 46px; height: 46px; padding: 0; cursor: pointer;
  color: var(--pink-soft); background: #241046ee; border: 1px solid rgba(255, 122, 200, .55); border-radius: 50%;
  box-shadow: 0 8px 28px #0009, 0 0 18px rgba(255, 122, 200, .25);
  transition: transform .2s, background-color .2s, color .2s, box-shadow .2s;
}
.music-btn:hover { background: #321060f5; color: var(--text); transform: translateY(-2px); }
.music-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.music-btn .music-pause { display: none; }
.music-btn.playing .music-play { display: none; }
.music-btn.playing .music-pause { display: block; }
.music-btn.playing { color: var(--pink); box-shadow: 0 8px 28px #0009, 0 0 22px rgba(255, 122, 200, .5); }
.music-btn.playing::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid rgba(255, 122, 200, .55); animation: music-ring 2.4s ease-out infinite;
}
@keyframes music-ring { from { opacity: .8; transform: scale(.9); } to { opacity: 0; transform: scale(1.25); } }
body:has(.admin-bar) .music-btn { bottom: 84px; }
@media (max-width: 520px) { .music-btn { right: 14px; bottom: 14px; width: 42px; height: 42px; } body:has(.admin-bar) .music-btn { bottom: 78px; } }
@media (prefers-reduced-motion: reduce) { .music-btn, .music-btn.playing::after { transition: none; animation: none; } }

.f-input {
  width: 100%; font: inherit; font-size: 15px; color: var(--text); background: rgba(0, 0, 0, .28);
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 10px; padding: 9px 12px;
}
textarea.f-input { resize: vertical; min-height: 72px; }
.f-input::placeholder { color: #9d86bd; }
.f-err { margin: 4px 0 0; color: var(--red); font-size: 14px; font-weight: 700; }
.f-err:empty { display: none; }
.f-user { display: flex; align-items: center; gap: 8px; }
.f-user span { font-weight: 800; color: var(--violet); }
.g-fields { padding: 8px 20px 0; }
.g-actions { display: flex; gap: 8px; padding: 0 20px 16px; }
.g-empty { grid-column: 1 / -1; color: var(--muted); }

.g-upload { margin: 0 0 36px; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 32px 20px; cursor: pointer;
  border: 2px dashed rgba(255, 255, 255, .28); border-radius: var(--radius); background: var(--panel); transition: .2s;
}
.dropzone:hover { border-color: rgba(255, 255, 255, .5); }
.dropzone.drag { border-color: var(--pink); background: rgba(255, 122, 200, .1); }
.dropzone h3 { margin: 6px 0 0; font-size: 20px; }
.dropzone p { margin: 0; color: var(--muted); }
.dz-hint { font-size: 13px; opacity: .8; }
.dz-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: var(--muted); }
.dropzone.drag .dz-icon { background: rgba(255, 122, 200, .2); color: var(--pink); }
.dropzone .btn { margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; }
.up-errors { margin-top: 12px; }
.up-errors p { margin: 4px 0; padding: 8px 12px; border-radius: 10px; background: rgba(255, 107, 138, .12); border: 1px solid rgba(255, 107, 138, .4); color: #ffd0da; font-size: 14px; }
.up-head { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 12px; }
.up-list { display: grid; gap: 14px; margin-bottom: 18px; }
.up-by { margin: 0 0 12px; color: var(--muted); font-size: 14px; font-weight: 700; }
.up-by[hidden] { display: none; }
.up-item { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 18px; padding: 14px; background: var(--panel); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius); }
.up-thumb { position: relative; align-self: start; }
.up-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.up-x { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 0; cursor: pointer; background: rgba(23, 10, 46, .85); color: var(--text); }
.up-x:hover { background: var(--red); color: #2a0f4d; }
.up-fields { display: grid; gap: 10px; }
.up-fields label span { display: block; font-size: 13px; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.up-file { margin: 0; font-size: 13px; color: var(--muted); }
.up-bar { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.up-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--pink), var(--violet)); transition: width .15s; }
.up-bar[hidden] { display: none; }

.admin-page { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 110px 20px 60px; }
.admin-card { width: min(100%, 460px); padding: 32px; background: var(--panel); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius); }
.admin-card form { display: grid; gap: 14px; }
.admin-card label span { display: block; font-size: 13px; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.auth-card { width: min(100%, 440px); }
.auth-kicker {
  margin: 0 0 10px; font-family: "Press Start 2P", monospace; font-size: 9px; line-height: 1.6;
  letter-spacing: .06em; text-transform: uppercase; color: var(--violet);
}
.auth-lead { font-size: 16px; margin-bottom: 22px; }
.auth-lead code { color: var(--pink-soft); overflow-wrap: anywhere; }
.auth-hint { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; color: var(--muted); }
.f-ok { margin: 4px 0 0; color: var(--green); font-size: 14px; font-weight: 700; }
.f-ok:empty { display: none; }
.auth-submit { justify-self: start; font-size: 16px; padding: 12px 26px; }
.auth-switch {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px;
  margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12);
  color: var(--muted); font-size: 14px;
}
.auth-switch-btn {
  font: inherit; font-weight: 800; color: var(--pink-soft); background: transparent; border: 0; padding: 4px 2px;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px; border-radius: 4px;
}
.auth-switch-btn:hover { color: var(--pink); }
.auth-switch-top { margin: -6px 0 22px; padding: 0; border-top: 0; }
.auth-nudge { animation: auth-nudge .7s ease 2; }
@keyframes auth-nudge { 0%, 100% { color: var(--pink-soft); } 50% { color: var(--pink); text-shadow: 0 0 14px rgba(255, 122, 200, .8); } }
.auth-role { margin: -8px 0 20px; color: var(--pink-soft); font-size: 14px; font-weight: 700; }
.auth-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 8px; }
.auth-actions .btn { font-size: 16px; padding: 12px 22px; }
.hub-links { display: grid; gap: 12px; margin-bottom: 20px; }
.hub-link { display: block; padding: 16px 18px; text-decoration: none; color: var(--text); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; }
.hub-link:hover { border-color: var(--pink); }
.hub-link strong { display: block; color: var(--pink-soft); }
.hub-link span { font-size: 15px; color: var(--muted); }
@media (max-width: 640px) { .up-item { grid-template-columns: 1fr; } }
.form-two-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 640px) {
  .form-two-columns { grid-template-columns: 1fr; gap: 18px; }
}
.feedback-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.feedback-layout .form-panel { margin-bottom: 0; }
.feedback-notes { padding: 20px 0; }
.feedback-notes p { color: var(--muted); }
.feedback-notes h3 { color: var(--pink-soft); font-size: 18px; margin: 28px 0 6px; }
.feedback-notes h3 + p { margin-top: 0; }
.text-link { color: var(--pink-soft); text-underline-offset: 4px; }
.text-link:hover { color: var(--pink); }
.check-field { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 800; color: var(--pink-soft); }
.check-field input { width: 20px; height: 20px; accent-color: var(--pink); margin: 0; flex: none; }
.character-hint { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin: -14px 0 0; font-variant-numeric: tabular-nums; }
.spam-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.success-panel p { color: var(--muted); }
.ticket-reference { color: var(--pink-soft); font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
.list-toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin: 28px 0 20px; }
.list-toolbar .field { min-width: 140px; }
.toolbar-search { flex: 1; }
.list-toolbar > button { min-height: 44px; margin-bottom: 1px; }
.list-summary { color: var(--muted); font-variant-numeric: tabular-nums; }
.inbox-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 24px; margin-top: 20px; align-items: start; }
.ticket-list-panel { background: #24113f; border: 1px solid rgba(167,123,255,.25); border-radius: var(--radius); overflow: hidden; }
.ticket-row { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 20px; border: 0; border-bottom: 1px solid rgba(167,123,255,.2); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ticket-row:last-child { border-bottom: 0; }
.ticket-row:hover, .ticket-row.selected { background: #36194f; }
.ticket-row:focus-visible { outline-offset: -4px; }
.ticket-subject { font-size: 18px; overflow-wrap: anywhere; }
.ticket-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.status-badge { display: inline-block; border-radius: 999px; padding: 2px 10px; background: #3b2556; color: var(--pink-soft); font-size: 12px; font-weight: 800; }
.status-badge.new { background: #52304d; color: var(--pink-soft); }
.status-badge.read { background: #34295a; color: #d9c6ff; }
.status-badge.closed { background: #20413c; color: #a6ebcc; }
.ticket-detail { padding: clamp(20px, 3vw, 30px); border: 1px solid rgba(167,123,255,.25); border-radius: var(--radius); background: #24113f; scroll-margin-top: 100px; }
.ticket-detail .form-title { overflow-wrap: anywhere; }
.ticket-metadata { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.ticket-from { color: var(--pink-soft); margin: 12px 0 6px; overflow-wrap: anywhere; }
.message-text { max-width: 75ch; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; font-size: 16px; margin: 24px 0; }
.detail-placeholder { color: var(--muted); margin: 0; }
.list-empty { color: var(--muted); padding: 28px 20px; margin: 0; }
.pagination { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding: 18px 20px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 800px) {
  .feedback-layout, .inbox-layout { grid-template-columns: 1fr; gap: 28px; }
  .feedback-notes { padding: 0; }
  .list-toolbar .toolbar-search { min-width: min(100%, 220px); }
}
.nav-toggle { display: none; }
.nav nav a { white-space: nowrap; }
.community-stage { position: relative; overflow: clip; min-height: calc(100svh - 160px); }
.community-page { position: relative; z-index: 1; padding-top: 124px; padding-bottom: 72px; }
.page-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-intro .lead { margin: 0; max-width: 38em; }
.page-intro .btn { flex: none; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 28px; }
.admin-profile { display: flex; flex-direction: column; align-items: center; padding: 30px 24px 24px; text-align: center; background: #24113f; border: 1px solid rgba(167,123,255,.25); border-radius: var(--radius); }
.admin-avatar { flex: none; display: grid; place-items: center; width: 144px; height: 144px; border-radius: 50%; overflow: hidden; background: #32184f; border: 3px solid var(--pink-soft); color: var(--pink-soft); font-family: "Press Start 2P", monospace; font-size: 30px; margin-bottom: 24px; }
.admin-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.admin-name { font-family: "Nunito", system-ui, sans-serif; font-size: 23px; line-height: 1.35; margin: 0 0 6px; overflow-wrap: anywhere; max-width: 100%; }
.admin-role { margin: 0 0 14px; color: var(--violet); font-weight: 800; }
.admin-bio { margin: 0; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: auto; padding-top: 24px; }
.empty-state { grid-column: 1 / -1; padding: 48px 28px; border: 1px dashed rgba(167,123,255,.4); border-radius: var(--radius); text-align: center; color: var(--muted); }
.empty-state h2 { color: var(--pink-soft); }
.empty-state p { max-width: 50ch; margin: 12px auto 0; }
.form-title { font-family: "Nunito", system-ui, sans-serif; font-size: 24px; line-height: 1.35; margin: 0 0 12px; }
.form-panel { scroll-margin-top: 100px; margin-bottom: 32px; padding: clamp(20px, 3vw, 32px); background: #24113f; border: 1px solid rgba(167,123,255,.25); border-radius: var(--radius); }
.form-hint { color: var(--muted); font-size: 14px; margin: 6px 0 18px; }
.field-stack { display: grid; gap: 18px; }
.field { display: block; }
.field > span { display: block; color: var(--pink-soft); font-weight: 800; margin-bottom: 6px; }
.field small { color: var(--muted); font-weight: 400; font-size: 13px; }
.field .f-input { font-size: 16px; caret-color: var(--pink); }
.field .f-input:focus { border-color: var(--pink); }
.field .f-input:disabled { opacity: .6; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.form-actions .btn { font-size: 16px; padding: 12px 24px; }
.profile-fields { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 32px; margin-top: 24px; }
.preview-avatar { width: 120px; height: 120px; margin: 0 0 18px; }
.photo-field .f-input { padding: 8px; font-size: 13px; }
input[type="file"]::file-selector-button { font: inherit; padding: 6px 10px; border-radius: 6px; border: 0; background: var(--pink-soft); color: var(--bg); margin-right: 8px; cursor: pointer; }
.load-status { color: var(--muted); }
.load-status:empty { display: none; }
button:disabled { cursor: not-allowed; opacity: .55; transform: none !important; }
body:has(.admin-bar) footer { padding-bottom: 120px; }
@media (max-width: 1100px) {
  .nav { background: #170a2ef5; border-bottom: 1px solid rgba(167,123,255,.2); flex-wrap: wrap; padding: 12px 20px; }
  .brand span { display: inline; }
  .nav-toggle { display: block; min-height: 44px; padding: 8px 16px; font: inherit; font-weight: 800; color: var(--pink-soft); background: #32184f; border: 1px solid rgba(167,123,255,.4); border-radius: 10px; cursor: pointer; }
  .nav nav { flex-basis: 100%; flex-wrap: wrap; gap: 4px; padding: 8px 0; }
  .nav nav a { padding: 10px 14px; font-size: 15px; }
  .nav-enhanced nav { display: none; }
  .nav-enhanced:has(.nav-toggle[aria-expanded="true"]) nav { display: flex; }
}
@media (max-width: 640px) {
  .page-intro { flex-direction: column; gap: 20px; }
  .community-page { padding-top: 112px; }
  .profile-fields { grid-template-columns: 1fr; gap: 24px; }
  .photo-field { max-width: 100%; }
  .brand span { font-size: 9px; }
  .nav-start { gap: 8px; }
  .nav-divider { min-height: 22px; }
  .nav-login { min-height: 30px; padding: 5px 10px; font-size: 11px; }
  .admin-card { padding: 24px; }
}
[hidden] { display: none !important; }
@media (max-width: 520px) { .admin-bar { gap: 6px; padding: 6px 8px; flex-wrap: nowrap; } .admin-bar button { padding: 6px 11px; font-size: 13px; white-space: nowrap; } .admin-tag { display: none; } }

select.f-input option, select option { background: #20103f; color: #fff; }
select.f-input option:checked, select option:checked { background: #5a3a9a; color: #fff; }
select.f-input option:hover { background: #5a3a9a; color: #fff; }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.forum-shell { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 28px; align-items: start; }
.forum-main { min-width: 0; container-type: inline-size; }
.forum-shell h2 { font-family: "Nunito", system-ui, sans-serif; }
.forum-shell .icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.feed-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; scroll-margin-top: 96px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 32px; padding: 0 14px; border: 0; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 800; color: #eadcff; background: rgba(167,123,255,.14); cursor: pointer; transition: background .15s, color .15s; }
.chip:hover { background: rgba(167,123,255,.28); }
.chip[aria-pressed="true"] { color: #2a0f4d; background: var(--pink-soft); }
.feed-search { position: relative; display: flex; align-items: center; flex: 1 1 220px; max-width: 300px; }
.feed-search .icon { position: absolute; left: 14px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.feed-search input { width: 100%; min-height: 40px; padding: 0 16px 0 38px; font: inherit; font-size: 14px; color: var(--text); background: #1d0e37; border: 1px solid rgba(167,123,255,.35); border-radius: 999px; caret-color: var(--pink); transition: border-color .15s, box-shadow .15s; }
.feed-search input::placeholder { color: #9d86bd; }
.feed-search input:hover { border-color: rgba(255,122,200,.55); }
.feed-search input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink); }
@container (max-width: 620px) { .feed-search { flex-basis: 100%; max-width: none; } }
.feed-count { margin: 14px 2px 10px; font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.feed-count:empty { display: none; }
.thread-list { display: grid; gap: 10px; }
.thread-list, .comment-tree { transition: opacity .15s; }
.thread-list[aria-busy="true"], .comment-tree[aria-busy="true"] { opacity: .6; transition: opacity .2s .15s; }

.feed-post, .post-card { background: #24113f; border: 1px solid rgba(167,123,255,.22); border-radius: var(--radius); }
.feed-post { padding: 12px 16px 10px; cursor: pointer; transition: background .15s, border-color .15s; }
.feed-post:hover { background: #2a1448; border-color: rgba(167,123,255,.4); }
.feed-title { margin: 8px 0 6px; font-size: 18px; line-height: 1.35; font-weight: 800; color: #fff; overflow-wrap: anywhere; }
.feed-title a { color: inherit; text-decoration: none; }
.feed-title a:hover { color: var(--pink-soft); }
.feed-preview { margin: 6px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.byline { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; line-height: 1.3; color: var(--muted); }
.byline > :not(.byline-name) { flex: none; }
.byline-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; color: var(--text); }
.byline-name.is-removed { font-weight: 700; color: var(--muted); }
.role-tag { padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 800; line-height: 1.5; color: #e6d9ff; background: rgba(167,123,255,.24); }
.avatar { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 800; line-height: 1; color: #2a0f4d; }
.avatar-removed { background: #4a3a63; }

.flair-row { display: flex; flex-wrap: wrap; gap: 6px; }
.flair { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 1.5; color: #2a0f4d; background: #b99bff; }
.flair-projects { background: #7fe8c8; }
.flair-questions { background: #8fb4ff; }
.flair-events { background: #ffc48a; }
.flair-locked { color: var(--pink-soft); background: rgba(255,122,200,.16); }
.flair-locked .icon { width: 13px; height: 13px; stroke-width: 2.5; }

.post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; color: #eadcff; background: rgba(167,123,255,.14); text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.pill .icon { width: 16px; height: 16px; }
a.pill:hover, button.pill:hover:not(:disabled) { background: rgba(167,123,255,.28); }
button.pill-danger:hover:not(:disabled) { color: #2a0f4d; background: var(--red); }
.pill-static { cursor: default; }

.post-card { padding: 14px 20px 16px; }
.post-card:empty { display: none; }
.post-top { display: flex; align-items: center; gap: 10px; }
.post-top .avatar { width: 32px; height: 32px; font-size: 15px; }
.back-btn { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--text); background: rgba(167,123,255,.14); transition: background .15s; }
.back-btn:hover { background: rgba(167,123,255,.28); }
.post-title { margin: 12px 0 8px; font-size: 24px; line-height: 1.3; font-weight: 800; color: #fff; overflow-wrap: anywhere; }
.post-body { margin-top: 12px; font-size: 16px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-card .post-actions { margin-top: 14px; }
.locked-line { display: flex; align-items: center; gap: 8px; margin: 14px 4px 0; font-size: 14px; font-weight: 700; color: var(--pink-soft); }
.locked-line .icon { width: 16px; height: 16px; }

.composer { margin: 16px 0 4px; }
.composer-bar { display: flex; align-items: center; width: 100%; min-height: 40px; padding: 0 18px; font: inherit; font-size: 14px; color: var(--muted); text-align: left; background: #1d0e37; border: 1px solid rgba(167,123,255,.35); border-radius: 999px; cursor: text; transition: border-color .15s, color .15s; }
.composer-bar:hover { color: var(--text); border-color: rgba(255,122,200,.55); }
.editor { container-type: inline-size; background: #1d0e37; border: 1px solid rgba(167,123,255,.35); border-radius: 20px; transition: border-color .15s, box-shadow .15s; }
.editor:focus-within { border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink); }
.comment-foot .editor { margin: 4px 0 10px; }
.editor-text { display: block; width: 100%; min-height: 44px; max-height: 40vh; padding: 10px 16px 4px; font: inherit; font-size: 15px; line-height: 1.5; color: var(--text); background: transparent; border: 0; border-radius: 20px 20px 0 0; resize: none; overflow-y: auto; caret-color: var(--pink); }
.editor-text:focus { outline: none; }
.editor-text::placeholder { color: #9d86bd; }
.editor .f-err { margin: 0; padding: 4px 16px 0; }
.editor-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 8px 8px 10px; }
.editor-buttons, .editor-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto; }
.ghost-pill, .solid-pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 0 14px; border: 0; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; transition: background .15s; }
.ghost-pill { color: #eadcff; background: rgba(167,123,255,.14); }
.ghost-pill:hover:not(:disabled) { background: rgba(167,123,255,.28); }
.solid-pill { color: #2a0f4d; background: var(--pink); }
.solid-pill:hover:not(:disabled) { background: #ff9ad5; }
.editor-actions .ghost-pill, .editor-actions .solid-pill { min-height: 40px; padding: 0 20px; font-size: 14px; }
.forum-main .pagination { padding: 16px 0 4px; }

.comments { margin-top: 6px; scroll-margin-top: 96px; }
.comments-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.sort-field { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; color: var(--muted); }
.sort-field select { -webkit-appearance: none; appearance: none; min-height: 32px; padding: 0 28px 0 8px; font: inherit; font-weight: 800; color: var(--text); background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f6eaff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center / 12px; border: 0; border-radius: 999px; cursor: pointer; transition: background-color .15s; }
.sort-field select:hover { background-color: rgba(167,123,255,.16); }

.comment { --av: 32px; --pt: 16px; --gap: 8px; --lw: 2px; --elbow: 16px; --curve: 12px; --act: 32px; --cb: 20px; --line: #523a80; position: relative; padding-top: var(--pt); }
.comment-children .comment { --av: 24px; --pt: 12px; }
.comment:focus { outline: none; }
.comment:focus-visible > .comment-self { outline: 2px solid var(--pink-soft); outline-offset: 4px; border-radius: 8px; }
.comment-head { min-height: var(--av); }
.comment-head .avatar { width: var(--av); height: var(--av); margin-right: calc(var(--gap) - 6px); font-size: calc(var(--av) * .44); }
.comment-body { padding-left: calc(var(--av) + var(--gap)); }
.comment-content { position: relative; padding-top: 2px; }
.comment-text { font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.reply-to { margin: 0 0 2px; font-size: 13px; font-weight: 700; color: var(--muted); }
.removed-text { margin: 0; font-size: 14px; font-style: italic; color: var(--muted); }
.comment-foot { position: relative; }
.comment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; min-height: var(--act); margin-left: -8px; }
.comment-action { display: inline-flex; align-items: center; gap: 6px; min-height: var(--act); padding: 0 10px 0 8px; border: 0; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 800; color: var(--muted); background: transparent; cursor: pointer; transition: background .15s, color .15s; }
.comment-action .icon { width: 16px; height: 16px; }
.comment-action:hover:not(:disabled), .comment-action[aria-expanded="true"] { color: var(--text); background: rgba(167,123,255,.16); }
.comment-action.is-danger:hover:not(:disabled) { color: #ffc2cf; background: rgba(255,107,138,.18); }

.has-children > .comment-self .comment-content::before,
.has-children > .comment-self .comment-foot::before,
.comment-children > .comment::before,
.comment-children > .comment:not(:last-child)::after { content: ""; position: absolute; pointer-events: none; }
.has-children > .comment-self .comment-content::before,
.has-children > .comment-self .comment-foot::before { left: calc(var(--av) / -2 - var(--gap) - var(--lw) / 2); width: var(--lw); background: var(--line); }
.has-children > .comment-self .comment-content::before { top: 4px; bottom: calc((var(--act) - var(--cb)) / -2); }
.has-children > .comment-self .comment-foot::before { top: calc((var(--act) + var(--cb)) / 2); bottom: 0; }
.comment-children { padding-left: calc(var(--av) / 2 + var(--elbow)); }
.comment-children > .comment::before { left: calc(-1 * var(--elbow) - var(--lw) / 2); top: 0; width: calc(var(--elbow) + var(--lw) / 2); height: calc(var(--pt) + var(--av) / 2 + var(--lw) / 2); border: solid var(--line); border-width: 0 0 var(--lw) var(--lw); border-bottom-left-radius: var(--curve); }
.comment-children > .comment:not(:last-child)::after { left: calc(-1 * var(--elbow) - var(--lw) / 2); top: 0; bottom: 0; width: var(--lw); background: var(--line); }
.collapse-btn { position: absolute; left: calc(var(--av) / -2 - var(--gap) - var(--cb) / 2); top: calc((var(--act) - var(--cb)) / 2); display: grid; place-items: center; width: var(--cb); height: var(--cb); padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: transparent; cursor: pointer; transition: color .15s; }
.collapse-btn::after { content: ""; position: absolute; inset: -6px; }
.collapse-btn:hover { color: var(--pink-soft); }
.collapse-btn .icon { width: 100%; height: 100%; }
.is-collapsed > .comment-self .comment-body, .is-collapsed > .comment-children { display: none; }
.is-collapsed > .comment-self .comment-head { cursor: pointer; }
.expand-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; margin-left: 2px; padding: 0 8px 0 6px; border: 0; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 800; color: var(--pink-soft); background: transparent; cursor: pointer; transition: background .15s; }
.expand-btn .icon { width: 16px; height: 16px; }
.expand-btn:hover { background: rgba(167,123,255,.16); }
.comment.flash > .comment-self { border-radius: 10px; animation: comment-flash 1.8s ease-out; }
@keyframes comment-flash {
  from { background: rgba(255,122,200,.16); box-shadow: 0 0 0 6px rgba(255,122,200,.16); }
  to { background: rgba(255,122,200,0); box-shadow: 0 0 0 6px rgba(255,122,200,0); }
}
.comments-empty { padding: 28px 16px 12px; text-align: center; font-size: 14px; color: var(--muted); }
.comments-empty p { margin: 0; }
.comments-empty p + p { margin-top: 4px; }
.comments-empty-title { font-size: 16px; font-weight: 800; color: var(--text); }

.forum-side { position: sticky; top: 92px; background: #24113f; border: 1px solid rgba(167,123,255,.22); border-radius: var(--radius); }
.side-section { padding: 16px 18px; }
.side-section + .side-section { border-top: 1px solid rgba(167,123,255,.18); }
.side-section p { margin: 0 0 10px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.side-section p:last-child { margin-bottom: 0; }
.side-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.side-brand img { flex: none; border-radius: 10px; }
.side-brand h2, .side-heading { margin: 0; font-size: 15px; line-height: 1.35; font-weight: 800; color: var(--text); }
.side-heading { margin-bottom: 10px; }
.side-line code { font-size: 13px; color: var(--pink-soft); overflow-wrap: anywhere; }
.side-rules { display: grid; gap: 8px; margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.side-rules li { padding-left: 4px; }
.side-rules li::marker { font-weight: 800; color: var(--pink-soft); }

.forum-signin, .g-note { margin: 0 0 22px; padding: 12px 16px; font-size: 14px; line-height: 1.55; color: var(--muted); background: rgba(255,122,200,.08); border: 1px solid rgba(255,122,200,.35); border-radius: 12px; }
.forum-signin .text-link, .g-note .text-link { font-weight: 800; }

.image-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.image-picker > input[type="file"] { display: none; }
.editor > .image-picker { padding: 2px 16px 0; }
.image-add { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; font: inherit; font-size: 13px; font-weight: 800; color: var(--pink-soft); background: rgba(255,122,200,.08); border: 1px dashed rgba(255,122,200,.5); border-radius: 999px; cursor: pointer; transition: background .15s, border-color .15s; }
.image-add:hover { background: rgba(255,122,200,.18); border-color: var(--pink); }
.image-add .icon { width: 16px; height: 16px; }
.image-previews { display: flex; flex-wrap: wrap; gap: 8px; }
.image-previews:empty { display: none; }
.image-preview { position: relative; width: 72px; height: 72px; overflow: hidden; background: #170a2e; border: 1px solid rgba(167,123,255,.4); border-radius: 10px; }
.image-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.image-remove { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; font: inherit; font-size: 15px; line-height: 1; color: var(--text); background: rgba(23,10,46,.85); border: 0; border-radius: 50%; cursor: pointer; }
.image-remove:hover { color: #2a0f4d; background: var(--red); }
.image-status { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--muted); }
.image-status:empty { display: none; }

.post-images { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.post-image { display: block; width: min(100%, 220px); aspect-ratio: 4 / 3; overflow: hidden; background: #170a2e; border: 1px solid rgba(167,123,255,.35); border-radius: 12px; }
.post-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-image:hover, .post-image:focus-visible { border-color: var(--pink); }
.comment-text + .post-images { margin-top: 8px; }

/* Profile page */
.profile-card { width: min(100%, 560px); }
.profile-identity { display: flex; align-items: center; gap: 16px; margin: 4px 0 24px; }
.profile-avatar { flex: none; width: 64px; height: 64px; margin: 0; font-size: 20px; border-width: 2px; }
.profile-meta { min-width: 0; }
.profile-name { margin: 0; font-family: "Nunito", system-ui, sans-serif; font-size: 22px; line-height: 1.3; font-weight: 800; color: var(--text); overflow-wrap: anywhere; }
.profile-meta .auth-role { margin: 2px 0 0; }
.profile-email { margin: 6px 0 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.profile-email code { font-size: 13px; color: var(--pink-soft); }
.profile-note { margin: 18px 0 0; padding: 10px 14px; font-size: 14px; line-height: 1.5; color: var(--pink-soft); background: rgba(255,122,200,.1); border: 1px solid rgba(255,122,200,.35); border-radius: 10px; }
@media (max-width: 520px) {
  .profile-identity { align-items: flex-start; }
  .profile-card { padding: 24px 20px; }
}

@media (max-width: 900px) {
  .forum-shell { grid-template-columns: minmax(0, 1fr); }
  .forum-side { position: static; }
}
@media (max-width: 640px) {
  .feed-post { padding: 12px 14px 10px; }
  .post-card { padding: 12px 14px 14px; }
  .feed-title { font-size: 17px; }
  .post-title { font-size: 20px; }
  .comment { --elbow: 10px; --curve: 8px; }
  .feed-search input, .editor-text, .sort-field select { font-size: 16px; }
}

/* Plugins list */
#plugins > * { max-width: 1008px; margin-left: auto; margin-right: auto; }
.plugin-list { display: block; }
.plugin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, min(60%, var(--plugin-image-width, clamp(180px, 30%, 256px)))); align-items: center; gap: 12px 28px; padding: 22px 0; border-top: 1px solid rgba(167,123,255,.28); }
.plugin-text { min-width: 0; overflow-wrap: anywhere; }
.plugin-media { min-width: 0; }
.plugin-pic.empty { display: none; }
.plugin.no-pic { grid-template-columns: minmax(0, 1fr); }
.plugin.no-pic .plugin-media { display: none; }
.plugin:last-child, .plugin:has(+ .pl-add) { border-bottom: 1px solid rgba(167,123,255,.28); }
.plugin h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; color: var(--text); }
.plugin p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--muted); max-width: 46em; }
.plugin-pic { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; display: grid; place-items: center; align-content: center; gap: 6px; text-align: center; border: 1px dashed rgba(255,122,200,.35); background: rgba(23,10,46,.55); }
.plugin-pic span { font-size: 13px; color: rgba(195,172,223,.7); padding: 0 8px; }
.plugin-pic.has-pic { border: 1px solid rgba(255,122,200,.3); background: none; }
.plugin-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-empty { color: var(--muted); }
.pic-admin { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pic-size { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 0; padding: 0; margin: 12px 0 0; border: 0; }
.pic-size legend { padding: 0; margin-bottom: 4px; font-size: 13px; font-weight: 800; color: var(--pink-soft); }
.pic-size label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.pic-size input { width: 100%; min-width: 0; min-height: 36px; padding: 6px 8px; font: inherit; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--text); background: var(--bg2); border: 1px solid rgba(167,123,255,.6); border-radius: 6px; }
.pic-size .pl-btn { grid-column: 1 / -1; justify-self: start; }
.plugin-pic .pic-resize-handle { position: absolute; bottom: 0; left: 0; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; color: var(--bg); background: var(--pink); border-radius: 0 8px 0 0; cursor: nesw-resize; touch-action: none; user-select: none; }
.plugin-pic .pic-resize-handle:hover, .plugin-pic.resizing .pic-resize-handle { background: var(--pink-soft); }
.plugin-pic.resizing { outline: 2px solid var(--pink); outline-offset: 2px; }
@media (pointer: coarse) {
  .pic-size input, .plugin-media .pl-btn { min-height: 44px; }
  .plugin-pic .pic-resize-handle { width: 44px; height: 44px; }
}
.pl-ctl { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pl-btn, .pic-admin button { font: inherit; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 8px; cursor: pointer; color: var(--text); background: rgba(167,123,255,.28); border: 1px solid rgba(167,123,255,.6); }
.pl-btn:hover, .pl-btn:focus-visible, .pic-admin button:hover, .pic-admin button:focus-visible { background: rgba(255,122,200,.4); border-color: var(--pink); }
.pl-btn.primary { background: var(--pink); border-color: var(--pink); color: #2a0a3f; }
.pl-btn.danger { border-color: rgba(255,107,138,.7); background: rgba(255,107,138,.15); }
.pl-btn.danger:hover { background: rgba(255,107,138,.4); }
.pl-input { display: block; width: 100%; box-sizing: border-box; font: inherit; color: var(--text); background: rgba(23,10,46,.7); border: 1px solid rgba(167,123,255,.5); border-radius: 8px; padding: 9px 12px; margin-bottom: 8px; }
textarea.pl-input { resize: vertical; }
.pl-add { padding: 22px 0 0; max-width: 560px; }
@media (max-width: 560px) {
  .plugin { grid-template-columns: 1fr; }
  .plugin-media { order: -1; width: min(100%, var(--plugin-image-width, 360px)); }
}
.pl-note { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(255,107,138,.6); background: rgba(255,107,138,.12); color: var(--text); font-size: 15px; }
.pl-add { max-width: none; padding: 18px 0 0; }
.pl-add.open { max-width: 560px; }
.pl-btn.pl-plus { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 16px; font-size: 16px; border-radius: 12px; border: 2px dashed rgba(255,122,200,.55); background: rgba(255,122,200,.07); color: var(--pink-soft); }
.pl-btn.pl-plus:hover, .pl-btn.pl-plus:focus-visible { background: rgba(255,122,200,.2); border-color: var(--pink); }
.plugin h3[contenteditable], .plugin p[contenteditable] { outline: 1px dashed rgba(255,122,200,.55); outline-offset: 4px; border-radius: 4px; cursor: text; }
.plugin h3[contenteditable]:focus, .plugin p[contenteditable]:focus { outline: 2px solid var(--pink); }
.plugin p[contenteditable]:empty::before { content: attr(data-placeholder); color: rgba(195,172,223,.5); }
.plugin h3[contenteditable] { margin-bottom: 12px; }

/* ---- shared image adjuster (KK.cropImage) ---- */
.kk-crop {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  padding: clamp(10px, 3vw, 32px);
  background: rgba(9, 4, 20, .8);
  backdrop-filter: blur(7px);
  animation: kk-crop-fade .18s ease both;
}
@keyframes kk-crop-fade { from { opacity: 0; } }
.kk-crop-panel {
  width: min(660px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px; padding: 20px;
  background: #1e0d3af7; border: 1px solid rgba(167, 123, 255, .42); border-radius: 20px;
  box-shadow: 0 30px 90px #000b;
}
.kk-crop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.kk-crop-kicker { margin: 0 0 6px; font-family: "Press Start 2P", monospace; font-size: 9px; color: var(--pink); }
.kk-crop-title { margin: 0; font-size: 24px; line-height: 1.2; }
.kk-crop-x {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  font: inherit; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted);
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px;
}
.kk-crop-x:hover { background: rgba(255, 255, 255, .16); color: var(--text); }
.kk-crop-stage {
  position: relative; height: clamp(220px, 42vh, 380px);
  border-radius: 14px; overflow: hidden; background: #12071f;
  border: 1px solid rgba(255, 255, 255, .1); touch-action: none;
}
.kk-crop-stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.kk-crop-stage.dragging canvas { cursor: grabbing; }
.kk-crop-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); font-size: 14px; }
.kk-crop-ratios { display: flex; flex-wrap: wrap; gap: 6px; }
.kk-crop-ratios button {
  font: inherit; font-size: 13px; font-weight: 800; padding: 5px 12px; cursor: pointer;
  color: var(--muted); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px;
}
.kk-crop-ratios button:hover { background: rgba(255, 255, 255, .14); color: var(--text); }
.kk-crop-ratios button[aria-pressed="true"] { color: #2a0f4d; background: var(--pink); border-color: var(--pink); }
.kk-crop-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.kk-crop-icon {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  font: inherit; font-size: 20px; line-height: 1; cursor: pointer;
  color: var(--text); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px;
}
.kk-crop-icon:hover { background: rgba(255, 255, 255, .16); }
.kk-crop-zoom { display: flex; align-items: center; gap: 10px; flex: 1 1 180px; min-width: 140px; font-size: 13px; font-weight: 800; color: var(--muted); }
.kk-crop-zoom input { flex: 1; min-width: 80px; accent-color: var(--pink); }
.kk-crop-reset {
  margin-left: auto; font: inherit; font-size: 13px; font-weight: 800; padding: 6px 14px; cursor: pointer;
  color: var(--pink-soft); background: transparent; border: 1px solid rgba(255, 122, 200, .4); border-radius: 999px;
}
.kk-crop-reset:hover { background: rgba(255, 122, 200, .14); }
.kk-crop-hint { margin: 0; font-size: 13px; color: var(--muted); }
.kk-crop-note { margin: 0; padding: 8px 12px; font-size: 13px; color: var(--pink-soft); background: rgba(255, 122, 200, .1); border: 1px solid rgba(255, 122, 200, .3); border-radius: 10px; }
.kk-crop-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 4px; }
.kk-crop-spacer { flex: 1; }
.kk-btn {
  font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; color: var(--text);
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: 8px 18px;
}
.kk-btn:hover { background: rgba(255, 255, 255, .18); }
.kk-btn.primary { background: var(--pink); border-color: var(--pink); color: #2a0f4d; }
.kk-btn.primary:hover { background: var(--pink-soft); }
.kk-btn:disabled { opacity: .55; cursor: default; }

/* gallery upload row: adjust button over the thumbnail */
.up-adjust {
  position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer;
  color: var(--text); background: rgba(23, 10, 46, .88); border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px;
}
.up-adjust svg { width: 14px; height: 14px; }
.up-adjust:hover { background: var(--pink); border-color: var(--pink); color: #2a0f4d; }

@media (max-width: 560px) {
  .kk-crop { padding: 0; align-items: stretch; }
  .kk-crop-panel { width: 100%; height: 100%; max-height: none; padding: 16px; border: 0; border-radius: 0; }
  .kk-crop-stage { height: 46vh; }
  .kk-crop-title { font-size: 20px; }
  .kk-crop-reset { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .kk-crop { animation: none; } }
