:root {
  --bg: #030304;
  --panel: rgba(12, 12, 16, .62);
  --panel-solid: #0b0b0e;
  --panel-2: rgba(255, 255, 255, .045);
  --text: #e9e9ee;
  --muted: #7d7f8a;
  --accent: #a3243b;            /* 深緋紅：唯一的強調色，少量使用 */
  --accent-rgb: 163, 36, 59;
  --accent-2: #3d0c17;          /* 酒紅暗影 */
  --accent-3: #161d2c;          /* 午夜鋼藍 */
  --accent-4: #0c1519;          /* 深淵墨綠 */
  --silver: #c4c6cf;
  --border: rgba(255, 255, 255, .07);
  --border-strong: rgba(255, 255, 255, .16);
  --radius: 20px;
  --grad: linear-gradient(120deg, #f4f4f7 0%, #6f7280 35%, #e6e7ec 55%, #5d606c 80%, #f4f4f7 100%);
  --grad-accent: linear-gradient(120deg, #4a0e1b, #a3243b, #2c0810, #4a0e1b);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
}
a { color: inherit; }
::selection { background: rgba(var(--accent-rgb), .7); color: #fff; }

/* =========================================================
   動態背景
   ========================================================= */
.bg-layer { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.bg-layer .blob {
  position: absolute; border-radius: 50%; filter: blur(110px); opacity: .5;
  will-change: transform;
}
.bg-layer .b1 { width: 55vmax; height: 55vmax; left: -15vmax; top: -20vmax;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 65%); animation: drift1 40s var(--ease) infinite alternate; }
.bg-layer .b2 { width: 50vmax; height: 50vmax; right: -18vmax; top: 10vh;
  background: radial-gradient(circle, var(--accent-3) 0%, transparent 65%); animation: drift2 48s var(--ease) infinite alternate; }
.bg-layer .b3 { width: 45vmax; height: 45vmax; left: 20vw; bottom: -25vmax;
  background: radial-gradient(circle, var(--accent-4) 0%, transparent 65%); opacity: .6; animation: drift3 56s var(--ease) infinite alternate; }
.bg-layer .b4 { width: 30vmax; height: 30vmax; right: 15vw; bottom: 5vh;
  background: radial-gradient(circle, #1a1a22 0%, transparent 65%); opacity: .5; animation: drift1 36s var(--ease) infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(18vw, 22vh) scale(1.25) rotate(40deg); } }
@keyframes drift2 { to { transform: translate(-22vw, 30vh) scale(.8) rotate(-30deg); } }
@keyframes drift3 { to { transform: translate(-15vw, -35vh) scale(1.3); } }

/* 細格線，隨時間緩慢移動 */
.bg-grid {
  position: fixed; inset: -50%; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(800px) rotateX(55deg) translateY(0);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 60%);
  animation: grid-move 18s linear infinite;
}
@keyframes grid-move { to { background-position: 0 64px, 64px 0; } }

.bg-vignette {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 35%, transparent 30%, rgba(0, 0, 0, .55) 75%, rgba(0, 0, 0, .9) 100%);
}
/* 緩慢流動的霧 */
.bg-fog {
  position: fixed; inset: -20%; z-index: -2; pointer-events: none; opacity: .5;
  background:
    radial-gradient(ellipse 60% 25% at 20% 60%, rgba(120, 125, 140, .06), transparent 70%),
    radial-gradient(ellipse 50% 20% at 80% 40%, rgba(120, 125, 140, .05), transparent 70%);
  animation: fog 60s linear infinite alternate;
}
@keyframes fog { to { transform: translateX(12%) translateY(-4%); } }
#particles { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

/* 底片顆粒 */
.bg-grain {
  position: fixed; inset: -100%; z-index: -1; pointer-events: none; opacity: .08;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-5%, 3%); } 40% { transform: translate(4%, -6%); }
  60% { transform: translate(-3%, 5%); } 80% { transform: translate(6%, 2%); } 100% { transform: translate(0, 0); }
}

/* 滑鼠光暈 */
.cursor-glow {
  position: fixed; z-index: -1; width: 520px; height: 520px; border-radius: 50%; pointer-events: none;
  left: 0; top: 0; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(var(--accent-rgb), .07), transparent 60%);
  transition: opacity .4s;
}

/* =========================================================
   基本元件
   ========================================================= */
