:root {
  --bg: #08090d;
  --surface: #10121a;
  --surface-2: #161925;
  --line: #232736;
  --text: #e8eaf2;
  --muted: #8d93a8;
  --accent: #ff5c8a;
  --accent-2: #5ee0c8;
  --rp: #8b7cff;
  --tournament: #ffb454;
  --radius: 12px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 56px;
  padding: 0 24px;
  background: rgba(8, 9, 13, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 14px;
}
.brand span { color: var(--accent); }

.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 26px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }

.nav-spacer { flex: 1; }

.nav-user {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff5c8a, #8b7cff);
  border: 1px solid var(--line);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0;
}

.account {
  position: relative;
  margin-left: auto;
}
.account-menu {
  position: absolute;
  right: 0;
  top: 38px;
  z-index: 60;
  min-width: 172px;
  padding: 6px;
  background: #12151f;
  border: 1px solid #2b3145;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.14s, transform 0.14s, visibility 0.14s;
}
.account:hover .account-menu,
.account:focus-within .account-menu,
.account.open .account-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.account-menu a,
.account-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 11px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #c9cddb;
  font: inherit;
  font-size: 13px;
}
.account-menu a:hover,
.account-menu button:hover {
  background: #1b1f2c;
  color: var(--text);
}
.account-menu #signOut { color: #ffb0c5; margin-top: 3px; border-top: 1px solid #1f2432; border-radius: 0 0 6px 6px; }
.account-palette {
  padding: 8px;
  margin-top: 4px;
  border-top: 1px solid #1f2432;
}
.account-palette label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 5px;
}
.account-palette select,
.mobile-palette select {
  width: 100%;
  background: #0d1018;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  font: inherit;
  font-size: 12px;
}
.mobile-palette {
  padding: 8px 12px 6px;
  border-top: 1px solid #1f2432;
  margin-top: 4px;
}
.mobile-palette label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

