/* Anime Club - neon night-city theme */
:root {
  --bg: #090513;
  --bg2: #120a26;
  --panel: rgba(24, 14, 50, .78);
  --panel-2: rgba(40, 22, 80, .55);
  --line: rgba(160, 110, 255, .22);
  --line-2: rgba(160, 110, 255, .42);
  --text: #f3ecff;
  --muted: #a396c9;
  --pink: #ff2e97;
  --cyan: #00f0ff;
  --yellow: #ffe45e;
  --purple: #9d4edd;
  --green: #3dffa8;
  --red: #ff5470;
  --display: "Dela Gothic One", "Chakra Petch", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  --ui: "Chakra Petch", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  --r: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 500 16px/1.5 var(--ui); letter-spacing: .01em;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92em; color: var(--yellow); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* Night sky: glow blobs + a faint perspective grid + scanlines */
.sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 40vh at 12% -5%, rgba(255, 46, 151, .22), transparent 70%),
    radial-gradient(55vw 45vh at 95% 5%, rgba(0, 240, 255, .16), transparent 70%),
    radial-gradient(70vw 50vh at 50% 110%, rgba(157, 78, 221, .28), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}
.sky::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(160, 110, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 110, 255, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 55%, transparent 100%);
}
.sky::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(0, 0, 0, .16) 3px 4px);
}