button, .btn {
  font: inherit; cursor: pointer;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  padding: 9px 18px; border-radius: 999px;
  text-decoration: none; display: inline-block;
  backdrop-filter: blur(8px);
  transition: transform .25s var(--ease), border-color .25s, background .25s, box-shadow .25s;
}
button:hover:not(:disabled), .btn:hover { border-color: var(--border-strong); transform: translateY(-1px); background: rgba(255, 255, 255, .1); }
button:active:not(:disabled), .btn:active { transform: translateY(0) scale(.97); }
button:disabled { opacity: .35; cursor: not-allowed; }
.btn-primary {
  position: relative; overflow: hidden;
  background: var(--grad-accent); background-size: 300% 100%;
  border: 1px solid rgba(var(--accent-rgb), .55); font-weight: 700; color: #fff;
  box-shadow: 0 8px 30px -8px rgba(var(--accent-rgb), .45);
  animation: grad-shift 6s linear infinite;
}
.btn-primary:hover:not(:disabled) { background: var(--grad-accent); background-size: 300% 100%; box-shadow: 0 12px 40px -8px rgba(var(--accent-rgb), .6); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .18) 50%, transparent 70%);
  transform: translateX(-120%); animation: sheen 3.5s var(--ease) infinite;
}
@keyframes sheen { 60%, 100% { transform: translateX(120%); } }
@keyframes grad-shift { to { background-position: 300% 0; } }
.btn-danger { color: #ff7a8a; }
.btn-sm { padding: 5px 12px; font-size: 13px; }

input, textarea {
  font: inherit; width: 100%;
  padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .35);
  color: var(--text);
  transition: border-color .25s, box-shadow .25s;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .18); }
label { display: block; margin: 14px 0 6px; color: var(--muted); font-size: 13px; letter-spacing: .3px; }
.error { color: #ff7a8a; min-height: 1.5em; font-size: 14px; }
.muted { color: var(--muted); }
.grad-text {
  background: var(--grad); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: grad-shift 8s linear infinite;
}

/* =========================================================
   頁首
   ========================================================= */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(7, 7, 12, .45);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  animation: drop-in .8s var(--ease) both;
}
@keyframes drop-in { from { transform: translateY(-100%); opacity: 0; } }
.admin-preview {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 8px clamp(16px, 4vw, 40px);
  background: var(--accent-2); border-bottom: 1px solid rgba(var(--accent-rgb), .6);
  color: var(--text); font-size: 13px; text-align: center;
}
.logo {
  font-weight: 900; font-size: 22px; text-decoration: none; letter-spacing: .5px;
  display: inline-flex; align-items: center;
}
.logo::before {
  content: ""; width: 26px; height: 26px; border-radius: 8px; margin-right: 8px;
  background: var(--grad); background-size: 300% 100%;
  animation: grad-shift 6s linear infinite, spin-soft 10s linear infinite;
  box-shadow: 0 0 20px rgba(255, 255, 255, .2);
  clip-path: polygon(30% 15%, 85% 50%, 30% 85%);
}
@keyframes spin-soft { 50% { filter: brightness(.7); } }
.logo span { color: var(--muted); font-weight: 300; }
.logo .badge { margin-left: 10px; }
.nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--border);
}
.badge.vip { background: var(--grad); background-size: 300% 100%; color: #111; border: none; font-weight: 700; animation: grad-shift 6s linear infinite; }

main { max-width: 1180px; margin: 0 auto; padding: 28px clamp(14px, 3vw, 28px) 100px; }

/* =========================================================
   Hero
   ========================================================= */
.hero { text-align: center; padding: clamp(40px, 9vh, 100px) 0 clamp(30px, 6vh, 60px); }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted);
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel-2);
  backdrop-filter: blur(8px);
}
.hero .eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); } }
.hero h1 {
  text-shadow: 0 0 60px rgba(255, 255, 255, .06);
  font-size: clamp(40px, 8vw, 92px); line-height: 1.02; margin: 22px 0 14px; font-weight: 900; letter-spacing: -1px;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: inline-block; animation: rise 1s var(--ease) both; }
.hero h1 .line:nth-child(2) > span { animation-delay: .12s; }
@keyframes rise { from { transform: translateY(110%) rotate(4deg); opacity: 0; } }
.hero p { color: var(--muted); max-width: 520px; margin: 0 auto; animation: fade-up 1s .3s var(--ease) both; }
.hero .hero-stats { display: flex; justify-content: center; gap: clamp(20px, 5vw, 56px); margin-top: 34px; animation: fade-up 1s .45s var(--ease) both; }
.hero .hero-stats b { display: block; font-size: 30px; font-weight: 800; }
.hero .hero-stats span { color: var(--muted); font-size: 13px; }
@keyframes fade-up { from { transform: translateY(24px); opacity: 0; } }

