/* ==========================================================================
   公主连结作业簿 · Guild War Notes
   深色战术纸页风格 / 无外部依赖
   ========================================================================== */

:root {
  --bg: #070b15;
  --bg-soft: #0b1120;
  --panel: rgba(16, 23, 41, 0.76);
  --panel-strong: #111a2d;
  --panel-soft: rgba(255, 255, 255, 0.025);
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.15);
  --ink: #f5f0e7;
  --ink-2: #cbd2e2;
  --muted: #94a0bc;
  --muted-2: #67738f;
  --pink: #ff87a4;
  --pink-2: #ffb5c7;
  --pink-deep: #e96486;
  --gold: #f0c885;
  --gold-2: #d9a95d;
  --mint: #7fe4cd;
  --violet: #b9a0ff;
  --sky: #7fc4ff;
  --peach: #ffb18b;
  --danger: #ff7c7c;
  --paper: #f2e8d6;
  --paper-ink: #1b2338;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --serif: "Palatino Linotype", "Book Antiqua", "Songti SC", "STSong", Georgia, serif;
  --display: "Palatino Linotype", "Book Antiqua", Georgia, "Songti SC", serif;
  --shadow-lg: 0 32px 90px rgba(0, 0, 0, 0.46);
  --radius: 18px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

svg {
  fill: none;
}

h1, h2, h3, h4, p {
  margin-top: 0;
}

::selection {
  background: rgba(255, 135, 164, 0.35);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.shell {
  width: min(1180px, calc(100% - 64px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--pink);
  color: #231019;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Ambient background
   -------------------------------------------------------------------------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(1100px 760px at 85% -8%, rgba(123, 92, 255, 0.17), transparent 64%),
    radial-gradient(900px 620px at 4% 2%, rgba(255, 111, 148, 0.1), transparent 66%),
    radial-gradient(840px 600px at 48% 40%, rgba(70, 110, 180, 0.06), transparent 70%),
    linear-gradient(180deg, #080d19 0%, #0a1020 48%, #070b15 100%);
}

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.9;
}

.glow-a {
  width: 520px;
  height: 520px;
  top: 150px;
  right: -180px;
  background: radial-gradient(circle, rgba(255, 135, 164, 0.12), transparent 66%);
}

.glow-b {
  width: 620px;
  height: 420px;
  top: 620px;
  left: -260px;
  background: radial-gradient(circle, rgba(127, 196, 255, 0.08), transparent 68%);
}

.glow-c {
  width: 480px;
  height: 480px;
  top: 1120px;
  right: -150px;
  background: radial-gradient(circle, rgba(185, 160, 255, 0.08), transparent 68%);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 54px 54px;
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(1100px 680px at 52% 0%, #000 8%, transparent 76%);
  mask-image: radial-gradient(1100px 680px at 52% 0%, #000 8%, transparent 76%);
}

.ambient-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.75) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(255, 186, 207, 0.58) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(255, 255, 255, 0.4) 0 1px, transparent 1.3px);
  background-size: 247px 247px, 389px 389px, 173px 173px;
  background-position: 23px 41px, 137px 89px, 78px 153px;
  opacity: 0.32;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 78%);
  mask-image: linear-gradient(180deg, #000, transparent 78%);
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  outline: none;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.985);
}

.btn-primary {
  color: #2a111a;
  background: linear-gradient(135deg, #ffc0cf 0%, #ff8ea9 52%, #ff789a 100%);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 9px 30px rgba(255, 111, 148, 0.23), inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.btn-primary:hover {
  box-shadow: 0 13px 38px rgba(255, 111, 148, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn-primary:disabled {
  opacity: 0.58;
  cursor: wait;
  transform: none;
}

.btn-ghost {
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--line);
}

.btn-ghost:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-strong);
}

.btn-lg {
  min-height: 48px;
  padding: 14px 24px;
  font-size: 14px;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--pink-2);
  font-size: 11.5px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.text-btn:hover {
  color: #ffd2dd;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.icon-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line-strong);
  transform: rotate(4deg);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(127, 228, 205, 0.08), 0 0 12px rgba(127, 228, 205, 0.5);
  vertical-align: 1px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 10px;
  color: #21162a;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 14px rgba(0, 0, 0, 0.18);
}