.wrap { width: min(1520px, 100%); margin: 0 auto; padding: 20px clamp(14px, 3vw, 32px) 48px; flex: 1; }
.foot { text-align: center; padding: 18px; color: var(--muted); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.muted { color: var(--muted); }
.center { text-align: center; }
.fine { color: var(--muted); font-size: .82rem; margin-top: 10px; }
.up { color: var(--green); } .down { color: var(--pink); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 10px clamp(14px, 3vw, 32px);
  background: rgba(9, 5, 19, .82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 46, 151, .35), 0 8px 30px -12px rgba(255, 46, 151, .45);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  font: 20px/1 var(--display); color: var(--pink);
  border: 2px solid var(--pink); box-shadow: 0 0 12px rgba(255, 46, 151, .7), inset 0 0 10px rgba(255, 46, 151, .35);
  text-shadow: 0 0 8px var(--pink);
}
.brand-text { font: 17px/1.1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.brand-text small { display: block; font: 600 10px/1.4 var(--ui); letter-spacing: .32em; color: var(--cyan); }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a {
  padding: 7px 14px; border-radius: 999px; color: var(--muted);
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .82rem;
}
.nav a:hover { color: var(--text); text-decoration: none; background: var(--panel-2); }
.nav a.on { color: var(--bg); background: var(--cyan); box-shadow: 0 0 16px rgba(0, 240, 255, .6); }
.nav a.nav-admin { color: var(--yellow); }
.me { display: flex; align-items: center; gap: 10px; }
.link { background: none; border: 0; padding: 4px; color: var(--muted); cursor: pointer; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.link:hover { color: var(--pink); }

/* ---------- chips, tags, scores ---------- */
.chip {
  --c: var(--cyan);
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 7px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  color: var(--text); font-weight: 600; font-size: .86rem; white-space: nowrap; vertical-align: middle;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.chip:hover { text-decoration: none; box-shadow: 0 0 12px color-mix(in srgb, var(--c) 60%, transparent); }
.chip.alum { opacity: .7; }
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--muted);
  vertical-align: middle;
}
.tag.live { color: var(--green); border-color: var(--green); box-shadow: 0 0 12px rgba(61, 255, 168, .35); }
.tag.ok { color: var(--green); border-color: rgba(61, 255, 168, .6); }
.tag.warn { color: var(--yellow); border-color: rgba(255, 228, 94, .6); }
.tag.bad { color: var(--red); border-color: rgba(255, 84, 112, .7); }
.score { --c: var(--cyan); color: var(--c); font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: 0 0 10px color-mix(in srgb, var(--c) 60%, transparent); }

/* ---------- headings ---------- */
.neon-title {
  font: clamp(2rem, 6vw, 3.6rem)/1.05 var(--display); letter-spacing: .03em; text-transform: uppercase;
  color: #fff; text-wrap: balance;
  text-shadow: 0 0 6px #fff, 0 0 18px var(--pink), 0 0 42px var(--pink), 0 0 80px rgba(255, 46, 151, .6);
}
.neon-title b { font-weight: inherit; color: var(--cyan); text-shadow: 0 0 6px #fff, 0 0 18px var(--cyan), 0 0 44px var(--cyan); }
.neon-title.sm { font-size: clamp(1.5rem, 4vw, 2.3rem); margin-bottom: 16px; }
.neon-title .tag { font-family: var(--ui); text-shadow: none; }
.section {
  margin: 38px 0 14px; font: 1.25rem/1.2 var(--display); text-transform: uppercase; letter-spacing: .05em;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.section span[lang] { color: var(--pink); text-shadow: 0 0 12px var(--pink); }
.section small, h3 small { font: 600 .74rem var(--ui); color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
h3 { font: .95rem/1.3 var(--display); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; color: var(--cyan); }
h3 small { margin-left: 6px; }
h3.gap, .fine.gap { margin-top: 22px; }
.crumbs { margin-bottom: 10px; font-size: .86rem; text-transform: uppercase; letter-spacing: .1em; }

/* ---------- season rail + hero ---------- */
.rail { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 12px; scrollbar-width: thin; }
.pill {
  position: relative; flex: none; padding: 8px 16px; border-radius: 10px; color: var(--muted);
  border: 1px solid var(--line); background: var(--panel); font: .95rem var(--display); letter-spacing: .06em;
  transform: skewX(-8deg);
}
.pill > * { display: inline-block; transform: skewX(8deg); }
.pill:hover { color: var(--text); border-color: var(--line-2); text-decoration: none; }
.pill.on { color: var(--bg); background: var(--pink); border-color: var(--pink); box-shadow: 0 0 18px rgba(255, 46, 151, .7); }
.pill em { font: 700 .6rem var(--ui); letter-spacing: .14em; margin-left: 8px; color: var(--green); vertical-align: middle; }
.pill.on em { color: var(--bg); }

.hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 26px; text-align: center; }
.hero.slim { padding: 8px 0 22px; }
.hero-main { flex: 1; min-width: 0; }
.hero-main.left { text-align: left; }
.hero-jp { font: 600 .8rem var(--ui); letter-spacing: .6em; color: var(--cyan); text-shadow: 0 0 10px var(--cyan); margin-bottom: 4px; }
.hero-sub { margin-top: 12px; color: var(--muted); font-size: .92rem; letter-spacing: .06em; }
.hero-sub .tag { margin-right: 8px; }
.arrow {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font-size: 1.7rem; line-height: 1;
  color: var(--cyan); border: 1px solid var(--line-2); background: var(--panel);
}
.arrow:hover { text-decoration: none; box-shadow: 0 0 16px rgba(0, 240, 255, .5); }
.arrow.off { opacity: .25; }
.hero.who { justify-content: flex-start; gap: 20px; text-align: left; }

/* ---------- panels, tiles, grids ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 20px; margin-bottom: 18px; backdrop-filter: blur(6px);
}
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tiles.tight { margin: 16px 0; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tile {
  --c: var(--purple);
  position: relative; overflow: hidden; padding: 14px 16px; border-radius: var(--r);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 14%, transparent), transparent 60%), var(--panel);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  box-shadow: inset 0 0 22px -12px var(--c);
}
.tile::after { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; background: var(--c); box-shadow: 0 0 12px var(--c); border-radius: 0 3px 3px 0; }
.tl { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; white-space: nowrap; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tl small { letter-spacing: .1em; overflow: hidden; text-overflow: ellipsis; min-width: 0; color: color-mix(in srgb, var(--c) 80%, #fff); opacity: .85; }
.tv { margin-top: 6px; font: 1.35rem/1.2 var(--display); overflow-wrap: anywhere; }
.tv .score { font-size: 1.7rem; }
.tv a { color: var(--text); }
.tv .chip { font: 600 1rem var(--ui); }
.ts { margin-top: 4px; font-size: .82rem; color: var(--muted); }

/* ---------- anime cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.card {
  display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.card:hover { transform: translateY(-3px); border-color: var(--pink); box-shadow: 0 10px 34px -12px rgba(255, 46, 151, .7); }
.card.open { border-color: rgba(61, 255, 168, .35); }
.poster { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; background: #150b2c; }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .poster::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(9, 5, 19, .9)); }
.noart {
  width: 100%; height: 100%; display: grid; place-content: center; text-align: center; gap: 6px;
  background: repeating-linear-gradient(135deg, #1b0f38 0 14px, #150b2c 14px 28px);
}
.noart span { font: 4rem/1 var(--display); color: var(--pink); text-shadow: 0 0 20px var(--pink); text-transform: uppercase; }
.noart small { font-size: .7rem; letter-spacing: .4em; color: var(--muted); }
.badge {
  --c: var(--cyan);
  position: absolute; z-index: 1; right: 10px; bottom: 10px; min-width: 62px; padding: 6px 10px; border-radius: 10px; text-align: center;
  font: 1.25rem/1 var(--display); color: var(--c); background: rgba(9, 5, 19, .86);
  border: 2px solid var(--c); box-shadow: 0 0 16px color-mix(in srgb, var(--c) 70%, transparent), inset 0 0 10px color-mix(in srgb, var(--c) 30%, transparent);
  text-shadow: 0 0 10px var(--c);
}
.badge.open { --c: var(--green); font: 700 .72rem/1.4 var(--ui); letter-spacing: .2em; min-width: 0; }
.badge.lock { --c: var(--yellow); min-width: 0; font-size: 1rem; }
.mal {
  position: absolute; z-index: 1; left: 10px; top: 10px; padding: 3px 8px; border-radius: 6px;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; color: var(--yellow);
  background: rgba(9, 5, 19, .82); border: 1px solid rgba(255, 228, 94, .5);
}
.card-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h2 { font: 1.02rem/1.25 var(--display); letter-spacing: .02em; overflow-wrap: anywhere; }
.card-body h2 a { color: var(--text); }
.card-meta { display: flex; flex-direction: column; gap: 4px; font-size: .84rem; }
.by { color: var(--muted); }
.genres { display: flex; flex-wrap: wrap; gap: 5px; }
.genres span { padding: 1px 8px; border-radius: 5px; font-size: .72rem; font-weight: 600; color: #d9c8ff; background: rgba(157, 78, 221, .22); border: 1px solid rgba(157, 78, 221, .4); }
.genres .theme { color: #b5f7ff; background: rgba(0, 240, 255, .1); border-color: rgba(0, 240, 255, .3); }
.mine { font-size: .9rem; color: var(--muted); margin-top: auto; }
.mine .score { font-size: 1.25rem; margin-left: 4px; }
.note { font-size: .82rem; color: var(--yellow); }
details.all summary { cursor: pointer; font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); }
.scores { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.scores li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* rating control */
.rate { margin-top: auto; display: grid; gap: 8px; }
.rate-row { display: grid; grid-template-columns: 44px 1fr 44px; gap: 6px; }
.rate input {
  width: 100%; min-width: 0; text-align: center; font: 1.5rem/1 var(--display); padding: 8px 4px; border-radius: 10px;
  background: rgba(9, 5, 19, .7); border: 2px solid var(--line-2); color: var(--green);
  -moz-appearance: textfield; appearance: textfield;
}
.rate input::-webkit-outer-spin-button, .rate input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rate input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 16px rgba(61, 255, 168, .5); }
.rate.bad input { border-color: var(--red); color: var(--red); box-shadow: 0 0 16px rgba(255, 84, 112, .5); }
.step { border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 1.3rem; cursor: pointer; }
.step:hover { border-color: var(--cyan); color: var(--cyan); }
.rate-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 28px; }
.ghost {
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: none; color: var(--muted);
  font-size: .76rem; font-weight: 600; cursor: pointer;
}
.ghost:hover { color: var(--text); border-color: var(--text); }
.ghost.on { color: var(--bg); background: var(--yellow); border-color: var(--yellow); }
.rate-status { font-size: .78rem; font-weight: 700; margin-left: auto; color: var(--green); }
.rate.bad .rate-status { color: var(--red); }
.progress { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: .76rem; }
.progress .muted { margin-left: 4px; }
.dot { --c: var(--cyan); width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--c); opacity: .45; }
.dot.on { background: var(--c); opacity: 1; box-shadow: 0 0 8px var(--c); }

/* ---------- bars ---------- */
.bar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr 48px auto; align-items: center; gap: 10px; padding: 5px 0; font-size: .9rem; }
.bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt { height: 10px; border-radius: 999px; background: rgba(160, 110, 255, .14); overflow: hidden; }
.bt i { --c: var(--cyan); display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 45%, transparent), var(--c)); box-shadow: 0 0 10px var(--c); }
.bv { --c: var(--text); text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--c); }
.bn { font-size: .74rem; color: var(--muted); min-width: 30px; }
.bar.count .bt i { --c: var(--purple); }
.alink { color: var(--text); }
.alink:hover { color: var(--cyan); }
.gaprow { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: .9rem; border-bottom: 1px dashed var(--line); }
.gaprow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gaprow b { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* histogram */
.hist { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; height: 150px; align-items: end; }
.hcol { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; font-size: .74rem; color: var(--muted); }
.hcol i { --c: var(--cyan); width: 100%; min-height: 2px; border-radius: 5px 5px 0 0; background: linear-gradient(0deg, color-mix(in srgb, var(--c) 35%, transparent), var(--c)); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 60%, transparent); }
.hcol b { color: var(--text); }