/* 跑馬燈：人物名稱 */
.marquee {
  overflow: hidden; border-block: 1px solid var(--border); margin: 0 calc(-1 * clamp(14px, 3vw, 28px)) 36px;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  background: rgba(255, 255, 255, .02);
}
.marquee-track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee-track a {
  padding: 14px 28px; font-size: 18px; font-weight: 700; text-decoration: none; white-space: nowrap; color: var(--muted);
  transition: color .3s;
}
.marquee-track a::after { content: "✦"; margin-left: 56px; color: rgba(var(--accent-rgb), .6); }
.marquee-track a:hover { color: var(--text); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================
   動態牆
   ========================================================= */
.reveal { opacity: 0; transform: translateY(40px) scale(.98); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.character {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(16px, 3vw, 26px);
  margin-bottom: 28px;
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .8);
  isolation: isolate;
}
/* 流動的漸層邊框 */
.character::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: -1;
  background: conic-gradient(from var(--angle, 0deg), transparent 0 62%, rgba(255, 255, 255, .35), rgba(var(--accent-rgb), .8), transparent 88% 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: border-spin 12s linear infinite; opacity: .7;
}
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes border-spin { to { --angle: 360deg; } }

.character-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.avatar-wrap {
  position: relative; flex: none; width: 66px; height: 66px; border-radius: 50%; padding: 3px;
  background: conic-gradient(#d9dae0, #3a3c45, var(--accent), #1b1c22, #d9dae0);
  animation: spin 6s linear infinite;
}
.avatar-wrap > * { animation: spin 6s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.avatar {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center;
  font-weight: 800; font-size: 24px; background: var(--panel-solid); border: 3px solid var(--bg);
}
.character-head h2 { margin: 0; font-size: clamp(20px, 3vw, 26px); letter-spacing: .3px; }
.character-head .sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.character-head .bio { margin: 4px 0 0; color: var(--muted); font-size: 14px; white-space: pre-line; }
.live {
  margin-left: auto; align-self: flex-start; font-size: 11px; letter-spacing: 2px; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
}
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .2; } }

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
@media (max-width: 600px) {
  .media-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .character-head .live { display: none; }
}
.tile {
  position: relative; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden;
  background: rgba(255, 255, 255, .04); cursor: pointer; border: 1px solid var(--border); padding: 0;
  transform-style: preserve-3d;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .4s;
  animation: tile-in .8s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 70ms + .15s);
  animation-play-state: paused;
}
.reveal.in .tile { animation-play-state: running; }
@keyframes tile-in { from { opacity: 0; translate: 0 30px; scale: .92; } }
.tile:hover {
  transform: translateY(-6px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  box-shadow: 0 25px 50px -20px rgba(0, 0, 0, .9); border-color: var(--border-strong);
}
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--ease), filter .6s; }
.tile:hover img, .tile:hover video { transform: scale(1.08); }
.tile::after { /* 底部漸層 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent 40%);
}
.tile .placeholder {
  width: 100%; height: 100%;
  background:
    radial-gradient(circle at 30% 20%, rgba(70, 80, 110, .25), transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(var(--accent-rgb), .18), transparent 55%),
    #08080b;
  background-size: 200% 200%;
  animation: placeholder-move 8s ease-in-out infinite alternate;
}
@keyframes placeholder-move { to { background-position: 100% 100%; } }
.tile .tag {
  position: absolute; z-index: 2; top: 10px; left: 10px; font-size: 11px; font-weight: 700; letter-spacing: 1px;
  padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px);
}
.tile .tag.free { background: rgba(10, 10, 12, .7); color: var(--silver); border: 1px solid rgba(255, 255, 255, .22); }
.tile .kind { position: absolute; z-index: 2; bottom: 10px; left: 12px; font-size: 12px; color: rgba(255, 255, 255, .85); }
.tile .play {
  position: absolute; z-index: 2; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px;
  border-radius: 50%; pointer-events: none;
  background: rgba(255, 255, 255, .15); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .35);
  display: grid; place-items: center; transition: transform .4s var(--ease), background .4s;
}
.tile .play::before { /* 漣漪 */
  content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6);
  animation: ripple 2.2s var(--ease) infinite;
}
@keyframes ripple { from { transform: scale(1); opacity: .9; } to { transform: scale(1.8); opacity: 0; } }
.tile .play::after {
  content: ""; width: 0; height: 0; margin-left: 5px;
  border-left: 18px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent;
}
.tile:hover .play { transform: scale(1.12); background: rgba(var(--accent-rgb), .75); }