.avatar-rose { background: linear-gradient(145deg, #ffc2cf, #f27798); }
.avatar-gold { background: linear-gradient(145deg, #ffe0a5, #d9a95d); }
.avatar-mint { background: linear-gradient(145deg, #a9f4e3, #58c9b2); }
.avatar-violet { background: linear-gradient(145deg, #d6c6ff, #9d82e8); }
.avatar-sky { background: linear-gradient(145deg, #b7e0ff, #6aace8); }
.avatar-peach { background: linear-gradient(145deg, #ffd2bd, #ed916b); }

.avatar-xl {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-size: 24px;
}

.avatar-has-img {
  padding: 0;
  overflow: hidden;
  background: #0d1324;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.avatar-picker {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  max-height: 210px;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.avatar-option {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.avatar-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-option.is-active {
  border-color: #ff91ab;
  box-shadow: 0 0 0 2px rgba(255, 145, 171, 0.18);
}

.avatar-option-default {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Topbar
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(7, 11, 21, 0.9), rgba(7, 11, 21, 0.66));
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  backdrop-filter: blur(22px) saturate(145%);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.topbar.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(7, 11, 21, 0.88);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 164, 184, 0.3);
  border-radius: 13px;
  color: var(--pink);
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.18), transparent 48%),
    linear-gradient(145deg, rgba(255, 135, 164, 0.2), rgba(240, 200, 133, 0.07));
  box-shadow: 0 8px 28px rgba(255, 111, 148, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.015em;
  line-height: 1.25;
}

.brand-copy small {
  color: var(--muted-2);
  font-family: var(--serif);
  font-size: 8px;
  letter-spacing: 0.24em;
  line-height: 1.2;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: auto;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.035);
}

.nav-link.is-active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 13px;
  height: 2px;
  border-radius: 2px;
  background: var(--pink);
  transform: translateX(-50%);
}

.nav-count {
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(255, 135, 164, 0.15);
  color: var(--pink-2);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.btn-publish {
  min-height: 40px;
  padding: 10px 15px;
  font-size: 12.5px;
}

.btn-publish svg {
  width: 15px;
  height: 15px;
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 8px 4px 4px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.profile-pill:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-width: 100px;
}

.profile-meta strong {
  max-width: 100px;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-meta small {
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

/* --------------------------------------------------------------------------
   Preview bar
   -------------------------------------------------------------------------- */

.preview-bar {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid rgba(240, 200, 133, 0.1);
  background: linear-gradient(90deg, rgba(240, 200, 133, 0.055), rgba(255, 135, 164, 0.035));
}

.preview-bar[hidden] {
  display: none;
}

.preview-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding-block: 5px;
}

.preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 4px 8px;
  border: 1px solid rgba(240, 200, 133, 0.22);
  border-radius: 5px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}

.preview-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.preview-inner p {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.5;
}

.preview-inner p strong {
  color: var(--ink-2);
  font-weight: 600;
}

.preview-close {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted-2);
  flex: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.preview-close:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.preview-close svg {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  z-index: 1;
  padding: 82px 0 54px;
  overflow: hidden;
}

.hero-orbit {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.orbit-one {
  top: -120px;
  right: -120px;
  width: 620px;
  height: 620px;
  border: 1px dashed rgba(255, 255, 255, 0.07);
  animation: orbitSpin 90s linear infinite;
}

.orbit-one::after {
  content: "✦";
  position: absolute;
  top: 76px;
  left: 92px;
  color: rgba(240, 200, 133, 0.62);
  font-size: 12px;
}

.orbit-two {
  top: 14px;
  right: 10px;
  width: 410px;
  height: 410px;
  border: 1px solid rgba(240, 200, 133, 0.055);
  animation: orbitSpin 55s linear infinite reverse;
}

.orbit-two::after {
  content: "·";
  position: absolute;
  right: 48px;
  bottom: 84px;
  color: rgba(255, 135, 164, 0.6);
  font-size: 20px;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(420px, 0.96fr);
  align-items: center;
  gap: 58px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.19em;
  line-height: 1.4;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(127, 228, 205, 0.08), 0 0 18px rgba(127, 228, 205, 0.3);
}

.eyebrow-sep {
  width: 1px;
  height: 11px;
  background: var(--line-strong);
}

.eyebrow-live {
  color: var(--mint);
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 22px 0 0;
  color: var(--ink);
  font-size: clamp(46px, 5.2vw, 70px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.headline-glow {
  color: transparent;
  background: linear-gradient(105deg, #ffe0ad 0%, #ffb1c2 42%, #c4abff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 8px 30px rgba(255, 135, 164, 0.12));
}

.lede {
  max-width: 500px;
  margin: 22px 0 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.95;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.hero-actions .btn-ghost svg {
  width: 15px;
  height: 15px;
  opacity: 0.7;
}

.hero-stats {
  display: flex;
  margin-top: 42px;
  padding-top: 21px;
  border-top: 1px solid var(--line);
}

.hero-stat {
  min-width: 96px;
  padding-right: 30px;
  margin-right: 30px;
  border-right: 1px solid var(--line);
}

.hero-stat:last-child {
  padding-right: 0;
  margin-right: 0;
  border-right: 0;
}

.hero-stat strong {
  display: block;
  color: var(--ink);
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.hero-stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 9.5px;
  letter-spacing: 0.12em;
}

.hero-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin: 17px 0 0;
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.hero-note strong {
  margin: 0 3px;
  color: var(--mint);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Hero paper card
   -------------------------------------------------------------------------- */

.hero-art {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 500px;
  perspective: 1300px;
}

.hero-art::before {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 135, 164, 0.13), transparent 64%);
  filter: blur(16px);
  pointer-events: none;
}

.paper-shadow {
  position: absolute;
  width: 382px;
  height: 438px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: #151c2f;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.paper-shadow-a {
  z-index: 0;
  opacity: 0.9;
  transform: rotate(-5deg) translate(-13px, 9px);
}

.paper-shadow-b {
  z-index: 0;
  opacity: 0.45;
  background: rgba(23, 31, 52, 0.72);
  transform: rotate(4deg) translate(19px, 17px);
}

.paper-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: min(404px, 100%);
  padding: 24px 26px 19px;
  border: 0;
  border-radius: 8px;
  color: var(--paper-ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.8), transparent 36%),
    linear-gradient(155deg, #f7efdf 0%, #efe3ce 58%, #e7d8bd 100%);
  box-shadow:
    0 42px 90px rgba(0, 0, 0, 0.48),
    0 2px 0 rgba(255, 255, 255, 0.6) inset,
    0 -1px 0 rgba(109, 82, 45, 0.12) inset;
  text-align: left;
  transform: rotate(1.5deg);
  transform-origin: center;
  transition: transform 0.55s cubic-bezier(0.2, 0.75, 0.2, 1), box-shadow 0.55s cubic-bezier(0.2, 0.75, 0.2, 1);
}

.paper-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background-image: radial-gradient(rgba(67, 49, 28, 0.15) 0.65px, transparent 0.8px);
  background-size: 5px 5px;
  opacity: 0.26;
  pointer-events: none;
}

.paper-card:hover {
  transform: rotate(0deg) translateY(-7px);
  box-shadow:
    0 50px 110px rgba(0, 0, 0, 0.55),
    0 2px 0 rgba(255, 255, 255, 0.65) inset;
}

.paper-card > span {
  position: relative;
  z-index: 1;
}

.paper-band {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(27, 35, 56, 0.16);
  color: #716353;
  line-height: 1;
}

.paper-band-label {
  padding: 4px 7px;
  border-radius: 3px;
  background: var(--paper-ink);
  color: #f9efdc;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.paper-band-en {
  font-family: var(--serif);
  font-size: 9.5px;
  font-style: italic;
  letter-spacing: 0.05em;
}

.paper-band-no {
  margin-left: auto;
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.paper-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-top: 15px;
}

.paper-boss {
  display: flex;
  align-items: center;
  gap: 11px;
}

.paper-boss b {
  padding-right: 10px;
  border-right: 1px solid rgba(27, 35, 56, 0.22);
  color: rgba(27, 35, 56, 0.82);
  font-family: var(--display);
  font-size: 38px;
  font-weight: 700;
  line-height: 0.78;
  letter-spacing: -0.06em;
}

.paper-boss > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.paper-boss em {
  color: #826e55;
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.13em;
}

.paper-boss strong {
  color: var(--paper-ink);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.paper-type {
  padding: 4px 8px;
  border: 1px solid rgba(27, 35, 56, 0.25);
  border-radius: 999px;
  color: #514b40;
  font-size: 9px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.paper-damage {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 10px;
}

.paper-damage-main {
  display: flex;
  align-items: baseline;
  color: var(--paper-ink);
}

.paper-damage-main strong {
  font-family: var(--display);
  font-size: 60px;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.paper-damage-main > span {
  margin-left: 3px;
  font-size: 19px;
  font-weight: 700;
}

.paper-damage small {
  margin-bottom: 7px;
  margin-left: auto;
  color: #8d7a61;
  font-size: 7.5px;
  letter-spacing: 0.12em;
  text-align: right;
  line-height: 1.5;
}

.paper-team {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin-top: 14px;
}

.paper-team .char-tile {
  height: 72px;
  border-color: rgba(27, 35, 56, 0.2);
  color: #241f2a;
  background: linear-gradient(160deg, hsl(var(--h) 50% 88%), hsl(var(--h) 38% 74%));
  box-shadow: 0 2px 5px rgba(62, 42, 22, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.paper-team .char-tile::before {
  background: radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.55), transparent 60%);
}

.paper-team .char-tile::after {
  border-color: rgba(27, 35, 56, 0.12);
}

.paper-team .char-role {
  background: rgba(255, 255, 255, 0.55);
  color: #443943;
}

.paper-team .char-variant {
  background: rgba(27, 35, 56, 0.82);
  color: #f6e8cf;
}

.paper-team .char-glyph {
  color: #2d2530;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}

.paper-team .char-name {
  color: rgba(37, 30, 39, 0.72);
}

.paper-title {
  display: block;
  margin-top: 13px;
  color: #1d2538;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.paper-excerpt {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: #6b5c49;
  font-size: 10.5px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.paper-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(27, 35, 56, 0.14);
}

.paper-author {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.paper-author .avatar {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 10px;
}

.paper-author > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.paper-author strong {
  overflow: hidden;
  max-width: 118px;
  color: #3c352f;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.paper-author small {
  color: #8d7a63;
  font-size: 7.5px;
  line-height: 1.4;
}

.paper-social {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
}

.paper-social > span {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #73634f;
  font-size: 9px;
}

.paper-social svg {
  width: 11px;
  height: 11px;
  color: #a15c68;
}

.paper-social > span:last-child svg {
  color: #a67c38;
}

.paper-social b {
  font-weight: 700;
}

.paper-cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 9px;
  color: #a14e61;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.paper-cta svg {
  width: 12px;
  height: 12px;
  transition: transform 0.25s ease;
}

.paper-card:hover .paper-cta svg {
  transform: translateX(3px);
}

.paper-stamp {
  position: absolute;
  right: 20px;
  bottom: 66px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 2px solid rgba(155, 74, 91, 0.36);
  border-radius: 50%;
  color: rgba(155, 74, 91, 0.62);
  font-family: var(--serif);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.05;
  text-align: center;
  transform: rotate(-11deg);
  pointer-events: none;
}

.paper-stamp small {
  font-family: var(--sans);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.paper-pin {
  position: absolute;
  top: -8px;
  left: 50%;
  z-index: 5;
  width: 44px;
  height: 15px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(255, 221, 168, 0.95), rgba(187, 141, 77, 0.9));
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transform: translateX(-50%) rotate(-2deg);
  opacity: 0.9;
}

.art-chip {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  background: rgba(12, 18, 33, 0.78);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  animation: floatChip 7s ease-in-out infinite;
}

.art-chip-top {
  top: -2px;
  left: -10px;
}

.art-chip-bottom {
  right: -8px;
  bottom: -2px;
  animation-delay: -3.5s;
}

.art-chip small {
  display: block;
  color: var(--muted-2);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  line-height: 1.35;
}

.art-chip strong {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.35;
}

.art-chip strong span {
  color: var(--gold);
}

.art-chip-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 135, 164, 0.25);
  border-radius: 9px;
  color: var(--pink);
  background: rgba(255, 135, 164, 0.1);
}

.art-chip-icon svg {
  width: 15px;
  height: 15px;
}

.mini-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(127, 228, 205, 0.25);
  border-radius: 50%;
}

.mini-orbit::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 1px dashed rgba(127, 228, 205, 0.35);
  border-radius: 50%;
  animation: orbitSpin 8s linear infinite;
}

.mini-orbit i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
}

.art-spark {
  position: absolute;
  z-index: 4;
  color: var(--gold);
  font-size: 13px;
  opacity: 0.75;
  pointer-events: none;
  animation: twinkle 4s ease-in-out infinite;
}

.spark-a {
  top: 62px;
  right: 18px;
}

.spark-b {
  bottom: 94px;
  left: 4px;
  color: var(--pink);
  font-size: 17px;
  animation-delay: -1.6s;
}

.spark-c {
  top: 42%;
  left: 22px;
  color: var(--muted);
  font-size: 24px;
  animation-delay: -2.8s;
}

/* --------------------------------------------------------------------------
   Board section
   -------------------------------------------------------------------------- */

.board {
  position: relative;
  z-index: 1;
  padding: 30px 0 96px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-kicker {
  margin: 0 0 7px;
  color: var(--muted-2);
  font-family: var(--serif);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.25em;
}

.section-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 3.2vw, 40px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.18;
}

.section-desc {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.section-side {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 5px;
  flex: none;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid rgba(127, 228, 205, 0.16);
  border-radius: 999px;
  color: var(--mint);
  background: rgba(127, 228, 205, 0.05);
  font-size: 9px;
  letter-spacing: 0.05em;
  line-height: 1;
}

.live-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 7px var(--mint);
}

.section-count {
  padding-left: 16px;
  border-left: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.section-count strong {
  margin-right: 3px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -0.03em;
}

/* --------------------------------------------------------------------------
   Filters
   -------------------------------------------------------------------------- */

.filter-panel {
  position: relative;
  padding: 15px 17px 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background:
    linear-gradient(180deg, rgba(22, 31, 53, 0.84), rgba(13, 20, 37, 0.78));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.filter-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  width: 36%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 135, 164, 0.45), transparent);
}

.filter-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  height: 41px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-box:focus-within {
  border-color: rgba(255, 135, 164, 0.44);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 0 0 3px rgba(255, 135, 164, 0.07);
}

.search-box > svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--muted-2);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}

.search-box input::placeholder {
  color: var(--muted-2);
}

.search-box input::-webkit-search-cancel-button {
  opacity: 0.5;
  filter: invert(1);
}

.search-box kbd {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  flex: none;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--muted-2);
  font-family: var(--sans);
  font-size: 9px;
  line-height: 1;
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
  height: 41px;
  padding: 0 7px 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-2);
  font-size: 10px;
}

.select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0 21px 0 3px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 11.5px;
  cursor: pointer;
}

.select-wrap select option {
  background: #121a2d;
  color: var(--ink);
}

.select-wrap svg {
  position: absolute;
  right: 2px;
  width: 13px;
  height: 13px;
  color: var(--muted-2);
  pointer-events: none;
}

.reset-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
  height: 41px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.reset-btn:hover {
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--line-strong);
}

.reset-btn svg {
  width: 14px;
  height: 14px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.filter-row-last {
  padding-bottom: 6px;
  border-bottom: 0;
}

.filter-label {
  flex: 0 0 31px;
  color: var(--muted-2);
  font-size: 9.5px;
  letter-spacing: 0.1em;
}

.filter-label-wide {
  flex-basis: 48px;
  white-space: nowrap;
}

.chip-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.filter-select {
  min-width: 132px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.filter-select:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
}

.filter-select:focus-visible {
  outline: 2px solid rgba(255, 145, 171, 0.5);
  outline-offset: 2px;
}

.filter-select option {
  background: #121a2d;
  color: var(--ink);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.chip em {
  color: var(--muted-2);
  font-family: var(--serif);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.02em;
}

.chip:hover {
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.045);
}

.chip.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #ffc3d1, #ff91ab);
  color: #2b121b;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(255, 135, 164, 0.17);
}

.chip.is-active em {
  color: rgba(43, 18, 27, 0.62);
}

.filter-divider {
  width: 1px;
  height: 15px;
  margin: 0 2px;
  background: var(--line);
}

.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 51px;
  padding: 15px 2px 12px;
}

.result-bar p {
  margin: 0;
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.result-bar p strong {
  color: var(--ink-2);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Post cards
   -------------------------------------------------------------------------- */

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.note-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 18px 18px 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background:
    radial-gradient(420px 160px at 100% 0%, var(--boss-soft), transparent 68%),
    linear-gradient(180deg, rgba(22, 31, 53, 0.94), rgba(13, 20, 37, 0.96));
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  cursor: pointer;
  animation: cardIn 0.55s both;
  animation-delay: calc(var(--i, 0) * 42ms);
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.28s ease, box-shadow 0.28s ease;
}

.note-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  width: 76%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--boss), transparent);
  opacity: 0.7;
}

