:root {
  --bg: #0f0d0b;
  --bg-2: #14110e;
  --panel: #1a1612;
  --panel-2: #211b15;
  --panel-3: #2a221a;
  --line: #3a2f24;
  --line-soft: #2b241d;
  --ink: #e9dfcf;
  --ink-2: #cfc0a9;
  --muted: #9a8b76;
  --muted-2: #6f6354;
  --gold: #c9a86a;
  --gold-2: #e0c48c;
  --gold-soft: #8e7446;
  --red: #a63f35;
  --red-2: #c4554a;
  --green: #5a9e6f;
  --blue: #5b86a8;
  --purple: #8b6aa8;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(166, 63, 53, 0.16), transparent 60%),
    radial-gradient(1000px 600px at 92% 0%, rgba(201, 168, 106, 0.09), transparent 55%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012) 0, rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 3px),
    var(--bg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
}

a {
  color: var(--gold-2);
  text-decoration: none;
}

a:hover {
  color: #fff2d6;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px max(18px, calc((100vw - 1440px) / 2));
  border-bottom: 1px solid var(--line-soft);
  background: rgba(15, 13, 11, 0.88);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--gold-soft);
  border-radius: 10px;
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: 22px;
  background: linear-gradient(145deg, #2b2118, #17120e);
  box-shadow: inset 0 0 0 1px rgba(201, 168, 106, 0.15);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 2px;
  font-weight: 600;
}

.brand-text small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1px;
}

.nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 14px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.nav a:hover {
  background: var(--panel-2);
  color: var(--ink);
}

.nav a.active {
  color: #1a120a;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  border-color: var(--gold);
  font-weight: 600;
}

/* ---------- 布局 ---------- */
.app {
  width: min(1440px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 26px 0 70px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1440px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-2);
  font-size: 12px;
}

.loading {
  display: grid;
  place-items: center;
  min-height: 55vh;
  color: var(--muted);
}

.loading-seal {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 14px;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 38px;
  animation: breathe 1.8s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.55; transform: scale(0.97); }
  50% { opacity: 1; transform: scale(1.02); }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-head h1,
.page-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 2px;
}

.page-head h1 {
  font-size: 28px;
}

.page-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.gold {
  color: var(--gold-2);
}

/* ---------- 通用控件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--ink-2);
  transition: 0.18s ease;
}

.btn:hover {
  border-color: var(--gold-soft);
  color: var(--ink);
  background: var(--panel-3);
}

.btn.primary {
  border-color: var(--gold);
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #1b1208;
  font-weight: 700;
}

.btn.primary:hover {
  filter: brightness(1.05);
  color: #120b04;
}

.btn.ghost {
  background: transparent;
}

.btn.danger {
  border-color: rgba(166, 63, 53, 0.5);
  color: #e6a39b;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.sm {
  min-height: 30px;
  padding: 3px 10px;
  font-size: 12px;
  border-radius: 8px;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #120f0c;
  color: var(--ink);
  outline: none;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--gold-soft);
  box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.08);
}

.textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.7;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.7;
  white-space: nowrap;
}

.badge.wei { color: #9dc0e0; border-color: rgba(91, 134, 168, 0.45); }
.badge.shu { color: #e8a49c; border-color: rgba(196, 85, 74, 0.45); }
.badge.wu { color: #9fd0ae; border-color: rgba(90, 158, 111, 0.45); }
.badge.qun { color: #d8c58e; border-color: rgba(201, 168, 106, 0.45); }
.badge.shen { color: #c7b0e2; border-color: rgba(139, 106, 168, 0.55); }
.badge.jin { color: #b9c7d8; border-color: rgba(120, 140, 170, 0.5); }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-2);
  font-size: 12px;
}

.chip:hover {
  border-color: var(--gold-soft);
}

/* ---------- 今日 ---------- */
.today-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 40%), var(--panel);
  box-shadow: var(--shadow);
}

.today-hero {
  display: grid;
  grid-template-columns: minmax(280px, 44%) minmax(0, 1fr);
  min-height: 520px;
  overflow: hidden;
}