/* ---------- tables ---------- */
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.list th, .list td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list thead th { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.list .num { text-align: right; font-variant-numeric: tabular-nums; }
.list tbody tr:hover { background: rgba(160, 110, 255, .07); }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.matrix { font-variant-numeric: tabular-nums; }
.matrix th, .matrix td { padding: 7px 8px; text-align: center; border: 1px solid var(--line); }
.matrix thead th { font-size: .74rem; font-weight: 600; max-width: 110px; min-width: 76px; vertical-align: bottom; line-height: 1.25; }
.matrix thead th a { color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.matrix tbody th, .matrix tfoot th { text-align: left; white-space: nowrap; position: sticky; left: 0; background: #170d31; z-index: 1; font-size: .8rem; }
.matrix td { --c: var(--text); color: var(--c); font-weight: 700; background: color-mix(in srgb, var(--c) 9%, transparent); }
.matrix td.nil { color: var(--muted); background: none; font-weight: 400; }
.matrix td.tot { color: var(--text); background: rgba(160, 110, 255, .12); }
.matrix tfoot td { font-size: .84rem; }
.matrix td.who { color: var(--muted); font-weight: 500; font-size: .76rem; background: none; }
.matrix.edit tbody th { white-space: normal; min-width: 170px; font-weight: 600; }
.matrix.edit td { padding: 3px; background: none; }
.matrix.edit input { width: 58px; text-align: center; padding: 6px 2px; border-radius: 6px; border: 1px solid var(--line); background: rgba(9, 5, 19, .6); }
.matrix.edit input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 10px rgba(0, 240, 255, .4); }

/* ---------- members ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.person {
  --c: var(--cyan);
  display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; padding: 16px; border-radius: var(--r);
  color: var(--text); background: linear-gradient(150deg, color-mix(in srgb, var(--c) 16%, transparent), transparent 55%), var(--panel);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); transition: transform .15s, box-shadow .15s;
}
.person:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 10px 30px -12px var(--c); }
.person.alum { opacity: .62; }
.avatar {
  --c: inherit;
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  font: 1.5rem/1 var(--display); color: var(--c); text-transform: uppercase;
  border: 2px solid var(--c); box-shadow: 0 0 16px color-mix(in srgb, var(--c) 70%, transparent), inset 0 0 12px color-mix(in srgb, var(--c) 35%, transparent);
  text-shadow: 0 0 10px var(--c);
}
.avatar.xl { width: 92px; height: 92px; font-size: 2.6rem; flex: none; }
.pname { font: 1.2rem var(--display); }
.pname small { margin-left: 8px; font: 600 .68rem var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pstats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; }
.pstats span { display: flex; flex-direction: column; }
.pstats b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.pstats small { font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.who .neon-title { text-shadow: 0 0 6px #fff, 0 0 18px var(--c), 0 0 42px var(--c); }

.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.pick { color: var(--text); border-radius: var(--r); overflow: hidden; background: var(--panel); border: 1px solid var(--line); transition: transform .15s, border-color .15s; }
.pick:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--cyan); }
.pick .badge { font-size: 1rem; min-width: 50px; right: 8px; bottom: 8px; padding: 5px 8px; }
.pick-body { display: flex; flex-direction: column; gap: 2px; padding: 10px; }
.pick-body b { font-size: .9rem; line-height: 1.25; }
.pick-body small { color: var(--muted); font-size: .76rem; }
.match { display: grid; gap: 8px; }
.matchrow { display: grid; grid-template-columns: 130px 1fr 60px; gap: 12px; align-items: center; }
.matchrow .bv { color: var(--muted); }

/* ---------- anime detail ---------- */
.detail { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 26px; margin-bottom: 22px; align-items: start; }
.poster.big { border-radius: var(--r); border: 1px solid var(--line-2); box-shadow: 0 0 40px -10px rgba(255, 46, 151, .6); }
.detail-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.detail .neon-title.sm { margin-bottom: 0; }
.aka { margin-top: -4px; }
.synopsis { white-space: pre-line; color: #dcd2f5; font-size: .94rem; line-height: 1.65; }

/* ---------- buttons, forms ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 10px; cursor: pointer;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .82rem; white-space: nowrap;
  color: var(--bg); background: var(--cyan); border: 1px solid var(--cyan); box-shadow: 0 0 14px rgba(0, 240, 255, .45);
}
.btn:hover { text-decoration: none; filter: brightness(1.12); box-shadow: 0 0 22px rgba(0, 240, 255, .7); }
.btn.ghost { color: var(--cyan); background: none; box-shadow: none; border-color: var(--line-2); border-radius: 10px; padding: 9px 18px; }
.btn.ghost:hover { border-color: var(--cyan); }
.btn.danger { color: var(--red); background: none; border-color: rgba(255, 84, 112, .5); box-shadow: none; }
.btn.danger:hover { background: rgba(255, 84, 112, .14); }
.btn.sm, .btn.sm.ghost { padding: 5px 11px; font-size: .72rem; border-radius: 8px; }
.btn.big { padding: 14px 28px; font-size: 1rem; background: var(--pink); border-color: var(--pink); color: #fff; box-shadow: 0 0 22px rgba(255, 46, 151, .6); }
.text-input {
  width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(9, 5, 19, .65);
}
.text-input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 12px rgba(0, 240, 255, .4); }
.text-input.narrow { width: 84px; }
.text-input.code { width: 88px; text-align: center; font-family: ui-monospace, Consolas, monospace; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--yellow); }
select.text-input { min-width: 130px; }
.codebox { display: flex; gap: 6px; align-items: center; }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 12px; }
.row.tight { gap: 8px; margin-top: 8px; align-items: center; }
.row.tight label { align-self: flex-end; }
.row.split { justify-content: space-between; align-items: center; }
.row label { display: flex; flex-direction: column; gap: 4px; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.row label.grow { flex: 1 1 200px; }
.row label.tiny { flex: none; }
.row label.check, .check { flex-direction: row; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: .9rem; font-weight: 500; color: var(--text); display: inline-flex; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--pink); }
input[type="color"] { width: 44px; height: 38px; padding: 2px; border-radius: 8px; border: 1px solid var(--line-2); background: none; cursor: pointer; }
.roster { margin: 16px 0 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.roster legend { padding: 0 8px; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); }
.roster legend .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.roster .check { padding-left: 8px; border-left: 3px solid var(--c); }
.msg { padding: 11px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid var(--line-2); background: var(--panel); }
.msg.ok { border-color: rgba(61, 255, 168, .6); color: var(--green); }
.msg.err { border-color: rgba(255, 84, 112, .7); color: #ff9db0; }
.warntext { color: var(--yellow); font-size: .8rem; }

/* admin rows */
.arow, .prow { display: grid; grid-template-columns: 62px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.prow { grid-template-columns: 1fr; padding-left: 14px; border-left: 3px solid var(--c); margin-top: 12px; border-top: 0; }
.prow.off { opacity: .6; }
.arow.done .athumb { box-shadow: 0 0 0 2px var(--yellow); }
.athumb { width: 62px; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: #150b2c; align-self: start; }
.athumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.arow .row:first-child, .prow .row:first-child { margin-top: 0; }
.astatus { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; font-size: .84rem; }
.mal-results { display: grid; gap: 8px; margin-top: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.mal-hit { display: grid; grid-template-columns: 46px 1fr; gap: 10px; align-items: center; text-align: left; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: rgba(9, 5, 19, .5); cursor: pointer; }
.mal-hit:hover { border-color: var(--cyan); }
.mal-hit img { width: 46px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 5px; }
.mal-hit b { display: block; font-size: .88rem; line-height: 1.25; }
.mal-hit small { color: var(--muted); font-size: .76rem; }

/* ---------- login gate ---------- */
body.gate .wrap { display: grid; place-items: center; }
.gate-card {
  width: min(460px, 100%); padding: 40px 30px; text-align: center; border-radius: 22px;
  background: var(--panel); border: 1px solid rgba(255, 46, 151, .5);
  box-shadow: 0 0 60px -14px rgba(255, 46, 151, .8), inset 0 0 40px -20px rgba(0, 240, 255, .5);
}
.gate-jp { font: 600 .9rem var(--ui); letter-spacing: .7em; color: var(--cyan); text-shadow: 0 0 10px var(--cyan); margin-bottom: 10px; }
.gate-sub { margin: 16px 0 22px; color: var(--muted); letter-spacing: .08em; }
.code-form { display: grid; gap: 16px; justify-items: center; }
.code-input {
  width: 100%; max-width: 300px; padding: 14px 0 14px .5em; text-align: center; text-transform: uppercase;
  font: 2.6rem/1 var(--display); letter-spacing: .5em; color: var(--yellow); caret-color: var(--pink);
  background: rgba(9, 5, 19, .75); border: 2px solid var(--cyan); border-radius: 14px;
  box-shadow: 0 0 22px rgba(0, 240, 255, .45), inset 0 0 18px rgba(0, 240, 255, .18); text-shadow: 0 0 12px var(--yellow);
}
.code-input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 26px rgba(255, 46, 151, .7), inset 0 0 18px rgba(255, 46, 151, .2); }
.code-input::placeholder { color: rgba(163, 150, 201, .4); text-shadow: none; }
.gate-card .msg { margin: 18px 0 0; }
.gate-hint { margin-top: 20px; font-size: .8rem; color: var(--muted); }

@media (max-width: 720px) {
  .topbar { gap: 10px; }
  .nav { order: 3; flex-basis: 100%; }
  .me { margin-left: auto; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .detail { grid-template-columns: 1fr; }
  .poster.big { max-width: 220px; }
  .bar { grid-template-columns: minmax(80px, 42%) 1fr 44px; }
  .bn { display: none; }
  .arow { grid-template-columns: 1fr; }
  .athumb { display: none; }
  .arrow { width: 38px; height: 38px; }
  .matchrow { grid-template-columns: 110px 1fr 54px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- dashboard: people list ---------- */
.plist { display: grid; gap: 10px; }
.plist-head h3 { margin: 0; }
.pfilter { max-width: 240px; }
.pcard {
  --c: var(--cyan);
  border-radius: 12px; border: 1px solid var(--line); border-left: 3px solid var(--c);
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 9%, transparent), transparent 45%), rgba(9, 5, 19, .45);
}
.pcard[open] { border-color: color-mix(in srgb, var(--c) 55%, transparent); border-left-color: var(--c); }
.pcard.off { opacity: .78; }
.pcard summary {
  display: grid; grid-template-columns: 44px minmax(150px, 1.5fr) 120px 110px minmax(150px, 1.2fr) auto;
  gap: 14px; align-items: center; padding: 10px 14px; cursor: pointer; list-style: none;
}
.pcard summary::-webkit-details-marker { display: none; }
.pcard summary:hover { background: rgba(160, 110, 255, .07); border-radius: 12px; }
.pcard .avatar { width: 40px; height: 40px; font-size: 1.1rem; }
.pc-name { display: flex; flex-direction: column; min-width: 0; }
.pc-name b { font: 1.05rem var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-name b .tag { font-family: var(--ui); font-size: .6rem; padding: 1px 7px; }
.pc-name small, .pc-cell small { font-size: .72rem; color: var(--muted); }
.pc-cell { display: flex; flex-direction: column; gap: 2px; font-size: .86rem; min-width: 0; }
.pc-cell small { letter-spacing: .1em; text-transform: uppercase; font-weight: 700; font-size: .64rem; }
.pc-cell .tag { align-self: flex-start; }
.pc-code { display: inline-flex; align-items: center; gap: 6px; }
.pc-code code { font-size: 1.05rem; font-weight: 700; letter-spacing: .18em; }
.copy { border: 1px solid var(--line-2); background: none; border-radius: 6px; padding: 0 6px; cursor: pointer; color: var(--muted); line-height: 1.5; }
.copy:hover { color: var(--cyan); border-color: var(--cyan); }
.pc-actions { justify-self: end; }
.pcard[open] .pc-edit { color: var(--bg); background: var(--cyan); }
.pc-body { padding: 4px 14px 14px; border-top: 1px dashed var(--line); margin-top: 2px; }
.pc-tools .push { margin-left: auto; }
.addp summary { list-style: none; cursor: pointer; display: inline-block; }
.addp summary::-webkit-details-marker { display: none; }
.addp[open] summary { margin-bottom: 4px; }
@media (max-width: 900px) {
  .pcard summary { grid-template-columns: 44px 1fr auto; }
  .pcard summary .pc-cell { grid-column: 2 / -1; flex-direction: row; gap: 8px; align-items: center; }
}
@media (min-width: 901px) {
  .pc-body form.row { flex-wrap: nowrap; align-items: flex-end; }
  .pc-body form.row label.grow { flex: 1 1 0; min-width: 0; }
}

/* The ColorPick Eyedropper browser extension injects a rainbow button next to colour inputs. */
img.colorpick-eyedropper-input-trigger { display: none !important; }

/* ---------- one pick made of several MAL entries ---------- */
textarea.text-input { resize: vertical; min-height: 40px; font-size: .84rem; line-height: 1.5; white-space: pre; overflow-x: auto; }
.parts { display: grid; gap: 8px; }
.parts h3 { margin-bottom: 0; }
.part { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 10px; color: var(--text); border: 1px solid var(--line); background: rgba(9, 5, 19, .45); }
.part:hover { text-decoration: none; border-color: var(--cyan); }
.part small { color: var(--muted); font-size: .8rem; }

.nextup { margin: 0 0 14px; padding: 10px 14px; border: 1px dashed var(--line-2); border-radius: 10px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; box-shadow: none; filter: none; }

/* ---------- drill-down: clickable stats and the list behind them ---------- */
a.tile.drill { display: block; color: var(--text); cursor: pointer; transition: transform .15s, box-shadow .15s; }
a.tile.drill:hover { text-decoration: none; transform: translateY(-2px); box-shadow: inset 0 0 22px -12px var(--c), 0 8px 24px -12px var(--c); }
.tgo { margin-top: 6px; font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--c) 75%, #fff); }
a.drill.alink { text-decoration: underline dotted; text-underline-offset: 4px; text-decoration-color: var(--line-2); }
a.drill.alink:hover { color: var(--cyan); text-decoration-color: var(--cyan); }
.browse .thumb { width: 46px; padding: 6px 4px 6px 10px; }
.browse .thumb img { width: 38px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 5px; display: block; }
.browse small { font-size: .76rem; }

/* ---------- sortable tables ---------- */
table.sortable thead th[role="button"] { cursor: pointer; user-select: none; }
table.sortable thead th[role="button"]:hover { color: var(--cyan); }
table.sortable thead th[role="button"]::after { content: " ↕"; opacity: .35; }
table.sortable thead th[data-dir] { color: var(--cyan); }
table.sortable thead th[data-dir="1"]::after { content: " ↑"; opacity: 1; }
table.sortable thead th[data-dir="-1"]::after { content: " ↓"; opacity: 1; }