.tile.locked img { filter: blur(3px) brightness(.35) saturate(.4); }
.tile.locked:hover img { filter: blur(1px) brightness(.45) saturate(.6); }
.tile .lock {
  position: absolute; z-index: 2; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; font-size: 13px; font-weight: 600; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); overflow: hidden;
}
.tile .lock::before { /* 掃光 */
  content: ""; position: absolute; inset: -50%;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .09) 50%, transparent 60%);
  animation: lock-sheen 3.6s var(--ease) infinite; animation-delay: calc(var(--i, 0) * 180ms);
}
@keyframes lock-sheen { from { transform: translateX(-60%); } 55%, to { transform: translateX(60%); } }
.tile .lock .icon {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 22px;
  background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(10px);
  animation: float 3.5s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -400ms);
  transition: transform .4s var(--ease), background .4s;
}
.tile:hover .lock .icon { background: rgba(var(--accent-rgb), .75); transform: scale(1.1) rotate(-8deg); animation-play-state: paused; }
@keyframes float { 50% { transform: translateY(-6px); } }

.empty { text-align: center; color: var(--muted); padding: 60px 0; }
.skeleton { height: 360px; border-radius: var(--radius); margin-bottom: 28px; border: 1px solid var(--border);
  background: linear-gradient(100deg, rgba(255, 255, 255, .03) 30%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, .03) 70%);
  background-size: 300% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* =========================================================
   Modal
   ========================================================= */
.modal {
  position: fixed; inset: 0; z-index: 100; display: flex; visibility: hidden; opacity: 0;
  background: rgba(0, 0, 0, .78); backdrop-filter: blur(14px);
  align-items: center; justify-content: center; padding: 20px;
  transition: opacity .35s var(--ease), visibility .35s;
}
.modal.open { visibility: visible; opacity: 1; }
.modal-card {
  position: relative; overflow: hidden;
  background: rgba(10, 10, 13, .9); border: 1px solid var(--border-strong); border-radius: 24px;
  padding: 36px 30px 30px; max-width: 420px; width: 100%; text-align: center;
  transform: translateY(30px) scale(.94); transition: transform .5s var(--ease);
  box-shadow: 0 40px 100px -30px rgba(var(--accent-rgb), .3);
}
.modal.open .modal-card, .modal.open .viewer { transform: none; }
.modal-card::before {
  content: ""; position: absolute; width: 260px; height: 260px; top: -140px; left: 50%; margin-left: -130px; z-index: -1;
  background: radial-gradient(circle, var(--accent), transparent 65%); opacity: .6; filter: blur(30px);
  animation: float 4s ease-in-out infinite;
}
.modal-card .big-lock {
  width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 22px; display: grid; place-items: center; font-size: 34px;
  background: var(--grad-accent); background-size: 300% 100%; border: 1px solid rgba(var(--accent-rgb), .5); animation: grad-shift 6s linear infinite, wobble 3s ease-in-out infinite;
  box-shadow: 0 14px 40px -10px rgba(var(--accent-rgb), .6);
}
@keyframes wobble { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) translateY(-4px); } }
.modal-card h3 { margin: 0 0 6px; font-size: 22px; }
.modal-card .actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.viewer { position: relative; max-width: min(480px, 100%); max-height: 90vh; transform: scale(.9); transition: transform .5s var(--ease); }
.viewer img, .viewer video { max-width: 100%; max-height: 90vh; border-radius: 18px; display: block; box-shadow: 0 30px 90px -20px rgba(0, 0, 0, .95); }
.viewer-close { position: absolute; top: -14px; right: -14px; width: 38px; height: 38px; padding: 0; border-radius: 50%; background: rgba(10, 10, 13, .95); }

/* =========================================================
   表單頁
   ========================================================= */
.card {
  position: relative;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .8);
  animation: fade-up .8s var(--ease) both;
}
.narrow { max-width: 430px; margin: 50px auto; }
.narrow::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: -1; pointer-events: none;
  background: conic-gradient(from var(--angle, 0deg), transparent 0 62%, rgba(255, 255, 255, .35), rgba(var(--accent-rgb), .8), transparent 88% 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: border-spin 6s linear infinite;
}
.tabs { display: flex; gap: 4px; margin-bottom: 8px; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, .3); border: 1px solid var(--border); }
.tabs button { flex: 1; border: none; background: transparent; }
.tabs button.active { background: var(--grad-accent); background-size: 300% 100%; animation: grad-shift 6s linear infinite; font-weight: 700; }
.plan { text-align: center; }
.plan h2 { margin-top: 0; }
.plan .price { font-size: 48px; font-weight: 900; margin: 6px 0 10px; }
.plan ul { text-align: left; color: var(--muted); list-style: none; padding: 0; margin: 0 0 18px; }
.plan li { padding: 8px 0 8px 30px; position: relative; border-bottom: 1px dashed var(--border); }
.plan li::before { content: "✦"; position: absolute; left: 6px; color: var(--accent); }