.hero-art-wrap {
  position: relative;
  min-height: 100%;
  background:
    radial-gradient(circle at 30% 20%, rgba(201, 168, 106, 0.12), transparent 55%),
    #17120e;
  border-right: 1px solid var(--line-soft);
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.96) contrast(1.02);
}

.hero-art-fade {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(transparent, rgba(15, 13, 11, 0.92));
  pointer-events: none;
}

.hero-art-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: 78px;
  letter-spacing: 8px;
  background: linear-gradient(145deg, #241c14, #120f0c);
}

.hero-info {
  display: flex;
  flex-direction: column;
  padding: 26px 26px 22px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.hero-name-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-name {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 600;
  letter-spacing: 8px;
  line-height: 1.1;
}

.hero-title {
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 2px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 16px;
}

.hero-intro {
  margin: 0 0 18px;
  padding-left: 12px;
  border-left: 2px solid var(--gold-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  max-height: 7.4em;
  overflow: auto;
}

.skill-block {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
}

.skill-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.skill-name {
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 1px;
}

.skill-desc {
  margin: 6px 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.line-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.line-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 8px;
  transition: background 0.15s;
}

.line-row:hover {
  background: rgba(201, 168, 106, 0.055);
}

.line-row.playing {
  background: rgba(201, 168, 106, 0.1);
}

.line-text {
  flex: 1;
  min-width: 0;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
}

.line-text .die {
  color: #d8a29b;
}

.audio-btn {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--gold-2);
  font-size: 12px;
  line-height: 1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.audio-btn:focus {
  outline: none;
}
.audio-btn:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 2px;
}

.audio-btn:hover {
  border-color: var(--gold);
  background: var(--panel-3);
}

.audio-btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 16px;
}

.today-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-card {
  padding: 16px;
}

.side-card h3 {
  margin: 0 0 10px;
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
}

.progress-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.progress-track {
  height: 7px;
  margin: 7px 0 10px;
  border-radius: 99px;
  background: #0d0b09;
  overflow: hidden;
  border: 1px solid var(--line-soft);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold-2));
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.review-list a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--ink-2);
  font-size: 13px;
}

.review-list a:hover {
  border-color: var(--line);
  background: var(--panel-2);
}

.note-area {
  width: 100%;
  min-height: 108px;
  margin-top: 8px;
}

/* ---------- 浏览 ---------- */
.filters {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(120px, 0.7fr));
  gap: 10px;
  margin-bottom: 16px;
}

.search-wrap {
  position: relative;
}

.search-wrap .input {
  padding-left: 36px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
}

.result-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}

.hero-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  transition: 0.18s ease;
}

.hero-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-soft);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.hero-card-art {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #15100c;
  overflow: hidden;
}

.hero-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s ease;
}

.hero-card:hover .hero-card-art img {
  transform: scale(1.035);
}

.hero-card-art .ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: 42px;
}

.hero-card-body {
  padding: 9px 10px 10px;
}

.hero-card-name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 1px;
}

.hero-card-title {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-card-tags {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.hero-card-tags .badge {
  padding: 0 6px;
  font-size: 10px;
}

.load-more {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 22px 0 0;
}

.empty {
  padding: 46px 18px;
  text-align: center;
  color: var(--muted);
}

.empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 20px;
}

/* ---------- 详情 ---------- */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.detail-side {
  position: sticky;
  top: 78px;
}

.detail-art {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #15100c;
  aspect-ratio: 3 / 4;
}

.detail-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.detail-art .ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: 92px;
}

.skin-strip {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-bottom: 4px;
  overflow-x: auto;
}

.skin-thumb {
  flex: 0 0 72px;
  width: 72px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
}