.note-card::after {
  content: attr(data-roman);
  position: absolute;
  top: 6px;
  right: 15px;
  color: rgba(255, 255, 255, 0.028);
  font-family: var(--serif);
  font-size: 80px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.note-card:hover {
  transform: translateY(-5px);
  border-color: var(--boss-border);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.28),
    0 0 0 1px var(--boss-soft),
    0 0 34px var(--boss-glow);
}

.note-card:focus-visible {
  outline: 2px solid var(--boss);
  outline-offset: 2px;
}

.boss-1 { --boss: #ff8989; --boss-soft: rgba(255, 137, 137, 0.11); --boss-border: rgba(255, 137, 137, 0.37); --boss-glow: rgba(255, 137, 137, 0.09); }
.boss-2 { --boss: #ffb066; --boss-soft: rgba(255, 176, 102, 0.11); --boss-border: rgba(255, 176, 102, 0.37); --boss-glow: rgba(255, 176, 102, 0.09); }
.boss-3 { --boss: #76dfa6; --boss-soft: rgba(118, 223, 166, 0.1); --boss-border: rgba(118, 223, 166, 0.36); --boss-glow: rgba(118, 223, 166, 0.08); }
.boss-4 { --boss: #79b9ff; --boss-soft: rgba(121, 185, 255, 0.11); --boss-border: rgba(121, 185, 255, 0.37); --boss-glow: rgba(121, 185, 255, 0.09); }
.boss-5 { --boss: #c49bff; --boss-soft: rgba(196, 155, 255, 0.12); --boss-border: rgba(196, 155, 255, 0.38); --boss-glow: rgba(196, 155, 255, 0.1); }

.card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.boss-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 25px;
  padding: 0 8px;
  border: 1px solid var(--boss-border);
  border-radius: 6px;
  background: var(--boss-soft);
  color: var(--boss);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.boss-pill i {
  padding-right: 5px;
  border-right: 1px solid var(--boss-border);
  font-family: var(--serif);
  font-size: 10.5px;
  font-style: normal;
  line-height: 1;
}

.new-pill {
  padding: 4px 6px;
  border: 1px solid rgba(127, 228, 205, 0.22);
  border-radius: 5px;
  color: var(--mint);
  background: rgba(127, 228, 205, 0.07);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
}

.image-pill {
  padding: 4px 6px;
  border: 1px solid rgba(244, 205, 138, 0.24);
  border-radius: 5px;
  color: var(--gold);
  background: rgba(244, 205, 138, 0.07);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.mode-pill {
  padding: 4px 6px;
  border: 1px solid rgba(173, 198, 255, 0.24);
  border-radius: 5px;
  color: #b9ccff;
  background: rgba(173, 198, 255, 0.07);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.mode-pill.is-finisher {
  border-color: rgba(244, 205, 138, 0.32);
  color: var(--gold);
  background: rgba(244, 205, 138, 0.08);
}

.source-pill {
  padding: 4px 6px;
  border: 1px solid rgba(143, 199, 255, 0.26);
  border-radius: 5px;
  color: #8fc7ff;
  background: rgba(143, 199, 255, 0.07);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.zone-pill {
  padding: 4px 6px;
  border: 1px solid rgba(200, 170, 255, 0.28);
  border-radius: 5px;
  color: #d4b8ff;
  background: rgba(200, 170, 255, 0.08);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.detail-source-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
}

.detail-source-row span {
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: 0.08em;
}

.detail-source-row a {
  color: #8fc7ff;
  font-size: 10.5px;
  line-height: 1.5;
  text-decoration: none;
  word-break: break-all;
}

.detail-source-row a:hover {
  text-decoration: underline;
}

.damage-chip {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-left: auto;
  color: var(--gold);
  font-family: var(--display);
  line-height: 1;
  white-space: nowrap;
}

.damage-chip strong {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.damage-chip small {
  color: var(--gold-2);
  font-size: 9px;
  font-weight: 600;
}

.card-title {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  min-height: 43px;
  margin: 12px 0 11px;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.team-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.char-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 68px;
  overflow: hidden;
  border: 1px solid hsl(var(--h) 65% 62% / 0.24);
  border-radius: 9px;
  background: linear-gradient(160deg, hsl(var(--h) 52% 29%), hsl(var(--h) 58% 15%));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11);
  color: #fff;
}

.char-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 16%, hsl(var(--h) 90% 76% / 0.28), transparent 62%);
  pointer-events: none;
}

.char-tile::after {
  content: "";
  position: absolute;
  top: 11px;
  left: 50%;
  width: 43px;
  height: 43px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.char-role {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 2;
  padding: 2px 3px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.26);
  color: rgba(255, 255, 255, 0.72);
  font-size: 7px;
  font-weight: 700;
  line-height: 1;
}

.char-variant {
  position: absolute;
  top: 3px;
  left: 3px;
  z-index: 2;
  max-width: 32px;
  overflow: hidden;
  padding: 2px 3px;
  border-radius: 3px;
  background: rgba(255, 224, 170, 0.9);
  color: #2d2010;
  font-size: 6.5px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.char-glyph {
  position: relative;
  z-index: 1;
  margin-top: 3px;
  color: #fff;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.32);
}

.char-img {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  margin-top: 3px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.char-tile.has-img::after {
  display: none;
}

.paper-team .char-img {
  border-color: rgba(27, 35, 56, 0.16);
}

.team-large .char-img {
  width: 62px;
  height: 62px;
}

.char-name {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
  padding: 0 3px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 8px;
  letter-spacing: 0.01em;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 11px;
}

.meta-row span {
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.5;
}

.meta-row span:first-child {
  color: var(--ink-2);
}

.card-excerpt {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag {
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.4;
}

.tag::before {
  content: "#";
  margin-right: 1px;
  color: var(--pink);
  opacity: 0.55;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.card-author {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.card-author .avatar {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  font-size: 10px;
}

.card-author > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0;
}

.card-author strong {
  max-width: 108px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-author small {
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.35;
}

.card-stats {
  display: flex;
  align-items: center;
  gap: 0;
  flex: none;
}

.stat-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-2);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.stat-btn svg {
  width: 13px;
  height: 13px;
}

.stat-btn:hover {
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.055);
}

.stat-btn:active {
  transform: scale(0.92);
}

.stat-btn.like.is-active {
  color: var(--pink);
}

.stat-btn.favorite.is-active {
  color: var(--gold);
}

/* skeleton */

.skeleton-card {
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.025) 8%, rgba(255, 255, 255, 0.065) 18%, rgba(255, 255, 255, 0.025) 33%);
  background-size: 220% 100%;
  animation: shimmer 1.45s linear infinite;
}

/* empty state */

.empty-state {
  padding: 64px 24px 58px;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.014);
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 17px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 135, 164, 0.08), transparent 70%);
  color: var(--muted);
}

.empty-icon svg {
  width: 29px;
  height: 29px;
}

.empty-kicker {
  margin: 0 0 7px;
  color: var(--muted-2);
  font-family: var(--serif);
  font-size: 8px;
  letter-spacing: 0.24em;
}

.empty-state h3 {
  margin: 0;
  color: var(--ink);
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.empty-state > p:not(.empty-kicker) {
  max-width: 380px;
  margin: 9px auto 20px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.75;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  z-index: 1;
  padding: 30px 0 36px;
  border-top: 1px solid var(--line);
  background: rgba(5, 8, 16, 0.45);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark-sm {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.brand-mark-sm svg {
  width: 16px;
  height: 16px;
}

.footer-brand > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.footer-brand strong {
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
}

.footer-brand small {
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.footer-inner > p {
  margin: 0;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.03em;
}

.footer-fine {
  width: 100%;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  text-align: center;
  color: var(--muted-2) !important;
  opacity: 0.65;
}

/* --------------------------------------------------------------------------
   Mobile bottom nav
   -------------------------------------------------------------------------- */

.bottom-nav {
  display: none;
}

/* --------------------------------------------------------------------------
   Dialogs
   -------------------------------------------------------------------------- */

.dialog {
  width: min(780px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 21px;
  background: linear-gradient(180deg, #111a2d 0%, #0c1322 100%);
  color: var(--ink);
  box-shadow: 0 45px 130px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.dialog::backdrop {
  background: rgba(3, 6, 13, 0.7);
  -webkit-backdrop-filter: blur(9px) saturate(120%);
  backdrop-filter: blur(9px) saturate(120%);
}

.dialog[open] {
  animation: dialogIn 0.3s cubic-bezier(0.2, 0.75, 0.2, 1);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex: none;
  padding: 21px 23px 17px;
  border-bottom: 1px solid var(--line);
}

.dialog-kicker {
  margin: 0 0 5px;
  color: var(--muted-2);
  font-family: var(--serif);
  font-size: 8px;
  letter-spacing: 0.24em;
}

.dialog-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.publish-shell {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 40px);
}

#publish-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dialog-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 17px;
  min-height: 0;
  padding: 20px 23px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex: none;
  padding: 14px 23px;
  border-top: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.65);
}

.foot-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.draft-note {
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.5;
}

/* publish form */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.field-label b {
  padding: 2px 5px;
  border: 1px solid rgba(255, 135, 164, 0.16);
  border-radius: 3px;
  background: rgba(255, 135, 164, 0.08);
  color: var(--pink);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.input {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: rgba(255, 255, 255, 0.033);
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.5;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.input:hover {
  border-color: var(--line-strong);
}

.input:focus {
  border-color: rgba(255, 135, 164, 0.48);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 0 0 3px rgba(255, 135, 164, 0.075);
}

.input::placeholder {
  color: var(--muted-2);
}

.input.is-invalid {
  border-color: rgba(255, 119, 119, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 119, 119, 0.06);
}

select.input {
  cursor: pointer;
}

select.input option {
  background: #121a2d;
  color: var(--ink);
}

.period-pill {
  padding: 3px 6px;
  border: 1px solid rgba(100, 184, 255, 0.25);
  border-radius: 4px;
  color: #8fc7ff;
  background: rgba(100, 184, 255, 0.07);
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

.textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.8;
}

.field-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.55;
}

.field-hint b {
  flex: none;
  color: var(--muted-2);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.field-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-error {
  padding: 9px 11px;
  border: 1px solid rgba(255, 119, 119, 0.3);
  border-radius: 9px;
  background: rgba(255, 119, 119, 0.08);
  color: #ffb1b1;
  font-size: 11px;
  line-height: 1.55;
}

.choice-group {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.choice {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 54px;
  min-height: 43px;
  padding: 5px 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.choice em {
  color: var(--muted-2);
  font-family: var(--serif);
  font-size: 9px;
  font-style: normal;
  line-height: 1.1;
}

.choice:hover {
  color: var(--ink-2);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.choice.is-active {
  border-color: rgba(255, 135, 164, 0.42);
  background: rgba(255, 135, 164, 0.105);
  color: var(--pink-2);
  box-shadow: inset 0 0 0 1px rgba(255, 135, 164, 0.09);
}

.choice.is-active em {
  color: var(--pink);
  opacity: 0.7;
}

.choice-sm {
  flex-direction: row;
  min-height: 39px;
  font-size: 10.5px;
}

.choice-group-boss .choice {
  min-width: 0;
  min-height: 47px;
}

.input-suffix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-suffix .input {
  padding-right: 38px;
}

.input-suffix em {
  position: absolute;
  right: 12px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  pointer-events: none;
}

.char-input-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.char-input {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.char-input > span {
  position: absolute;
  left: 8px;
  z-index: 1;
  color: var(--muted-2);
  font-family: var(--serif);
  font-size: 9px;
  line-height: 1;
  pointer-events: none;
}

.char-input input {
  width: 100%;
  min-width: 0;
  padding: 10px 6px 10px 21px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.033);
  color: var(--ink);
  font-size: 10.5px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.char-input input:focus {
  border-color: rgba(255, 135, 164, 0.45);
  box-shadow: 0 0 0 2px rgba(255, 135, 164, 0.07);
}

.char-input input::placeholder {
  color: var(--muted-2);
}

.char-picker {
  position: absolute;
  z-index: 60;
  max-height: 264px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: #101827;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.char-picker[hidden] {
  display: none;
}

.char-picker-empty {
  padding: 12px;
  color: var(--muted-2);
  font-size: 10px;
  text-align: center;
}

.char-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.char-option:hover,
.char-option.is-active {
  background: rgba(255, 255, 255, 0.075);
}

.char-option img {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  object-fit: cover;
}

.char-option-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.char-option.is-used {
  opacity: 0.38;
  cursor: not-allowed;
}

.char-option.is-used:hover {
  background: transparent;
}

.char-option-used {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.2;
}

.char-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.char-preview:empty {
  display: none;
}

.last-team-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  padding: 6px 8px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.4;
}

.last-team-hint[hidden] {
  display: none;
}

.last-team-hint span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.last-team-hint .text-btn {
  flex: 0 0 auto;
}

.notes-images {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notes-drop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font: inherit;
  font-size: 10.5px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.notes-drop:hover,
.notes-drop.is-dragging {
  border-color: rgba(255, 135, 164, 0.5);
  background: rgba(255, 135, 164, 0.05);
}

.notes-drop.is-invalid {
  border-color: rgba(255, 119, 119, 0.6);
  background: rgba(255, 119, 119, 0.05);
}

.notes-drop small {
  color: var(--muted-2);
  font-size: 9px;
}

.notes-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.notes-thumbs:empty {
  display: none;
}

.note-thumb {
  position: relative;
  width: 74px;
  height: 56px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
}

.note-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.note-thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 17px;
  height: 17px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 11px;
  line-height: 17px;
  cursor: pointer;
}

.detail-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.detail-images a {
  display: block;
}

.detail-images img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border: 1px solid hsl(var(--h) 70% 60% / 0.23);
  border-radius: 4px;
  background: hsl(var(--h) 60% 30% / 0.22);
  color: rgba(255, 255, 255, 0.78);
  font-size: 8.5px;
  line-height: 1.4;
}

.preview-chip b {
  color: hsl(var(--h) 80% 76%);
  font-size: 7.5px;
  font-weight: 700;
}

.preview-img {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

/* profile dialog */

.dialog-profile {
  width: min(450px, calc(100vw - 40px));
}

.profile-shell {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 40px);
}

.profile-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    radial-gradient(240px 120px at 100% 0%, rgba(255, 135, 164, 0.08), transparent 70%),
    rgba(255, 255, 255, 0.022);
}

.profile-preview > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-preview strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
}

.profile-preview small {
  color: var(--muted-2);
  font-size: 9px;
}

.color-swatches {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.swatch {
  position: relative;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.swatch:hover {
  transform: scale(1.09);
}

.swatch.is-active {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.swatch-rose { background: linear-gradient(145deg, #ffc2cf, #f27798); }
.swatch-gold { background: linear-gradient(145deg, #ffe0a5, #d9a95d); }
.swatch-mint { background: linear-gradient(145deg, #a9f4e3, #58c9b2); }
.swatch-violet { background: linear-gradient(145deg, #d6c6ff, #9d82e8); }
.swatch-sky { background: linear-gradient(145deg, #b7e0ff, #6aace8); }
.swatch-peach { background: linear-gradient(145deg, #ffd2bd, #ed916b); }

.profile-hint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid rgba(240, 200, 133, 0.12);
  border-radius: 9px;
  background: rgba(240, 200, 133, 0.035);
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.65;
}

.profile-hint svg {
  width: 13px;
  height: 13px;
  flex: none;
  margin-top: 1px;
  color: var(--gold);
}

[data-open-publish][hidden] {
  display: none !important;
}

.admin-login {
  align-self: flex-start;
  margin-top: 4px;
}

.profile-id {
  margin: 0;
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.profile-id code {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 9px;
}

/* --------------------------------------------------------------------------
   Detail drawer
   -------------------------------------------------------------------------- */

.dialog-detail {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(560px, 100vw);
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 21px 0 0 21px;
  background: #0c1322;
}

.dialog-detail[open] {
  animation: drawerIn 0.36s cubic-bezier(0.2, 0.78, 0.2, 1);
}

.detail-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.detail-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.detail-hero {
  position: relative;
  padding: 20px 25px 23px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(420px 250px at 100% 0%, var(--boss-soft), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 80%);
}

.detail-hero::after {
  content: attr(data-roman);
  position: absolute;
  right: 22px;
  bottom: -18px;
  color: rgba(255, 255, 255, 0.026);
  font-family: var(--serif);
  font-size: 160px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.detail-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.detail-kicker {
  margin: 0;
  color: var(--muted-2);
  font-family: var(--serif);
  font-size: 8px;
  letter-spacing: 0.22em;
}

.detail-kicker b {
  color: var(--boss);
  font-weight: 700;
}

.detail-boss-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 18px;
}

.detail-roman {
  padding-right: 15px;
  border-right: 1px solid var(--line-strong);
  color: var(--boss);
  font-family: var(--serif);
  font-size: 66px;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.8;
  text-shadow: 0 0 30px var(--boss-soft);
}

.detail-boss-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-boss-meta span {
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.11em;
}

.detail-boss-meta strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.detail-title {
  position: relative;
  z-index: 1;
  margin: 17px 0 0;
  color: var(--ink);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.35;
}

.detail-meta-line {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.detail-meta-line span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.4;
}

.detail-meta-line span:first-child {
  border-color: var(--boss-border);
  background: var(--boss-soft);
  color: var(--boss);
}

.detail-body {
  display: flex;
  flex-direction: column;
  gap: 23px;
  padding: 21px 25px 30px;
}

.detail-section h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.detail-section h3::before {
  content: "";
  width: 13px;
  height: 1px;
  background: var(--pink);
}

.detail-author-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
}

.detail-author-card .avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 13px;
}

.detail-author-card > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.detail-author-card strong {
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 650;
}

.detail-author-card small {
  color: var(--muted-2);
  font-size: 8.5px;
}

.detail-author-card .detail-owner-tag {
  margin-left: auto;
  padding: 3px 6px;
  border: 1px solid rgba(240, 200, 133, 0.18);
  border-radius: 4px;
  color: var(--gold);
  background: rgba(240, 200, 133, 0.06);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.team-large {
  gap: 7px;
}

.team-large .char-tile {
  height: 94px;
  border-radius: 11px;
}

.team-large .char-glyph {
  font-size: 30px;
}

.team-large .char-name {
  font-size: 9px;
}

.team-large .char-role {
  font-size: 8px;
}

.team-large .char-variant {
  font-size: 7px;
}

.notes-text {
  margin: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.95;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-tags span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 9px;
}

.detail-tags span::before {
  content: "#";
  margin-right: 1px;
  color: var(--pink);
  opacity: 0.6;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.detail-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted-2);
  font-size: 8.5px;
}

.detail-stat svg {
  width: 13px;
  height: 13px;
  color: var(--muted);
}

.detail-stat strong {
  margin-left: auto;
  color: var(--ink-2);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(8, 13, 23, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.btn-action svg {
  width: 15px;
  height: 15px;
}

.btn-action:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-strong);
}

.btn-action:active {
  transform: scale(0.98);
}

.btn-action.like.is-active {
  border-color: rgba(255, 135, 164, 0.32);
  background: rgba(255, 135, 164, 0.09);
  color: var(--pink);
}

.btn-action.favorite.is-active {
  border-color: rgba(240, 200, 133, 0.3);
  background: rgba(240, 200, 133, 0.08);
  color: var(--gold);
}

.btn-action.danger {
  flex: 0 0 auto;
  color: var(--muted-2);
}

.btn-action.danger:hover {
  border-color: rgba(255, 124, 124, 0.28);
  background: rgba(255, 124, 124, 0.07);
  color: var(--danger);
}

.btn-action.icon-only {
  flex: 0 0 40px;
}

.detail-empty {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Toasts
   -------------------------------------------------------------------------- */

.toast-region {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: min(360px, calc(100vw - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(14, 21, 37, 0.97);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.46);
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.55;
  animation: toastIn 0.25s ease both;
}

.toast svg {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 1px;
  color: var(--mint);
}

.toast.is-error svg {
  color: var(--danger);
}

.toast.is-out {
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1120px) {
  .shell {
    width: calc(100% - 48px);
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(370px, 0.88fr);
    gap: 34px;
  }

  .hero h1 {
    font-size: clamp(44px, 5.2vw, 62px);
  }

  .paper-card {
    width: min(380px, 100%);
  }

  .paper-shadow {
    width: 360px;
  }

  .topbar-inner {
    gap: 18px;
  }

  .profile-meta {
    display: none;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .main-nav {
    display: none;
  }

  .top-actions {
    margin-left: auto;
  }

  .topbar-inner {
    height: 70px;
  }

  .hero {
    padding-top: 56px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-copy {
    max-width: 660px;
  }

  .hero-art {
    width: min(640px, 100%);
    min-height: 500px;
    margin-inline: auto;
  }

  .hero-art::before {
    width: 500px;
    height: 500px;
  }

  .paper-card {
    width: min(410px, 100%);
  }

  .paper-shadow {
    width: 390px;
  }

  .hero-stats {
    max-width: 470px;
  }

  .bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: calc(62px + env(safe-area-inset-bottom));
    padding: 4px 26px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(7, 12, 22, 0.94);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }

  body {
    padding-bottom: calc(62px + env(safe-area-inset-bottom));
  }

  .bottom-link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 70px;
    height: 48px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted-2);
    font-size: 9px;
    transition: color 0.18s ease, background 0.18s ease;
  }

  .bottom-link svg {
    width: 19px;
    height: 19px;
  }

  .bottom-link.is-active {
    color: var(--pink);
    background: rgba(255, 135, 164, 0.07);
  }

  .bottom-dot {
    position: absolute;
    top: 9px;
    right: calc(50% - 14px);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--pink);
    box-shadow: 0 0 8px rgba(255, 135, 164, 0.6);
  }

  .toast-region {
    bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .site-footer {
    padding-bottom: 30px;
  }
}

@media (max-width: 760px) {
  .shell {
    width: calc(100% - 32px);
  }

  .topbar-inner {
    height: 64px;
    gap: 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .brand-mark svg {
    width: 20px;
    height: 20px;
  }

  .brand-copy strong {
    font-size: 14px;
  }

  .brand-copy small {
    font-size: 7px;
    letter-spacing: 0.2em;
  }

  .btn-publish {
    padding: 9px 12px;
    font-size: 11px;
  }

  .profile-pill {
    padding: 3px;
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.025);
  }

  .profile-pill .avatar {
    width: 31px;
    height: 31px;
    border-radius: 9px;
  }

  .preview-inner {
    gap: 8px;
    align-items: flex-start;
    padding-block: 7px;
  }

  .preview-inner p {
    display: block;
    font-size: 9.5px;
  }

  .preview-inner p span {
    display: none;
  }

  .preview-badge {
    margin-top: 1px;
    font-size: 8px;
  }

  .preview-close {
    margin-top: -2px;
  }

  .hero {
    padding: 42px 0 38px;
  }

  .eyebrow {
    font-size: 8.5px;
    letter-spacing: 0.15em;
  }

  .hero h1 {
    margin-top: 17px;
    font-size: clamp(38px, 10.4vw, 52px);
    line-height: 1.15;
  }

  .lede {
    margin-top: 17px;
    font-size: 13px;
    line-height: 1.85;
  }

  .hero-actions {
    margin-top: 23px;
    gap: 8px;
  }

  .btn-lg {
    min-height: 44px;
    padding: 12px 18px;
    font-size: 12.5px;
  }

  .hero-stats {
    margin-top: 30px;
    padding-top: 17px;
  }

  .hero-stat {
    min-width: 0;
    padding-right: 17px;
    margin-right: 17px;
  }

  .hero-stat strong {
    font-size: 24px;
  }

  .hero-stat span {
    font-size: 8.5px;
  }

  .hero-note {
    font-size: 9px;
  }

  .hero-art {
    min-height: 435px;
    margin-top: 2px;
  }

  .hero-art::before {
    width: 350px;
    height: 350px;
  }

  .paper-card {
    width: min(348px, calc(100vw - 46px));
    padding: 20px 20px 16px;
  }

  .paper-shadow {
    width: min(330px, calc(100vw - 62px));
    height: 400px;
  }

  .paper-damage-main strong {
    font-size: 52px;
  }

  .paper-team .char-tile {
    height: 64px;
  }

  .paper-team .char-glyph {
    font-size: 21px;
  }

  .paper-title {
    font-size: 15.5px;
  }

  .paper-excerpt {
    font-size: 9.5px;
  }

  .art-chip-top {
    top: -8px;
    left: -2px;
  }

  .art-chip-bottom {
    right: -2px;
    bottom: -7px;
  }

  .art-chip {
    padding: 8px 10px;
  }

  .art-chip small {
    font-size: 7px;
  }

  .art-chip strong {
    font-size: 9.5px;
  }

  .orbit-one {
    right: -310px;
  }

  .orbit-two {
    right: -100px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
    margin-bottom: 18px;
  }

  .section-copy h2 {
    font-size: 30px;
  }

  .section-desc {
    font-size: 11.5px;
  }

  .section-side {
    padding-bottom: 0;
  }

  .filter-panel {
    padding: 11px 12px 5px;
  }

  .filter-top {
    flex-wrap: wrap;
    gap: 7px;
  }

  .search-box {
    flex-basis: 100%;
    height: 39px;
  }

  .sort-box,
  .reset-btn {
    height: 37px;
  }

  .sort-box {
    margin-right: auto;
  }

  .filter-row {
    gap: 8px;
    padding: 7px 0;
  }

  .filter-label {
    flex-basis: 28px;
    font-size: 9px;
  }

  .chip {
    padding: 5px 8px;
    font-size: 10.5px;
  }

  .filter-divider {
    display: none;
  }

  .result-bar {
    min-height: 46px;
    padding-top: 12px;
  }

  .post-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .note-card {
    min-height: 0;
    padding: 17px;
  }

  .card-title {
    min-height: 0;
    font-size: 15.5px;
  }

  .char-tile {
    height: 74px;
  }

  .char-glyph {
    font-size: 25px;
  }

  .char-name {
    font-size: 8.5px;
  }

  .skeleton-card {
    min-height: 350px;
  }

  .site-footer {
    padding: 25px 0 26px;
  }

  .footer-inner {
    gap: 11px;
  }

  .footer-inner > p {
    display: none;
  }

  .footer-fine {
    display: block !important;
    text-align: left;
    line-height: 1.6;
  }

  .dialog {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
  }

  .dialog-publish,
  .dialog-profile {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .publish-shell,
  .profile-shell {
    height: 100dvh;
    max-height: 100dvh;
  }

  .dialog-head {
    padding: 17px 16px 14px;
  }

  .dialog-head h2 {
    font-size: 20px;
  }

  .dialog-body {
    padding: 16px;
    gap: 15px;
  }

  .dialog-foot {
    padding: 11px 16px calc(11px + env(safe-area-inset-bottom));
    gap: 9px;
    flex-wrap: wrap;
  }

  .draft-note {
    font-size: 8.5px;
  }

  .foot-actions {
    margin-left: auto;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .char-input-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .char-input:last-child {
    grid-column: span 2;
  }

  .dialog-detail {
    inset: auto 0 0 0;
    width: 100vw;
    height: 92dvh;
    max-height: 92dvh;
    border: 0;
    border-top: 1px solid var(--line-strong);
    border-radius: 19px 19px 0 0;
  }

  .dialog-detail[open] {
    animation: sheetIn 0.32s cubic-bezier(0.2, 0.78, 0.2, 1);
  }

  .detail-hero {
    padding: 17px 18px 20px;
  }

  .detail-roman {
    font-size: 54px;
  }

  .detail-title {
    font-size: 22px;
  }

  .detail-body {
    padding: 18px 18px 24px;
    gap: 20px;
  }

  .detail-actions {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    gap: 5px;
  }

  .btn-action {
    min-height: 39px;
    font-size: 9.5px;
  }

  .btn-action.danger {
    flex-basis: 39px;
    padding: 0;
  }

  .detail-stats {
    gap: 5px;
  }

  .detail-stat {
    padding: 9px;
    font-size: 8px;
  }

  .detail-stat strong {
    font-size: 12px;
  }

  .toast-region {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 430px) {
  .brand-copy small {
    display: none;
  }

  .brand {
    gap: 8px;
  }

  .top-actions {
    gap: 4px;
  }

  .btn-publish span {
    display: none;
  }

  .btn-publish {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
  }

  .btn-publish svg {
    width: 17px;
    height: 17px;
  }

  .paper-card {
    width: calc(100vw - 40px);
  }

  .paper-shadow {
    width: calc(100vw - 54px);
  }

  .paper-band-en {
    display: none;
  }

  .paper-boss b {
    font-size: 33px;
  }

  .paper-damage-main strong {
    font-size: 48px;
  }

  .paper-damage small {
    display: none;
  }

  .paper-team .char-tile {
    height: 58px;
  }

  .paper-team .char-glyph {
    font-size: 19px;
  }

  .paper-team .char-name {
    font-size: 7.5px;
  }

  .paper-team .char-variant {
    font-size: 6px;
  }

  .paper-stamp {
    right: 14px;
    bottom: 61px;
    width: 46px;
    height: 46px;
    font-size: 8px;
  }

  .paper-author strong {
    max-width: 95px;
  }

  .paper-social {
    gap: 6px;
  }

  .art-chip-top {
    left: -4px;
  }

  .art-chip-bottom {
    display: none;
  }

  .hero-stat {
    padding-right: 13px;
    margin-right: 13px;
  }

  .hero-stat strong {
    font-size: 22px;
  }

  .choice {
    min-width: 46px;
  }

  .choice-group-boss .choice {
    min-width: 0;
  }

  .detail-actions .btn-action span {
    display: none;
  }

  .detail-actions .btn-action {
    flex: 1;
  }

  .detail-actions .btn-action svg {
    width: 17px;
    height: 17px;
  }
}

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}

@keyframes floatChip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 0.95; transform: scale(1.08); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes dialogIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes drawerIn {
  from { opacity: 0; transform: translateX(34px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes sheetIn {
  from { opacity: 0; transform: translateY(34px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  to { background-position: -220% 0; }
}