/* =========================================================
   後台
   ========================================================= */
.admin-grid { display: grid; grid-template-columns: 290px 1fr; gap: 20px; align-items: start; }
@media (max-width: 800px) { .admin-grid { grid-template-columns: 1fr; } }
.char-list { list-style: none; padding: 0; margin: 12px 0 0; }
.char-list li {
  padding: 11px 14px; border-radius: 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px;
  transition: background .25s, transform .25s var(--ease);
}
.char-list li:hover { background: var(--panel-2); transform: translateX(4px); }
.char-list li.active { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--accent); }
.admin-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.admin-item {
  background: rgba(255, 255, 255, .04); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; font-size: 13px;
}
.admin-item .thumb { aspect-ratio: 9 / 16; background: #000; }
.admin-item .thumb img, .admin-item .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-item .meta { padding: 8px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 26px; text-align: center; color: var(--muted);
  margin-top: 18px; background: rgba(255, 255, 255, .02); transition: border-color .3s, background .3s, transform .3s var(--ease);
}
.dropzone.drag { border-color: var(--accent); color: var(--text); background: rgba(var(--accent-rgb), .06); transform: scale(1.01); }
.progress { font-size: 13px; color: var(--muted); margin-top: 8px; white-space: pre-line; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.stats span {
  padding: 8px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); backdrop-filter: blur(10px);
  color: var(--muted); font-size: 13px;
}
.stats b { color: var(--text); font-size: 18px; margin-left: 6px; }

/* =========================================================
   頁尾 / 其他
   ========================================================= */
.site-footer { text-align: center; padding: 40px 20px 50px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); }
.site-footer nav { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.site-footer a { text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: var(--text); }
.age-gate { z-index: 200; background: rgba(0, 0, 0, .94); }
.age-gate .big-lock { font-size: 22px; font-weight: 900; }
.legal { max-width: 760px; margin: 30px auto; }
.legal h1 { margin-top: 0; }
.legal h2 { font-size: 18px; margin-top: 28px; }
.legal p, .legal li { color: #b9bbc5; }
.legal .note { border-left: 3px solid var(--accent); padding: 10px 14px; background: rgba(var(--accent-rgb), .08); border-radius: 8px; }
.notice { padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; border: 1px solid var(--border); background: var(--panel-2); }
.notice.ok { border-color: rgba(255, 255, 255, .25); }
.notice.warn { border-color: rgba(var(--accent-rgb), .6); background: rgba(var(--accent-rgb), .08); }
.load-more { display: block; margin: 10px auto 0; }
.sentinel { height: 1px; }
.viewer-caption { margin-top: 12px; text-align: left; }
.viewer-caption h4 { margin: 0 0 4px; }
.viewer-caption p { margin: 0; color: var(--muted); font-size: 14px; white-space: pre-line; }
.viewer-media { position: relative; }
.viewer-watermark {
  position: absolute; pointer-events: none; user-select: none; font-size: 12px; letter-spacing: 1px;
  color: rgba(255, 255, 255, .28); text-shadow: 0 1px 2px rgba(0, 0, 0, .6); transition: top 2s ease, left 2s ease; white-space: nowrap;
}
.tile .title {
  position: absolute; z-index: 2; bottom: 28px; left: 12px; right: 12px; text-align: left; font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
}
.share-btn { margin-left: auto; align-self: flex-start; }
.character-head h2 a { text-decoration: none; }
.character-head h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
table.users { width: 100%; border-collapse: collapse; font-size: 14px; }
table.users th, table.users td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.users th { color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: .5px; }
.admin-tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.admin-tabs button.active { border-color: var(--accent); background: rgba(var(--accent-rgb), .18); }
.check { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; margin: 10px 0; cursor: pointer; }
.check input { width: auto; }
.admin-item input, .admin-item textarea { font-size: 12px; padding: 6px 8px; border-radius: 8px; }
.admin-item .fields { padding: 8px 8px 0; display: grid; gap: 6px; }

/* =========================================================
   減少動態偏好
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  #particles, .cursor-glow { display: none; }
}