.skin-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.skin-thumb span {
  display: block;
  padding: 2px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skin-thumb.active {
  border-color: var(--gold);
  color: var(--gold-2);
  box-shadow: 0 0 0 1px rgba(201, 168, 106, 0.25);
}

.detail-main {
  padding: 24px 26px 28px;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.detail-name {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(34px, 4.4vw, 54px);
  font-weight: 600;
  letter-spacing: 8px;
  line-height: 1.1;
}

.detail-title {
  margin: 4px 0 0;
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 2px;
}

.detail-section {
  margin-top: 22px;
}

.detail-section h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 2px;
  font-weight: 600;
}

.detail-section h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.skin-info {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(201, 168, 106, 0.22);
  border-radius: 12px;
  background: rgba(201, 168, 106, 0.045);
}

.skin-info h4 {
  margin: 0 0 6px;
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 1px;
}

.skin-story {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.kv .item {
  padding: 7px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.12);
}

.kv .k {
  color: var(--muted-2);
  font-size: 11px;
}

.kv .v {
  color: var(--ink-2);
  font-size: 13px;
}

.source-line {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-soft);
  color: var(--muted-2);
  font-size: 11px;
  word-break: break-all;
}

/* ---------- 台词本 ---------- */
.lines-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr);
  gap: 10px;
  margin-bottom: 14px;
}

.line-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.line-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 150px 38px;
  gap: 12px;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel);
  transition: background 0.15s;
}

.line-item:last-child {
  border-bottom: 0;
}

.line-item:hover {
  background: var(--panel-2);
}

.line-item .who {
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.line-item .what {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.line-item .txt {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- 统计 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  padding: 16px;
}

.stat-card .num {
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.1;
}

.stat-card .label {
  color: var(--muted);
  font-size: 12px;
}

.pack-progress {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 56px;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  font-size: 12px;
}

.pack-progress .track {
  height: 6px;
  border-radius: 99px;
  background: #0d0b09;
  border: 1px solid var(--line-soft);
  overflow: hidden;
}

.pack-progress .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold-2));
}

/* ---------- 关于 ---------- */
.prose {
  max-width: 920px;
  color: var(--ink-2);
}

.prose h2 {
  margin: 26px 0 8px;
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 2px;
}