/* ---------- layout ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ---------- profile header ---------- */
.banner {
  height: 190px;
  margin: 0 -24px;
  background:
    radial-gradient(700px 240px at 18% 10%, rgba(255, 92, 138, 0.35), transparent 60%),
    radial-gradient(600px 220px at 82% 0%, rgba(94, 224, 200, 0.22), transparent 60%),
    linear-gradient(180deg, #1a1024 0%, #0b0d15 100%);
  border-bottom: 1px solid var(--line);
}

.profile-head {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-top: -56px;
  position: relative;
}

.avatar {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: 4px solid var(--bg);
  background: linear-gradient(135deg, #ff5c8a 0%, #8b7cff 55%, #5ee0c8 100%);
  display: grid;
  place-items: center;
  font-size: 40px;
  font-weight: 700;
  flex: 0 0 auto;
}

.profile-id { flex: 1; padding-bottom: 6px; }
.profile-id h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.01em;
}
.handle { color: var(--muted); font-size: 14px; }

.btn {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: #1d2130; border-color: #323852; }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #150810;
  font-weight: 600;
}
.btn.primary:hover { background: #ff739b; }

.bio {
  max-width: 640px;
  color: #c4c8d8;
  margin: 18px 0 0;
  font-size: 14px;
}
.meta-line {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- oshi ---------- */
.oshi-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.oshi {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
}
.oshi i {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
}
.oshi small { color: var(--muted); }

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 26px 0 34px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat b {
  display: block;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.stat span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

/* ---------- section head ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.section-head h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0.01em;
}
.section-head p { margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- tabs + chips ---------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.tab {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 10px 14px;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
}
.chip:hover { color: var(--text); border-color: #323852; }
.chip.active {
  background: rgba(255, 92, 138, 0.12);
  border-color: rgba(255, 92, 138, 0.5);
  color: #ffb0c5;
}

/* ---------- watched list ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }

.row {
  display: grid;
  grid-template-columns: 54px 1fr auto 220px;
  gap: 14px;
  align-items: center;
  padding: 10px 14px 10px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s, background 0.15s;
}
.row:hover { border-color: #30364b; background: #12151f; }

.cover {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.02em;
}

.row-main { min-width: 0; }
.row-title {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.dot::before { content: "·"; margin-right: 8px; color: #3a4057; }

.row-tags { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.tag {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.tag.top-rp { color: #c3b9ff; border-color: rgba(139, 124, 255, 0.45); background: rgba(139, 124, 255, 0.12); }
.tag.top-tournament { color: #ffd39a; border-color: rgba(255, 180, 84, 0.45); background: rgba(255, 180, 84, 0.1); }

.row-side {
  display: flex;
  align-items: center;
  gap: 14px;
}
.score {
  font-size: 13px;
  color: var(--muted);
  min-width: 34px;
  text-align: right;
}
.score b { color: var(--text); font-size: 15px; }

.state {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.state.completed { color: #9ff0d8; border-color: rgba(94, 224, 200, 0.4); background: rgba(94, 224, 200, 0.08); }
.state.watching_vod { color: #ffd39a; border-color: rgba(255, 180, 84, 0.4); background: rgba(255, 180, 84, 0.08); }
.state.caught_live { color: #ffb0c5; border-color: rgba(255, 92, 138, 0.4); background: rgba(255, 92, 138, 0.1); }
.state.plan_to_watch { color: #aab2cc; }
.state.on_hold, .state.dropped { color: #7f8598; }

.empty {
  padding: 40px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- event page ---------- */
.event-banner {
  height: 260px;
  margin: 0 -24px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(800px 300px at 25% 0%, rgba(139, 124, 255, 0.4), transparent 65%),
    radial-gradient(700px 260px at 80% 10%, rgba(255, 92, 138, 0.3), transparent 60%),
    linear-gradient(180deg, #171225 0%, #0a0c13 100%);
}

.event-head {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  margin-top: -80px;
  position: relative;
  align-items: end;
}

.event-cover {
  width: 180px;
  height: 250px;
  border-radius: 10px;
  border: 1px solid #2c3145;
  background: linear-gradient(160deg, #6a4bd8 0%, #b33a71 55%, #2a1c4d 100%);
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}

.event-title h1 {
  margin: 0 0 6px;
  font-size: 30px;
  letter-spacing: -0.02em;
}
.event-edition { color: var(--muted); font-size: 15px; margin-bottom: 10px; }

.event-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 34px;
  margin-top: 30px;
}

.block { margin-bottom: 30px; }
.block h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 600;
}
.block p { margin: 0 0 12px; color: #c9cddb; font-size: 14px; }

.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 16px;
}
.info-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #1b1f2c;
  font-size: 13px;
}
.info-row:last-child { border-bottom: 0; }
.info-row dt { color: var(--muted); }
.info-row dd { margin: 0; }

.days { display: flex; flex-direction: column; gap: 6px; }
.day {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  font-size: 13px;
}
.day .num {
  width: 44px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.day .label { flex: 1; }
.day .mini {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
}
.day .mini.on {
  color: #9ff0d8;
  border-color: rgba(94, 224, 200, 0.4);
  background: rgba(94, 224, 200, 0.08);
}

.relations { display: flex; flex-direction: column; gap: 6px; }
.relation {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  background: var(--surface);
}
.relation small { color: var(--muted); }

.log-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  position: sticky;
  top: 76px;
}
.log-card h3 { margin: 0 0 12px; font-size: 14px; }
.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 5px;
}
.field select, .field input, .field textarea {
  width: 100%;
  background: #0d1018;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
}
.field textarea { resize: vertical; min-height: 64px; }
.field input[type="range"] { padding: 0; accent-color: var(--accent); }

.score-read {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.hint { color: var(--muted); font-size: 11px; margin-top: 8px; line-height: 1.45; }

@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .event-grid { grid-template-columns: 1fr; }
  .event-head { grid-template-columns: 110px 1fr; }
  .event-cover { width: 110px; height: 154px; font-size: 22px; }
  .event-title h1 { font-size: 22px; }
  .log-card { position: static; }
  .nav-links { display: none; }
}

@media (max-width: 620px) {
  .row { grid-template-columns: 44px 1fr; }
  .row-side { grid-column: 2; justify-content: flex-start; }
  .cover { width: 44px; height: 44px; }
  .stats { grid-template-columns: 1fr 1fr; }
}

/* ---------- cover palettes ---------- */
.c1  { background: linear-gradient(150deg,#5b3fbf,#b33a71); }
.c2  { background: linear-gradient(150deg,#2f6fae,#6a4bd8); }
.c3  { background: linear-gradient(150deg,#8a2f4f,#2a1c4d); }
.c4  { background: linear-gradient(150deg,#c26a12,#8a2f4f); }
.c5  { background: linear-gradient(150deg,#a33a3a,#4d1f4f); }
.c6  { background: linear-gradient(150deg,#3f6f4f,#1f3f5f); }
.c7  { background: linear-gradient(150deg,#2f7f6f,#3f3f8f); }
.c8  { background: linear-gradient(150deg,#6a4bd8,#c26a12); }
.c9  { background: linear-gradient(150deg,#3a3a5f,#6a2f4f); }
.c10 { background: linear-gradient(150deg,#8a1f3f,#3f2f8f); }
.c11 { background: linear-gradient(150deg,#3f2f8f,#8a1f3f); }

/* ---------- browse ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: 34px 0 22px;
}
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -0.02em; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

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

.search {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  width: 240px;
}
.search:focus { outline: none; border-color: #3a4060; }

.year-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  overflow-x: auto;
}
.year-tab {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 9px 14px;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.year-tab:hover { color: var(--text); }
.year-tab.active { color: var(--text); border-bottom-color: var(--accent); }

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.filter-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  min-width: 52px;
}

.result-count {
  color: var(--muted);
  font-size: 12px;
  margin: 16px 0 10px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: #343b55;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.card-art {
  position: relative;
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
}
.card-initials {
  font-size: 34px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.03em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.3);
}

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(8, 9, 13, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-size: 11px;
  padding: 3px 7px;
  color: #ffe0a8;
}
.card-score b { font-size: 13px; }

.card-state {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(8, 9, 13, 0.72);
  backdrop-filter: blur(6px);
  color: #cfd4e4;
}
.card-state.caught_live { color: #ffb0c5; }
.card-state.watching_vod { color: #ffd39a; }
.card-state.completed { color: #9ff0d8; }
.card-state.plan_to_watch { color: #aab2cc; }

.card-body { padding: 11px 12px 13px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-edition {
  font-size: 11px;
  color: #b6bccf;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-meta { font-size: 11px; color: var(--muted); }
.card-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.card-tags .tag { font-size: 9px; padding: 1px 5px; }

@media (max-width: 620px) {
  .page-actions { width: 100%; }
  .search { flex: 1; width: auto; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .card-initials { font-size: 24px; }
}


/* ============ home / browse ============ */
.home-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 40px 0 24px;
}
.home-year {
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #2c3145;
  margin-bottom: 6px;
}
.home-head h1 { margin: 0; font-size: 30px; letter-spacing: -0.02em; }
.home-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; max-width: 560px; }
.home-head b { color: var(--text); }

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

.home-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: visible;
  transition: border-color 0.16s, transform 0.16s;
}
.home-card:hover { border-color: #343b55; transform: translateY(-2px); }
.home-card.is-added { border-color: rgba(94, 224, 200, 0.35); }

.home-link {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  min-height: 200px;
}
.home-art {
  border-radius: var(--radius) 0 0 var(--radius);
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}
.home-body { padding: 14px 52px 40px 16px; min-width: 0; }
.home-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.home-date { font-size: 11px; color: var(--muted); }
.home-title {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.home-edition { font-size: 12px; color: #b6bccf; margin-top: 2px; }
.home-desc {
  margin: 8px 0 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.home-tags .tag { font-size: 9px; padding: 1px 6px; }

.add-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #333a52;
  background: rgba(8, 9, 13, 0.75);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-size: 17px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.15s, border-color 0.15s;
}
.add-btn:hover { border-color: var(--accent); color: var(--accent); }
.add-btn.on {
  background: rgba(94, 224, 200, 0.16);
  border-color: rgba(94, 224, 200, 0.55);
  color: #9ff0d8;
}

.home-state {
  position: absolute;
  right: 12px;
  bottom: 12px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: rgba(8, 9, 13, 0.6);
  color: #cfd4e4;
}
.home-state.caught_live { color: #ffb0c5; border-color: rgba(255, 92, 138, 0.4); }
.home-state.completed { color: #9ff0d8; border-color: rgba(94, 224, 200, 0.4); }
.home-state.clips_only { color: #a9c8ff; border-color: rgba(110, 150, 255, 0.4); }
.home-state.watching_vod { color: #ffd39a; border-color: rgba(255, 180, 84, 0.4); }
.home-state.plan_to_watch { color: #c3b9ff; border-color: rgba(139, 124, 255, 0.4); }

.add-menu {
  position: absolute;
  top: 46px;
  right: 10px;
  z-index: 20;
  width: 196px;
  padding: 6px;
  background: #12151f;
  border: 1px solid #2b3145;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.add-menu-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  padding: 6px 8px;
}
.add-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: #c9cddb;
  font-size: 12px;
  padding: 7px 8px;
  border-radius: 6px;
}
.add-menu button:hover { background: #1b1f2c; color: var(--text); }
.add-menu button.active { color: #9ff0d8; }
.add-menu button.clear {
  color: #ff9fae;
  border-top: 1px solid #1f2432;
  border-radius: 0 0 6px 6px;
  margin-top: 4px;
  padding-top: 9px;
}

/* ============ oshi cards ============ */
.profile-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.profile-name-row h1 { margin: 0; }

.oshi-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.oshi-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  color: #c9cddb;
  white-space: nowrap;
}
.oshi-tag:hover { border-color: #343b55; }
.oshi-tag .emoji {
  font-size: 14px;
  line-height: 1;
}
.oshi-tag .emoji.none {
  font-size: 10px;
  color: var(--muted);
}
.oshi-tag.rank-1 { border-color: rgba(255, 180, 84, 0.45); }
.oshi-tag.rank-2 { border-color: rgba(139, 124, 255, 0.45); }
.oshi-tag.pending { opacity: 0.72; }

.oshi-section { margin: 0 0 34px; }
.oshi-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.oshi-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.oshi-card i {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.oshi-card b { display: block; font-size: 13px; line-height: 1.2; }
.oshi-badge {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: #ffd39a;
  border: 1px solid rgba(255, 180, 84, 0.4);
  background: rgba(255, 180, 84, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 3px;
}
.oshi-badge.fav {
  color: #c3b9ff;
  border-color: rgba(139, 124, 255, 0.4);
  background: rgba(139, 124, 255, 0.12);
}

/* ============ row note ============ */
.row-note {
  font-size: 12px;
  line-height: 1.45;
  color: #aab2cc;
  border-left: 1px solid var(--line);
  padding-left: 12px;
  max-height: 3.9em;
  overflow: hidden;
  cursor: pointer;
}
.row-note:hover { color: var(--text); }
.row-note.muted { color: #5f6579; font-style: italic; }

.row-remove {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: #5f6579;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.row-remove:hover { color: #ffb0c5; background: rgba(255, 92, 138, 0.12); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(520px, 100%);
  background: #12151f;
  border: 1px solid #2b3145;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.modal-card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.modal-card textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  background: #0d1018;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.avatar-edit {
  display: flex;
  align-items: center;
  gap: 14px;
}
.avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ff5c8a, #8b7cff);
  background-size: cover;
  background-position: center;
  color: #fff;
  font-weight: 700;
  font-size: 24px;
}
.char-banner-preview {
  width: 180px;
  height: 68px;
  border-radius: 8px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: #1a1d2a;
  background-size: cover;
  background-position: center;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}
.avatar-edit-actions { flex: 1; min-width: 0; }
.avatar-edit-actions input[type="file"] {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}
.avatar-edit-actions .hint { margin: 0; }

.state.clips_only { color: #a9c8ff; border-color: rgba(110, 150, 255, 0.4); background: rgba(110, 150, 255, 0.08); }

/* ============ moments ============ */
.moment-strip-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.moment-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 10px;
  scrollbar-width: thin;
  scrollbar-color: #2c3145 transparent;
  flex: 1;
  min-width: 0;
}
.moment-strip::-webkit-scrollbar { height: 6px; }
.moment-strip::-webkit-scrollbar-thumb { background: #2c3145; border-radius: 3px; }

.moment-card {
  flex: 0 0 300px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  min-height: 150px;
}
.moment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}
.moment-head i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff5c8a, #8b7cff);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-style: normal;
  color: #fff;
  flex: 0 0 auto;
}
.moment-head b { font-size: 12px; }
.moment-head span { color: var(--muted); margin-left: auto; font-size: 10px; }
.moment-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #c9cddb;
}
.moment-empty {
  flex: 1;
  min-width: 240px;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 10px;
  font-size: 13px;
}
.strip-nav {
  width: 28px;
  height: 56px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 18px;
  flex: 0 0 auto;
}
.strip-nav:hover { color: var(--text); border-color: #343b55; }

.moment-compose {
  margin-top: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.moment-compose textarea {
  width: 100%;
  min-height: 68px;
  resize: vertical;
  background: #0d1018;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  font: inherit;
  font-size: 13px;
}
.moment-compose textarea:focus { outline: none; border-color: #3a4060; }
.moment-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.moment-foot span { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.moment-foot .btn { padding: 6px 14px; font-size: 12px; }

.resend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.resend-row .btn { padding: 6px 12px; font-size: 12px; flex: 0 0 auto; }

/* ============ participants ============ */
.participants {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.participant {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}
.participant i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3f2f8f, #8a1f3f);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-style: normal;
  color: #fff;
  flex: 0 0 auto;
}
.p-name {
  font-size: 13px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.p-role {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

/* ============ character index / pages ============ */
.section-link {
  color: var(--accent-2);
  border-bottom: 1px solid transparent;
}
.section-link:hover { border-bottom-color: currentColor; }

.back-link {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.back-link:hover { color: var(--text); }

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.char-card {
  display: flex;
  gap: 14px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s, transform 0.15s;
}
.char-card:hover { border-color: #343b55; transform: translateY(-2px); }
.char-avatar {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  font-style: normal;
  color: rgba(255, 255, 255, 0.9);
}
.char-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.char-native { font-size: 11px; color: var(--muted); }
.char-meta { font-size: 12px; color: #b6bccf; }
.char-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  flex-wrap: wrap;
}
.char-emoji { font-size: 16px; line-height: 1; }
.char-oshi {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.oshi-rank-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.oshi-rank-num {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: #3a4057;
  min-width: 34px;
  text-align: center;
}
.oshi-rank-card b { font-size: 13px; }
.oshi-rank-card p {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}

.fanbase-list { display: flex; flex-direction: column; gap: 6px; }
.fanbase-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  transition: border-color 0.15s, background 0.15s;
}
.fanbase-row:hover { border-color: #343b55; background: #12151f; }
.fanbase-rank {
  width: 34px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.fanbase-mark {
  width: 24px;
  text-align: center;
  font-size: 17px;
  line-height: 1;
}
.fanbase-name { flex: 1; font-size: 14px; min-width: 0; }
.fanbase-name small {
  color: var(--muted);
  font-size: 11px;
  margin-left: 8px;
}
.fanbase-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.fanbase-count b { color: var(--text); font-size: 14px; }

.form-error, .form-info {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}
.form-error {
  border: 1px solid rgba(255, 110, 130, 0.45);
  background: rgba(255, 92, 138, 0.1);
  color: #ffb0c5;
}
.form-info {
  border: 1px solid rgba(94, 224, 200, 0.4);
  background: rgba(94, 224, 200, 0.08);
  color: #9ff0d8;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 620px) { .two-col { grid-template-columns: 1fr; } }

.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.multi-select { position: relative; }
.multi-toggle {
  width: 100%;
  text-align: left;
  background: #0d1018;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
}
.multi-toggle:hover { border-color: #343b55; }
.multi-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  max-height: 260px;
  overflow: auto;
  background: #0d1018;
  border: 1px solid #2b3145;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.multi-actions {
  display: flex;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #1f2432;
}
.multi-actions button {
  background: #171b27;
  border: 1px solid #2b3145;
  border-radius: 6px;
  color: #c9cddb;
  font: inherit;
  font-size: 11px;
  padding: 5px 10px;
}
.multi-actions button:hover { color: var(--text); border-color: #3a4057; }
#e-desc { min-height: 150px; }
.tag-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.tag-check input { accent-color: var(--accent); margin: 0; }
.tag-check:has(input:checked) {
  border-color: rgba(255, 92, 138, 0.5);
  background: rgba(255, 92, 138, 0.1);
  color: #ffb0c5;
}

.mod-actions .btn { padding: 6px 12px; font-size: 12px; }
.btn.success {
  border-color: rgba(94, 224, 200, 0.45);
  background: rgba(94, 224, 200, 0.12);
  color: #9ff0d8;
}
.btn.success:hover { background: rgba(94, 224, 200, 0.2); }
.btn.danger {
  border-color: rgba(255, 92, 138, 0.45);
  background: rgba(255, 92, 138, 0.1);
  color: #ffb0c5;
}
.btn.danger:hover { background: rgba(255, 92, 138, 0.18); }

/* ============ moderation ============ */
.mod-queue { display: flex; flex-direction: column; gap: 10px; }
.mod-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.mod-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mod-head b { font-size: 14px; }
.mod-head small { color: var(--muted); font-size: 11px; }
.mod-summary { color: #c9cddb; font-size: 13px; margin: 10px 0; line-height: 1.5; }
.mod-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mod-actions .btn { padding: 6px 12px; font-size: 12px; }
.mod-edit {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.mod-form .field { margin-bottom: 10px; }
.mod-form input, .mod-form textarea {
  width: 100%;
  background: #0d1018;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
}
.mod-form textarea { min-height: 70px; resize: vertical; }
.tab .count {
  color: var(--muted);
  font-size: 10px;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 100;
  background: #12151f;
  border: 1px solid #2b3145;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.mod-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px dashed rgba(255, 180, 84, 0.35);
  border-radius: 8px;
  background: rgba(255, 180, 84, 0.05);
  font-size: 11px;
  color: #ffd39a;
}
.mod-bar .btn { padding: 5px 10px; font-size: 11px; }

/* ============ people / friends ============ */
.friends-section { margin-top: 36px; }
.friend-block { margin-bottom: 20px; }
.friend-block h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 8px;
  font-weight: 600;
}
.friend-block h3 span { color: #5f6579; text-transform: none; letter-spacing: 0; margin-left: 6px; }

.people-row { display: flex; flex-wrap: wrap; gap: 8px; }
.person {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px 6px 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.person i {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3f2f8f, #8a1f3f);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  flex: 0 0 auto;
}
.person b { display: block; font-size: 12px; line-height: 1.2; }
.person span { font-size: 10px; color: var(--muted); }
.person-empty { color: var(--muted); font-size: 12px; padding: 8px 0; }

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
}
.person-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.person-card > i,
.person-avatar-link i {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3f2f8f, #8a1f3f);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-style: normal;
  flex: 0 0 auto;
}
.person-avatar-link { position: relative; flex: 0 0 auto; display: block; }
.online-dot {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #5ee0c8;
  border: 2px solid var(--bg);
}
.person-shared {
  margin-top: 4px;
  font-size: 10px;
  color: var(--accent-2);
}
.person-body { flex: 1; min-width: 0; }
.person-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.person-line b { font-size: 14px; }
.person-handle { font-size: 11px; color: var(--muted); }
.person-body p {
  margin: 5px 0 0;
  font-size: 11px;
  color: #aab2cc;
  line-height: 1.4;
  max-height: 2.8em;
  overflow: hidden;
}
.person-card .btn { padding: 6px 12px; font-size: 12px; flex: 0 0 auto; }

@media (max-width: 620px) {
  .people-grid { grid-template-columns: 1fr; }
}

/* ============ themes ============ */
[data-theme="cover"] {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --surface-2: #e4e6eb;
  --line: #ced0d4;
  --text: #1c1e21;
  --muted: #65676b;
  --accent: #1877f2;
  --accent-2: #4267b2;
  --rp: #4267b2;
  --tournament: #b35c00;
}
[data-theme="cover"] body { background: #f0f2f5; color: #1c1e21; }
[data-theme="cover"] .nav { background: rgba(255, 255, 255, 0.92); }
[data-theme="cover"] .nav-links { color: #65676b; }
[data-theme="cover"] .nav-links a:hover,
[data-theme="cover"] .nav-links a.active { color: #1877f2; }
[data-theme="cover"] .account-menu,
[data-theme="cover"] .mobile-menu,
[data-theme="cover"] .add-menu,
[data-theme="cover"] .multi-menu,
[data-theme="cover"] .modal-card,
[data-theme="cover"] .toast {
  background: #ffffff;
  color: #1c1e21;
  border-color: #ced0d4;
}
[data-theme="cover"] .account-menu a,
[data-theme="cover"] .account-menu button,
[data-theme="cover"] .mobile-menu a,
[data-theme="cover"] .mobile-menu button,
[data-theme="cover"] .add-menu button {
  color: #1c1e21;
}
[data-theme="cover"] .account-menu a:hover,
[data-theme="cover"] .account-menu button:hover,
[data-theme="cover"] .mobile-menu a:hover,
[data-theme="cover"] .mobile-menu button:hover,
[data-theme="cover"] .add-menu button:hover {
  background: #e4e6eb;
}
[data-theme="cover"] .btn {
  background: #ffffff;
  color: #1c1e21;
  border-color: #ced0d4;
}
[data-theme="cover"] .btn:hover { background: #e4e6eb; border-color: #bcc0c4; }
[data-theme="cover"] .btn.primary {
  background: #1877f2;
  border-color: #1877f2;
  color: #ffffff;
}
[data-theme="cover"] .btn.primary:hover { background: #166fe5; }
[data-theme="cover"] input,
[data-theme="cover"] select,
[data-theme="cover"] textarea,
[data-theme="cover"] .search,
[data-theme="cover"] .multi-toggle {
  background: #ffffff;
  color: #1c1e21;
  border-color: #ced0d4;
}
[data-theme="cover"] .row,
[data-theme="cover"] .card,
[data-theme="cover"] .home-card,
[data-theme="cover"] .stat,
[data-theme="cover"] .info-card,
[data-theme="cover"] .oshi-card,
[data-theme="cover"] .person-card,
[data-theme="cover"] .moment-card,
[data-theme="cover"] .mod-card,
[data-theme="cover"] .fanbase-row,
[data-theme="cover"] .day,
[data-theme="cover"] .relation,
[data-theme="cover"] .person,
[data-theme="cover"] .log-card,
[data-theme="cover"] .participant,
[data-theme="cover"] .oshi-panel {
  background: #ffffff;
  border-color: #ced0d4;
}
[data-theme="cover"] .row:hover,
[data-theme="cover"] .card:hover,
[data-theme="cover"] .home-card:hover,
[data-theme="cover"] .fanbase-row:hover {
  background: #f7f8fa;
}
[data-theme="cover"] .row-note,
[data-theme="cover"] .card-edition,
[data-theme="cover"] .moment-card p,
[data-theme="cover"] .mod-summary,
[data-theme="cover"] .person-body p {
  color: #4b4f56;
}
[data-theme="cover"] .tag {
  border-color: #ced0d4;
  color: #65676b;
}
[data-theme="cover"] .nav-user { color: #ffffff; }
[data-theme="cover"] .timeline,
[data-theme="cover"] .meta-line,
[data-theme="cover"] .handle { color: #65676b; }
[data-theme="cover"] .banner { border-bottom-color: #ced0d4; }
[data-theme="cover"] .modal-card textarea { background: #ffffff; }
[data-theme="rat"] {
  --bg: #2a1522;
  --surface: #492638;
  --surface-2: #62406d;
  --line: #7a4d82;
  --text: #ffd7ec;
  --muted: #c99bb4;
  --accent: #f85988;
  --accent-2: #db6ef0;
  --rp: #db6ef0;
  --tournament: #f85988;
}

.theme-switch {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-right: 2px;
  padding-bottom: 6px;
}
.theme-switch button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.theme-switch button[data-theme-set="cover"] { background: linear-gradient(135deg, #534B88, #564E8A); }
.theme-switch button[data-theme-set="oshilog"] { background: linear-gradient(135deg, #ff5c8a, #8b7cff); }
.theme-switch button[data-theme-set="rat"] { background: linear-gradient(135deg, #f85988, #db6ef0 60%, #62406d); }
.theme-switch button.active { border-color: #fff; }

/* ============ mobile menu ============ */
.mobile-menu-btn {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid #343b55;
  background: #12151f;
  color: var(--text);
  font-size: 18px;
  place-items: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.mobile-menu {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 72px;
  z-index: 90;
  flex-direction: column;
  min-width: 190px;
  padding: 8px;
  background: #12151f;
  border: 1px solid #2b3145;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}
.mobile-menu.open { display: flex; }
.mobile-menu a, .mobile-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: #c9cddb;
  font: inherit;
  font-size: 14px;
}
.mobile-menu a:hover, .mobile-menu button:hover { background: #1b1f2c; color: var(--text); }

/* ============ oshi panel / temp characters ============ */
.oshi-panel {
  margin-top: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.oshi-panel h3 { margin: 0 0 10px; font-size: 13px; }
.oshi-panel .field { margin-bottom: 10px; }
.oshi-panel select {
  width: 100%;
  background: #0d1018;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
}
.char-card.is-temp { border-style: dashed; opacity: 0.92; }
.participant { transition: border-color 0.15s, background 0.15s; }
.participant:hover { border-color: #343b55; background: #12151f; }

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.archive-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s, transform 0.15s;
}
.archive-card:hover { border-color: #343b55; transform: translateY(-2px); }
.archive-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.archive-top b { font-size: 15px; }
.archive-ext { color: var(--accent); font-size: 16px; }
.archive-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; flex: 1; }

.site-footer {
  max-width: 1080px;
  margin: 60px auto 30px;
  padding: 20px 24px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

/* ============ responsive ============ */
@media (max-width: 860px) {
  .mobile-menu-btn { display: grid; }
  .theme-switch { flex-direction: row; padding: 0; margin: 0 0 8px; }
  .profile-head { flex-wrap: wrap; }
}

@media (max-width: 620px) {
  .profile-name-row { align-items: flex-start; }
  .mobile-menu-btn {
    width: 64px;
    height: 64px;
    font-size: 26px;
    right: 18px;
    bottom: 18px;
  }
  .mobile-menu {
    right: 12px;
    bottom: 92px;
    min-width: 230px;
    padding: 10px;
  }
  .mobile-menu a, .mobile-menu button {
    font-size: 16px;
    padding: 12px 14px;
  }
  .nav-links { font-size: 17px; }
  .oshi-tags {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .oshi-tags::-webkit-scrollbar { display: none; }
  .oshi-tag { flex: 0 0 auto; font-size: 11px; }
  .oshi-grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .oshi-grid::-webkit-scrollbar { display: none; }
  .oshi-card { flex: 0 0 auto; }
}

/* ============ subtag menu fix ============ */
.multi-menu[hidden] { display: none; }
.multi-menu {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
}
.multi-menu .tag-check {
  width: 100%;
  border-radius: 6px;
  padding: 7px 10px;
}
.event-grid > main,
.event-grid > aside { min-width: 0; }
.moment-strip-wrap { min-width: 0; max-width: 100%; }
.participants { min-width: 0; }

@media (max-width: 960px) {
  .home-grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 54px 1fr auto; }
  .row-note { display: none; }
}

@media (max-width: 700px) {
  .home-link { grid-template-columns: 92px minmax(0, 1fr); min-height: 170px; }
  .home-art { font-size: 18px; }
  .home-body { padding: 12px 44px 38px 12px; }
  .home-title { font-size: 15px; }
  .home-desc { -webkit-line-clamp: 2; }
  .home-year { font-size: 40px; }
  .home-head h1 { font-size: 24px; }
  .participants { grid-template-columns: 1fr; }
  .oshi-grid { gap: 8px; }
}

/* ============ global size bump ============ */
body { font-size: 17px; }
.nav { height: 64px; }
.brand { font-size: 17px; }
.nav-links { font-size: 18px; }
.nav-user { width: 36px; height: 36px; font-size: 14px; }
.avatar { width: 140px; height: 140px; font-size: 46px; }
.profile-head { margin-top: -64px; }
.profile-id h1 { font-size: 32px; }
.btn { font-size: 14px; }
.stat b { font-size: 26px; }
.row-title, .card-title { font-size: 16px; }
.home-title { font-size: 19px; }
.page-head h1 { font-size: 30px; }
.home-head h1 { font-size: 34px; }
.char-avatar { width: 76px; height: 76px; font-size: 28px; }
.oshi-card i { width: 42px; height: 42px; }
.oshi-tag { font-size: 13px; }
.person-card > i, .person-avatar-link i { width: 52px; height: 52px; }
.moment-card p { font-size: 13.5px; }
@media (max-width: 620px) {
  .mobile-menu-btn { width: 76px; height: 76px; font-size: 30px; }
  .mobile-menu a, .mobile-menu button { font-size: 17px; }
  .nav-links { font-size: 17px; }
}