.prose h3 {
  margin: 18px 0 6px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

.prose code {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #100d0a;
  color: var(--gold-2);
  font-size: 12px;
}

.prose pre {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #100d0a;
  overflow: auto;
  color: var(--ink-2);
  font-size: 12px;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 100;
  max-width: min(520px, calc(100vw - 32px));
  padding: 9px 16px;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  background: rgba(25, 20, 15, 0.96);
  color: var(--ink);
  font-size: 13px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .today-wrap {
    grid-template-columns: 1fr;
  }
  .today-hero {
    grid-template-columns: minmax(240px, 40%) minmax(0, 1fr);
  }
  .today-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .topbar {
    gap: 12px;
    padding: 8px 14px;
  }
  .brand-text small {
    display: none;
  }
  .nav a {
    padding: 6px 11px;
    font-size: 13px;
  }
  .today-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .hero-art-wrap {
    aspect-ratio: 4 / 3;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .hero-art {
    object-position: center 28%;
  }
  .hero-info {
    padding: 18px;
  }
  .today-side {
    grid-template-columns: 1fr;
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-side {
    position: static;
    max-width: 390px;
    margin: 0 auto;
    width: 100%;
  }
  .detail-main {
    padding: 18px;
  }
  .filters {
    grid-template-columns: 1fr 1fr;
  }
  .filters .search-wrap {
    grid-column: 1 / -1;
  }
  .line-item {
    grid-template-columns: 88px minmax(0, 1fr) 34px;
  }
  .line-item .what {
    display: none;
  }
}

@media (max-width: 520px) {
  .app {
    width: calc(100vw - 22px);
    padding-top: 16px;
  }
  .brand-text strong {
    font-size: 15px;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 19px;
  }
  .filters {
    grid-template-columns: 1fr;
  }
  .hero-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 9px;
  }
  .footer {
    flex-direction: column;
    gap: 4px;
  }
  .page-head h1 {
    font-size: 23px;
  }
  .lines-toolbar {
    grid-template-columns: 1fr;
  }
  .pack-progress {
    grid-template-columns: 88px minmax(0, 1fr) 44px;
  }
}

/* ---------- 启动加载层 ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(700px 500px at 50% 30%, rgba(201, 168, 106, 0.08), transparent 65%),
    rgba(15, 13, 11, 0.96);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.boot.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.boot-card {
  width: min(420px, 100%);
  padding: 30px 26px 24px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent 45%), var(--panel);
  box-shadow: var(--shadow);
}
.boot-card .loading-seal {
  margin: 0 auto 12px;
}
.boot-card h1 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 3px;
  font-weight: 600;
}
.boot-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.boot-bar {
  height: 6px;
  margin: 4px 0 14px;
  border: 1px solid var(--line-soft);
  border-radius: 99px;
  background: #0d0b09;
  overflow: hidden;
}
.boot-bar span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-2), transparent);
  animation: boot-slide 1.35s ease-in-out infinite;
}
@keyframes boot-slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(340%); }
}

/* ---------- 图片/缩略图加载骨架 ---------- */
.hero-art-wrap,
.detail-art,
.hero-card-art,
.skin-thumb {
  position: relative;
  overflow: hidden;
}
.hero-art-wrap:not(.loaded):not(.img-error)::after,
.detail-art:not(.loaded):not(.img-error)::after,
.hero-card-art:not(.loaded):not(.img-error)::after,
.skin-thumb:not(.loaded):not(.img-error)::after {
  content: "加载中";
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: var(--gold-soft);
  font-size: 11px;
  letter-spacing: 2px;
  background:
    linear-gradient(110deg, transparent 20%, rgba(201, 168, 106, 0.08) 45%, transparent 70%),
    #17120e;
  background-size: 220% 100%;
  animation: media-shimmer 1.5s linear infinite;
  pointer-events: none;
}
.hero-art-wrap:not(:has(img))::after,
.detail-art:not(:has(img))::after,
.hero-card-art:not(:has(img))::after,
.skin-thumb:not(:has(img))::after {
  display: none;
}
@keyframes media-shimmer {
  0% { background-position: 180% 0; }
  100% { background-position: -80% 0; }
}
.hero-art-wrap img.hero-art,
.detail-art img.hero-art,
.hero-card-art img,
.skin-thumb img {
  opacity: 0;
  transition: opacity 0.28s ease;
}
.hero-art-wrap.loaded img.hero-art,
.detail-art.loaded img.hero-art,
.hero-card-art.loaded img,
.skin-thumb.loaded img {
  opacity: 1;
}
.skin-thumb {
  position: relative;
}

/* ---------- 经典形象折叠区 ---------- */
.classic-block {
  margin-top: 18px;
  padding: 10px 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.1);
}
.classic-block > summary {
  cursor: pointer;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 1px;
  outline: none;
}
.classic-block > summary:hover {
  color: var(--gold-2);
}
.classic-block[open] > summary {
  margin-bottom: 8px;
  color: var(--ink-2);
}

/* ---------- 音频加载态 ---------- */
.audio-btn {
  position: relative;
}
.audio-btn.loading {
  border-color: var(--gold);
  background: var(--panel-3);
}
.audio-btn.loading .audio-icon {
  opacity: 0.35;
}
/* 不再画旋转的椭圆/圆环；加载时只做静态弱化，避免手机上出现奇怪动画。 */

/* ---------- 路由骨架 ---------- */
.skeleton-page {
  display: block;
  padding: 8px 0;
}
.skeleton-hero {
  display: grid;
  grid-template-columns: minmax(240px, 38%) minmax(0, 1fr);
  gap: 22px;
}
.skeleton-art,
.skeleton-line,
.skeleton-title,
.skeleton-pill {
  border-radius: 10px;
  background: linear-gradient(100deg, #1a1612 20%, #241d17 40%, #1a1612 60%);
  background-size: 220% 100%;
  animation: media-shimmer 1.4s linear infinite;
}
.skeleton-art {
  min-height: 380px;
  border-radius: 14px;
}
.skeleton-title {
  width: 42%;
  height: 46px;
  margin: 12px 0 16px;
}
.skeleton-pill {
  width: 120px;
  height: 22px;
  margin-bottom: 10px;
}
.skeleton-line {
  height: 13px;
  margin: 10px 0;
}
.skeleton-line.short { width: 64%; }
@media (max-width: 820px) {
  .skeleton-hero { grid-template-columns: 1fr; }
  .skeleton-art { min-height: 260px; }
}
