/* ==========================================================================
   Sanctuary · Roselia 数据库
   深蓝界面，蓝色用于交互，低饱和金色用于标题和装饰。
   ========================================================================== */

:root {
  --ink: #04060c;
  color-scheme: dark;
  caret-color: transparent;
  --bg: #0a101d;
  --panel: #101a2a;
  --panel-2: #152139;
  --line: #283650;
  --line-soft: #1c283d;

  --text: #e9eef7;
  --text-2: #c3cee2;
  --muted: #9baac2;

  --blue: #6d9bff;
  --blue-deep: #2c4680;
  --blue-dim: rgba(109, 155, 255, 0.11);

  --rose: #e8527d;
  --rose-soft: #ffc0d0;
  --rose-dim: rgba(232, 82, 125, 0.11);

  --gold: #c9a86a;
  --gold-line: rgba(201, 168, 106, 0.42);
  --teal: #5fd6c0;

  --serif: Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, serif;
  --sans: "Segoe UI", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, "Noto Sans SC", "Microsoft YaHei", "PingFang SC", monospace;

  --radius: 10px;
  --rail-width: 246px;
  --pane-gutter: clamp(22px, 3vw, 44px);
  --pane-top: 26px;
}

input, textarea, [contenteditable] { caret-color: transparent; }

[lang|="ja"] {
  --serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", Georgia, serif;
  --sans: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 80% 0%, rgba(66, 104, 175, .12), transparent 76%),
    linear-gradient(160deg, #0a101d, #0b1321 62%, #0d1626);
  color: var(--text);
  font: 14px/1.68 var(--sans);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ------------------------------------------------------------ 镂空金色蔷薇 */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ambient::before {
  content: "";
  position: absolute;
  right: -64px;
  top: 88px;
  width: clamp(330px, 40vw, 600px);
  aspect-ratio: 1;
  opacity: .22;
}
.ambient::before, .drawer-rose {
  background: #c5a467;
  mask: url('/rose-watermark.png') center / contain no-repeat;
}
.topbar, .layout { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- 顶栏 */

.topbar {
  display: grid;
  grid-template-areas: "brand tabs end";
  grid-template-columns: var(--rail-width) minmax(max-content, 1fr) auto;
  align-items: center;
  flex: 0 0 auto;
  min-height: 74px;
  padding-right: 24px;
  background: #0b1220;
  border-bottom: 1px solid var(--line);
  z-index: 5;
}

.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 20px;
}
.brand-emblem {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  height: 48px;
  border: 1px solid rgba(201, 168, 106, .29);
  border-radius: 12px;
  background: radial-gradient(ellipse at top, #213256, #101a31 75%);
}
.brand-emblem img { display: block; width: 34px; height: 34px; }
.brand-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.brand h1 {
  position: relative;
  top: 3px;
  width: 136px;
  max-width: 100%;
  aspect-ratio: 4.2;
  overflow: hidden;
  margin: 0;
}
.brand h1 img {
  position: absolute;
  top: 50%;
  left: -4%;
  display: block;
  width: 108%;
  height: auto;
  transform: translateY(-50%);
}
.brand-sub { color: var(--muted); font-size: 11px; line-height: 1.35; letter-spacing: .055em; white-space: nowrap; }

.tabs {
  grid-area: tabs;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 0;
}
.tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 8px;
  font: 600 13px/1.4 var(--sans);
  white-space: nowrap;
  cursor: pointer;
  transition: color .14s, background .14s, border-color .14s;
}
.tab svg, .filter-toggle svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tab:hover { color: var(--text); background: rgba(109, 155, 255, .08); }
.tab.is-active { color: #e3ebff; border-color: #3a527f; background: #1b2b4b; }
.tab.is-active svg { color: #acc5ff; }

.topbar-end {
  grid-area: end;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.topbar-end .dbmeta { max-width: clamp(120px, 19vw, 340px); }
.topbar-end .schema-badge { order: 2; }
.topbar-end .revision-link { order: 3; white-space: nowrap; }
.topbar-end .account-link { order: 4; white-space: nowrap; }
.topbar-end .account-link.is-avatar { border: 0; border-radius: 50%; padding: 0; text-decoration: none; }
.account-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  background: #192842;
  color: var(--gold);
  font: 600 15px/1 var(--serif);
}
.account-link:is(:hover, [aria-current="page"]) .account-avatar { border-color: var(--gold); }
.account-link[aria-current="page"] { box-shadow: 0 0 0 2px var(--gold-line); }
.account-avatar[hidden], .account-avatar img[hidden] { display: none; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lang-btn.on {
  color: #fff;
  border-color: rgba(232, 82, 125, 0.45);
  background: rgba(232, 82, 125, 0.12);
}
.tr { cursor: help; }

.badge.sub {
  color: var(--gold);
  border-color: rgba(201, 168, 106, 0.35);
}
.badge.cat-formal { color: #9ecbff; border-color: rgba(109, 155, 255, 0.35); }
.badge.cat-life { color: #f0a6bd; border-color: rgba(232, 82, 125, 0.35); }
.badge.cat-community { color: #b6d3a8; border-color: rgba(150, 200, 130, 0.3); }
.badge.cat-reference { color: #cfc6e8; border-color: rgba(180, 170, 220, 0.3); }

.schema-badge {
  font: 10.5px/1 var(--mono);
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 3px 6px;
  white-space: nowrap;
  cursor: help;
}
.schema-badge.warn {
  color: #ffc0d0;
  border-color: rgba(232, 82, 125, 0.45);
  background: rgba(232, 82, 125, 0.1);
}
.dbmeta {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------- 控件 */

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-2);
  border-radius: 7px;
  padding: 6px 11px;
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.13s, border-color 0.13s, color 0.13s;
}
.ghost:hover { background: rgba(109, 155, 255, 0.07); color: #fff; border-color: rgba(109, 155, 255, 0.38); }
.ghost:active { transform: translateY(1px); }
.tiny { font-size: 12px; padding: 4px 9px; }

.ghost:focus-visible, .tab:focus-visible, .group > summary:focus-visible,
.facet:focus-within, .pager button:focus-visible, .chip :focus-visible, .chip.reset:focus-visible {
  outline: 2px solid #9bb5ff;
  outline-offset: 2px;
}

.primary {
  background: linear-gradient(180deg, #3f6ede, #2b4d9e);
  border: 1px solid rgba(109, 155, 255, 0.5);
  color: #fff;
  border-radius: 3px;
  padding: 8px 17px;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 10px 26px -16px rgba(80, 130, 240, 0.95);
}
.primary:hover { filter: brightness(1.1); }

kbd {
  font: 11px/1 var(--mono);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 2px 4px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.muted { color: var(--muted); }
.hidden { display: none !important; }
.warn { color: var(--gold); font-size: 12px; }

/* ---------------------------------------------------------------- 布局 */

.layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
}

.filter-rail {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #0e1625;
  border-right: 1px solid var(--line-soft);
}
.filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  min-height: 54px;
  margin: 0 18px;
  padding: 12px 5px 10px;
  border-bottom: 1px solid var(--line-soft);
  color: #e1e9f8;
  font-weight: 650;
  letter-spacing: .08em;
}
.filter-toggle { display: none; }
.sidebar {
  min-height: 0;
  overflow-y: auto;
  padding: 12px 15px 32px;
  scrollbar-gutter: stable;
}

.workspace { min-width: 0; display: flex; flex-direction: column; overflow: hidden; }

.pane {
  display: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--pane-top) var(--pane-gutter) 72px;
  scrollbar-gutter: stable;
}
.pane.is-active { display: block; }

@media (prefers-reduced-motion: no-preference) {
  .page-transition .layout { view-transition-name: page-content; }
  .page-transition .workspace { position: relative; }
  .page-transition .workspace::after {
    content: "";
    position: absolute;
    pointer-events: none;
    inset: 0;
    view-transition-name: page-sweep;
  }
  .page-transition::view-transition-group(page-content),
  .page-transition::view-transition-group(root) { animation-duration: 360ms; }
  .page-transition::view-transition-old(page-content),
  .page-transition::view-transition-new(page-content) { animation-duration: 360ms; animation-timing-function: ease-in-out; }
  /* Only the transition overlay paints the light. Both live pages stay clear. */
  .page-transition::view-transition-group(page-sweep) {
    background: linear-gradient(110deg, transparent 32%, #8498ea18 44%, #d9b9ff32 50%, transparent 68%) no-repeat;
    background-size: 300% 100%;
    animation: page-light-sweep 520ms linear both;
  }
  @keyframes page-light-sweep {
    from { background-position: 100% center; opacity: 0; }
    22%, 70% { opacity: .9; }
    to { background-position: 0% center; opacity: 0; }
  }
}

/* ---------------------------------------------------------------- 侧栏 */

.group { border-bottom: 1px solid var(--line-soft); padding: 4px 0 12px; }
.rail-section { margin: 18px 6px 5px; font-size: 12px; color: var(--gold); }
.sidebar .group .group { margin-left: 12px; }
.group:last-child { border-bottom: 0; }

.group > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 6px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .055em;
  color: #d9bc86;
  user-select: none;
}
.group > summary::-webkit-details-marker { display: none; }
.group > summary::before {
  content: "";
  width: 4px;
  height: 4px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.16s;
  opacity: 0.85;
}
.group[open] > summary::before { transform: rotate(45deg); }
.group > summary:hover { color: #e6cf9f; }

.facet-filter {
  width: 100%;
  background: #060a12;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  padding: 5px 8px;
  margin: 5px 0 7px;
}
.facet-filter:focus { outline: none; border-color: rgba(109, 155, 255, 0.5); }

.facet {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 5px 9px;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-2);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.facet:hover { background: rgba(109, 155, 255, 0.06); }
.facet input { accent-color: var(--rose); margin: 0; width: 12px; height: 12px; flex: 0 0 auto; }
.facet .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facet .n {
  margin-left: auto;
  color: var(--muted);
  font-size: 10.5px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.facet.on { background: var(--blue-dim); border-left-color: var(--blue); color: #fff; }
.facet.on .n { color: #b4caff; }
/* 时间线「类型」筛选跟标签同色：tone=own 用专场演唱会的金色 */
.facet.tone-own .name { color: var(--gold); }
.facet.tone-own .n { color: rgba(201, 168, 106, 0.75); }
.facet.tone-own.on { border-left-color: var(--gold); }

.range {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 6px 8px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.range > span { flex: 0 0 auto; letter-spacing: 0.1em; }
.range input[type="range"] { flex: 1; min-width: 0; accent-color: var(--blue); }
.range output { font-variant-numeric: tabular-nums; color: var(--text-2); min-width: 46px; text-align: right; font-family: var(--mono); font-size: 11px; }

.side-note {
  margin: 12px 4px 0;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--muted);
  opacity: 0.9;
}
.side-note code { font-family: var(--mono); font-size: 10.5px; color: var(--gold); }

/* ---------------------------------------------------------------- 检索区 */

.search-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: 17px;
  padding: clamp(17px, 2.2vw, 29px) clamp(17px, 3vw, 40px);
  border: 1px solid #2c3e5e;
  border-radius: 15px;
  background: radial-gradient(ellipse at top right, #293e68, transparent 70%),
    linear-gradient(125deg, #111c30, #162541 67%, #14233d);
}
.search-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  top: 50%;
  right: 2.5%;
  width: clamp(200px, 27vw, 370px);
  aspect-ratio: 1;
  transform: translateY(-47%) rotate(-8deg);
  background: url('/sanctuary-mark.png') center / contain no-repeat;
  opacity: .12;
}
.search-hero h2 {
  margin: 0 0 13px;
  color: #f1eadc;
  font: 600 clamp(23px, 2.3vw, 34px)/1.25 var(--serif);
  letter-spacing: .07em;
}
.search-help { margin: 9px 0 0; color: #a8b7d1; font-size: 12px; }
.search-help span { color: var(--gold); margin: 0 .35em; }
.search-help code { color: #d4def3; font: inherit; }

.searchbox {
  position: sticky;
  top: calc(-1 * var(--pane-top));
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px 5px 13px;
  margin-bottom: 12px;
  border: 1px solid #3b4e71;
  border-radius: 9px;
  background: #0d1627;
}
.searchbox:focus-within { border-color: #8caeff; box-shadow: 0 0 0 2px rgba(133, 166, 255, .19); }
.search-hero .searchbox { position: relative; top: auto; max-width: 780px; margin: 0; }
.searchbox .icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #bacdf7;
  stroke-width: 1.7;
  stroke-linecap: round;
  flex: 0 0 auto;
}
.searchbox input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 7px 0;
}
.searchbox input::placeholder { color: #9baac2; }
.searchbox input:focus { outline: none; }
.searchbox kbd { flex: 0 0 auto; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 2px 11px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 12px;
}
.toolbar .count { font-size: 12.5px; color: var(--muted); letter-spacing: 0.02em; }
.toolbar .count b { color: #fff; font-weight: 600; font-family: var(--serif); font-size: 14px; }
.toolbar .spacer { flex: 1; }
.toolbar .field { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

select {
  background: #050810;
  border: 1px solid var(--line);
  color: var(--text-2);
  border-radius: 3px;
  padding: 5px 8px;
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
select:focus { outline: none; border-color: rgba(109, 155, 255, 0.5); }

input[type="date"] {
  background: #050810;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text-2);
  font: inherit;
  font-size: 12.5px;
  padding: 4px 7px;
  color-scheme: dark;
}

.chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 2px 12px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  padding: 3px 4px 3px 10px;
  border-radius: 6px;
  background: var(--blue-dim);
  border: 1px solid rgba(109, 155, 255, .35);
  color: #cadbff;
  letter-spacing: 0.02em;
}
.chip button {
  border: 0;
  background: rgba(109, 155, 255, .18);
  color: inherit;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  font-size: 11px;
}
.chip button:hover { background: var(--blue); color: #0a0d16; }
.chip.reset { padding-inline: 10px; background: transparent; border-color: var(--line); color: var(--muted); cursor: pointer; }
.chip.reset:hover { color: var(--text-2); }
.chip.reset button { display: none; }

/* ---------------------------------------------------------------- 结果卡片 */

.results { display: flex; flex-direction: column; gap: 10px; }

.card {
  position: relative;
  border: 1px solid #24324b;
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  background: #101a2b;
  transition: border-color 0.16s, background 0.16s, box-shadow 0.16s;
}
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 2px;
  background: #88a8e9;
  opacity: .34;
  transition: opacity 0.16s;
}
.card:hover {
  border-color: #405782;
  background: #14223a;
}
.card:hover::before { opacity: 0.95; }
.card:focus-visible { outline: 2px solid #9bb5ff; outline-offset: 2px; }

.card h3 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.005em;
  margin: 0 0 8px;
  color: #f2f6fd;
}
.card .meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.badge {
  font-size: 10.5px;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-2);
  white-space: nowrap;
}
.badge.member-written { color: var(--gold); border-color: var(--gold-line); background: rgba(201, 168, 106, 0.10); }
.badge.src { background: rgba(109, 155, 255, 0.10); border-color: rgba(109, 155, 255, 0.26); color: #b9cdff; }
.badge.tier-official { background: rgba(232, 82, 125, 0.12); border-color: rgba(232, 82, 125, 0.32); color: var(--rose-soft); }
.badge.tier-community { background: rgba(201, 168, 106, 0.10); border-color: rgba(201, 168, 106, 0.30); color: #e3cd9e; }
.badge.tier-cited { background: rgba(95, 214, 192, 0.09); border-color: rgba(95, 214, 192, 0.28); color: #a8e6d8; }
.badge.tier-local,
.badge.tier-database,
.badge.tier-global { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.08); color: var(--muted); }

.card .snip {
  margin: 0;
  font-size: 12.8px;
  line-height: 1.8;
  color: #b2bfd4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

mark {
  background: linear-gradient(180deg, transparent 56%, rgba(232, 82, 125, 0.34) 56%);
  color: #fff;
  padding: 0 1px;
  border-radius: 1px;
}

.empty {
  position: relative;
  text-align: center;
  padding: 88px 20px;
  color: var(--muted);
  overflow: hidden;
}
.empty::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 30%;
  width: 230px;
  height: 230px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(109, 155, 255, 0.13) 0 1px, transparent 1px 13px);
  -webkit-mask-image: radial-gradient(circle, #000 34%, transparent 70%);
  mask-image: radial-gradient(circle, #000 34%, transparent 70%);
  opacity: 0.7;
  pointer-events: none;
}
.empty h3 {
  position: relative;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-2);
  margin: 0 0 10px;
}
.empty p { position: relative; margin: 0; font-size: 12.5px; }
.empty code { position: relative; font-family: var(--mono); color: var(--gold); }

/* ---------------------------------------------------------------- 分页 */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 26px 0 10px;
  flex-wrap: wrap;
}
.pager button {
  min-width: 30px;
  height: 29px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 12px;
  font-family: var(--mono);
  cursor: pointer;
  padding: 0 9px;
  transition: background 0.13s, border-color 0.13s, color 0.13s;
}
.pager button:hover:not(:disabled) { background: rgba(109, 155, 255, 0.08); color: #fff; border-color: rgba(109, 155, 255, 0.35); }
.pager button.on {
  background: var(--rose-dim);
  border-color: rgba(232, 82, 125, 0.42);
  color: #fff;
}
.pager button:disabled { opacity: 0.3; cursor: default; }
.pager .dots { color: var(--muted); padding: 0 3px; }
.pager .info { color: var(--muted); font-size: 11.5px; margin-right: 10px; font-family: var(--mono); }

/* ---------------------------------------------------------------- 引语 */

.quotes { display: flex; flex-direction: column; gap: 9px; }
.quote {
  margin: 0;
  position: relative;
  border: 1px solid var(--line);
  border-left: 2px solid var(--member-accent, #778395);
  border-radius: var(--radius);
  padding: 13px 17px;
  background: #101b2d;
  transition: border-color .15s, background .15s;
}
.quote[data-article]:not([data-article=""]) { cursor: pointer; }
.quote[data-article]:not([data-article=""]):hover {
  border-color: #2b3b5a;
  border-left-color: var(--member-tone, #a6b0be);
  background: #17243c;
}
.quote:focus-visible { outline: 2px solid #9bb5ff; outline-offset: -2px; }
.qhead {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 7px;
  flex-wrap: wrap;
}
.qhead .speaker {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--member-tone, #a6b0be);
}
.qhead .qdate { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.02em; }
.qhead .qlen { margin-left: auto; font-family: var(--mono); font-size: 10.5px; }
.quote blockquote {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.8;
  color: #d3dcea;
}

.quote figcaption {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quote .quote-open { color: #b3c7ef; margin-right: 7px; }

@media (min-width: 761px) {
  .preview-height-locked {
    flex: none;
    block-size: var(--preview-height);
    overflow: hidden;
  }
  .preview-height-locked > :not(.preview-copy-overlay) { inline-size: var(--preview-copy-width, auto); }
  .preview-copy-overlay { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
  .preview-compact { display: grid; grid-template-columns: minmax(0, 1fr); }
  .card.preview-compact { grid-template-rows: auto auto minmax(0, 1fr); }
  .card.preview-compact h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .card.preview-compact .meta {
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: hidden;
  }
  .quote.preview-compact { grid-template-rows: auto minmax(0, 1fr) auto; }
  .quote.preview-compact .qhead { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
  .quote.preview-compact blockquote { overflow: hidden; }
}

/* ---------------------------------------------------------------- 页面标题与分组跳转 */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 0 0 16px;
  margin-bottom: 17px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 { margin: 0; color: #f1eadc; font: 600 clamp(24px, 3vw, 34px)/1.3 var(--serif); letter-spacing: .06em; }
.section-head p { margin: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.section-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  position: sticky;
  top: 0;
  z-index: 3;
  overflow-x: auto;
  scrollbar-width: thin;
  margin-bottom: 18px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #101a2c;
}
.section-nav[hidden] { display: none; }
.section-link {
  flex: 0 0 auto;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #c4d1e8;
  font: 600 12px/1.6 var(--sans);
  cursor: pointer;
}
.section-link:hover { background: #1d2e4b; color: #eff4ff; border-color: #3b5176; }
.section-link:focus-visible, .rel:focus-visible, button.tl-item:focus-visible {
  outline: 2px solid #9bb5ff;
  outline-offset: -2px;
}
.rel-group, .tl-group { scroll-margin-top: 64px; }
.rel-group:focus, .tl-group:focus { outline: none; }

/* ---------------------------------------------------------------- 时间线 */
.date-toolbar {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgb(16 26 44 / 86%);
}
.date-toolbar input { min-width: 0; }
.timeline { display: flex; flex-direction: column; gap: 30px; }
.tl-year {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 12px;
  color: #e8d7b6;
  font: 500 clamp(24px, 3vw, 32px)/1.1 Georgia, var(--serif);
  font-variant-numeric: lining-nums tabular-nums;
}
.tl-year::after {
  content: "";
  align-self: center;
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-line), transparent);
}
.tl-year-meta { color: var(--muted); font: 400 11px/1.3 var(--sans); }
.tl-list { display: grid; gap: 6px; position: relative; padding-left: 14px; }
.tl-list::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 3px;
  width: 1px;
  background: linear-gradient(var(--gold-line), var(--line) 80%, transparent);
}
.tl-item {
  --tl-accent: #8898b4;
  display: grid;
  grid-template-columns: 76px 92px minmax(0, 1fr) 16px;
  align-items: baseline;
  gap: 4px 8px;
  min-width: 0;
  padding: 9px 12px;
  margin-top: var(--tl-gap, 0px);
  position: relative;
  text-align: left;
  font: inherit;
  color: var(--text);
  background: rgb(16 26 44 / 84%);
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  transition: background .14s, border-color .14s;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--bg);
  background: var(--tl-accent);
}
button.tl-item { cursor: pointer; }
button.tl-item:hover { border-color: #42608c; background: #172641; }
.tl-tag { display: flex; min-width: 0; }
.tl-item .tl-tag .badge {
  max-width: 100%;
  padding: 2px 6px;
  font-size: 10px;
  letter-spacing: .025em;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-date { color: #b7c7df; font: 600 12px/1.65 var(--mono); white-space: nowrap; }
.tl-main { min-width: 0; display: grid; gap: 3px; }
.tl-main b { font: 600 15px/1.55 var(--serif); overflow-wrap: anywhere; }
.tl-detail { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.tl-venue, .tl-on { font-size: 11.5px; color: var(--muted); overflow-wrap: anywhere; }
.tl-songs { font-size: 11.5px; color: #d4bd92; }
.tl-arrow { font: 500 14px/1.4 var(--sans); color: var(--tl-accent); text-align: right; }

/* ---------------------------------------------------------------- 作品 */
[data-pane="releases"] .scroll-controls .searchbox { position: relative; top: auto; }
.rel-group { margin-bottom: 27px; }
.rel-group h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  color: #e1ceaa;
  font: 600 17px/1.4 var(--serif);
}
.rel-group h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}
.rel-group .hint { color: var(--muted); font: 400 11px/1 var(--mono); }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr)); gap: 10px; }
.rel {
  --rel-tone: #adc6ff;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 13px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #293852;
  border-radius: var(--radius);
  background: #101b2d;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.rel:hover { background: #17263f; border-color: #4b6591; }
.rel[data-rel-tone="album"], .rel[data-rel-tone="mini"], .rel[data-rel-tone="best"] { --rel-tone: #d9bc84; }
.rel[data-rel-tone="single"] { --rel-tone: #e3a7be; }
.rel[data-rel-tone="song"] { --rel-tone: #96d6d0; }
.rel[data-rel-tone="event"] { --rel-tone: #dcc18e; }
.rel[data-rel-tone="collab"] { --rel-tone: #acd5b9; }
.rel-art {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rel-tone) 27%, transparent);
  border-radius: 8px;
  background: radial-gradient(ellipse at 45% 25%, color-mix(in srgb, var(--rel-tone) 19%, #18243c), #121b2d 85%);
  color: var(--rel-tone);
}
.rel-art svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.rel-copy { display: grid; align-content: center; gap: 5px; min-width: 0; }
.rel-name {
  color: #edf2fb;
  font: 600 14px/1.48 var(--serif);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.rel-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 7px; min-width: 0; }
.rel-meta .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.rel-arrow { color: var(--rel-tone); font-size: 13px; text-align: right; }
.rel-grid.list { grid-template-columns: minmax(0, 1fr); gap: 5px; }
.rel-grid.list .rel {
  grid-template-columns: 32px minmax(0, 1fr) 16px;
  gap: 10px;
  padding: 6px 10px;
}
.rel-grid.list .rel-art svg { width: 17px; height: 17px; }
.rel-grid.list .rel-copy { grid-template-columns: minmax(0, 1fr) minmax(0, 220px); align-items: center; column-gap: 14px; }
.rel-grid.list .rel-name { -webkit-line-clamp: 1; }

/* 发行物、歌曲和演出目录 */
.layout:is(.catalog-layout, .standalone-layout) { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
:is(.catalog-layout, .standalone-layout) .filter-rail { display: none; }
.catalog-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 10px 0 14px; }
.catalog-options:not(:has(> :not([hidden]))) { display: none; }
.catalog-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.catalog-sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.catalog-sort[hidden] { display: none; }
.catalog-filters[hidden] { display: none; }
.catalog-filters button[aria-pressed="true"] { color: #e7edff; border-color: #607cb4; background: #24375b; }
.rel-venue { min-width: 0; overflow-wrap: anywhere; color: var(--text-2); font-size: 11px; }
.rel-grid.art-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 164px), 1fr)); gap: 12px; }
.catalog-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #293852;
  border-radius: var(--radius);
  background: #101b2d;
  transition: border-color .15s, background .15s;
}
.catalog-card:hover, .catalog-card:focus-within { border-color: #4b6591; background: #17263f; }
.catalog-card.frequent-performance {
  border-color: rgba(215, 173, 98, 0.84);
  box-shadow: 0 0 9px rgba(215, 173, 98, 0.39), inset 0 0 6px rgba(215, 173, 98, 0.17);
}
.catalog-card.frequent-performance:is(:hover, :focus-within) {
  border-color: #edc77f;
}
.catalog-card .rel {
  flex: 1;
  grid-template-columns: minmax(0, 1fr) 13px;
  grid-template-rows: auto minmax(46px, 1fr);
  align-items: start;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 8px;
}
.catalog-card .rel:focus-visible { outline-offset: -2px; }
.catalog-card .cover-frame { grid-column: 1 / -1; width: 100%; border-radius: 6px; }
.cover-frame {
  display: block;
  isolation: isolate;
  aspect-ratio: 1;
  overflow: hidden;
  background: #0d1627 url('/sanctuary-mark.png') center / 29% auto no-repeat;
}
.cover-frame img { display: block; position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; background: #0d1627; opacity: 1; filter: none; mix-blend-mode: normal; }
.cover-frame img[hidden] { display: none; }
.edition-cover-frame { position: relative; }
.edition-cover-frame img.cover-incoming { position: absolute; inset: 0; z-index: 2; }
.catalog-card .rel-copy { align-self: center; }
.catalog-card .rel-arrow { align-self: start; }
.edition-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.edition-options button {
  padding: 2px 6px;
  min-height: 26px;
  border: 1px solid #36496a;
  border-radius: 5px;
  background: #14223a;
  color: var(--text-2);
  font: 500 11px/1.3 var(--sans);
  cursor: pointer;
}
.edition-options button:hover { border-color: #839aca; }
.edition-options button[aria-pressed="true"] { border-color: #ad8e53; background: #362e28; color: #f1dcae; }
.catalog-card > .edition-options { margin: 0 8px 8px; }
.rel-grid.art-grid.list { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.rel-grid.list .catalog-card { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; }
.rel-grid.list .catalog-card.has-editions { grid-template-columns: minmax(0, 1fr) minmax(100px, 145px); }
.rel-grid.list .catalog-card .rel { grid-template-columns: 46px minmax(0, 1fr) 16px; grid-template-rows: auto; align-items: center; }
.rel-grid.list .catalog-card .cover-frame { grid-column: auto; }
.rel-grid.list .catalog-card > .edition-options { margin: 5px 8px 5px 0; }
.rel-grid.show-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 245px), 1fr)); }
.show-grid .catalog-card .rel { grid-template-rows: auto minmax(55px, 1fr); }
.show-grid .catalog-card .show-frame {
  display: grid;
  position: relative;
  aspect-ratio: 16 / 9;
  background: radial-gradient(ellipse at 50% 20%, #243654, #0d1627 80%);
}
.show-grid .show-frame img { position: absolute; inset: 0; object-fit: cover; }
.show-grid .show-frame[data-fit="contain"] img { object-fit: contain; }
.show-grid.list .catalog-card .rel { grid-template-columns: 64px minmax(0, 1fr) 16px; grid-template-rows: auto; }
.show-grid:not(.list):not(:has(.show-frame img)) .catalog-card .rel {
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto;
  align-items: center;
}
.show-grid:not(.list):not(:has(.show-frame img)) .show-frame { grid-column: auto; aspect-ratio: 1; }
.show-grid:not(.list):not(:has(.show-frame img)) .rel-arrow { display: none; }
.work-show-art { margin: 0 0 16px; }
.work-show-art .cover-frame { aspect-ratio: auto; border-radius: 8px; background-image: none; }
.work-show-art img { height: auto; max-height: 380px; }
.work-show-art figcaption { margin-top: 6px; font-size: 11px; color: var(--muted); }
.work-art {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 0 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101b2d;
}
.work-art > .cover-frame { width: clamp(96px, 30%, 180px); flex: none; border-radius: 7px; }
.work-edition { display: grid; justify-items: start; gap: 5px; min-width: 0; }
.work-edition p { margin: 2px 0 0; color: var(--text-2); font-size: 12px; white-space: pre-line; overflow-wrap: anywhere; }
.work-song-art { width: fit-content; }
.work-song-art > .cover-frame { width: 132px; }

.kind-chip {
  flex: none;
  font-family: var(--sans, inherit);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
}
.kind-chip.k-song { color: var(--gold); border-color: rgba(201, 168, 106, 0.4); }
.kind-chip.k-single { color: var(--rose-soft, #f0a6bd); border-color: rgba(232, 82, 125, 0.3); }
.kind-chip.k-album,
.kind-chip.k-mini,
.kind-chip.k-best { color: #e3cd9e; border-color: rgba(201, 168, 106, 0.3); }
/* 新增的三类：映像作品（蓝紫）/ 广播CD（青）/ 合作专辑（灰绿） */
.kind-chip.k-video { color: #b9c6f0; border-color: rgba(150, 165, 235, 0.32); }
.kind-chip.k-radio-cd { color: #8fd6e6; border-color: rgba(120, 200, 220, 0.32); }
.kind-chip.k-collab { color: #a9d3b6; border-color: rgba(150, 200, 160, 0.3); }
/* 数字发行（配信）：青灰，和实体单曲的玫红区分 */
.kind-chip.k-digital { color: #9fc4d9; border-color: rgba(130, 180, 210, 0.3); }
.rel-date { font-size: 10.5px; color: var(--muted); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- 统计 */

.pane[data-pane="stats"] { container-type: inline-size; }

.statgrid, .stats-pair, .stats-overview {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}
.statgrid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.stat {
  position: relative;
  grid-column: span 3;
  min-width: 0;
  padding: 17px 40px 15px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111c2e;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color .15s, background .15s;
}
.stat:nth-child(-n+3) {
  grid-column: span 4;
  background: linear-gradient(125deg, #18263c, #101a2c 75%);
  border-color: rgba(201, 168, 106, .34);
}
.stat:is(:hover, :focus-visible) { border-color: var(--gold); background: #19263b; }
.stat .num {
  display: block;
  font: 600 clamp(23px, 3.4cqi, 39px)/1.12 var(--serif);
  color: #eee4cf;
  font-variant-numeric: tabular-nums;
}
.stat:nth-child(-n+3) .num { color: #f2d89f; }
.stat .lbl { display: block; margin-top: 6px; color: var(--text-2); font-size: 12px; }
.stat-arrow { position: absolute; top: 13px; right: 15px; color: var(--gold); font-size: 14px; }

.stats-pair { grid-template-columns: repeat(auto-fit, minmax(min(100%, 355px), 1fr)); }
.stats-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats-overview > :last-child { grid-column: 1 / -1; }
.panel {
  --stat-bar-start: #94733f;
  --stat-bar-end: #e1bd7e;
  min-width: 0;
  padding: 16px 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101a2b;
}
.panel.stats-quotes { --stat-bar-start: #3b5890; --stat-bar-end: #91b6f1; }
.panel h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  color: #e6cf9f;
  font: 600 15px/1.4 var(--serif);
}
.panel h3 .hint { color: var(--muted); font: 400 11px/1.4 var(--sans); }

.years {
  position: relative;
  display: flex;
  gap: 5px;
  block-size: 177px;
  overflow-x: auto;
}
.years::before {
  position: absolute;
  inset: 18px 0 19px;
  border-block-end: 1px solid var(--line);
  background: linear-gradient(to top, var(--line-soft) 1px, transparent 1px) 0 100% / 100% 25%;
  pointer-events: none;
  content: "";
}
.ybar {
  z-index: 0;
  display: grid;
  grid-template-rows: 18px minmax(0, 1fr) 19px;
  justify-items: center;
  align-items: center;
  flex: 1;
  min-width: 22px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}
.ytrack { align-self: stretch; display: flex; align-items: flex-end; width: 80%; max-width: 35px; }
.yfill { width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(var(--stat-bar-end), var(--stat-bar-start)); }
.ybar:is(:hover, :focus-visible, [aria-pressed="true"]) { color: #f5e1b5; background: rgb(255 255 255 / 5%); }
.ybar:is(:hover, :focus-visible) .yfill { filter: brightness(1.18); }
.ybar[aria-pressed="true"] .yfill { background: linear-gradient(#f1acbb, #943d60); }
.ybar .yn, .ybar .yl { font: 10px/1 var(--mono); font-variant-numeric: tabular-nums; }

.bars { display: grid; gap: 5px; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 4px 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-2);
  font: 12px/1.35 var(--sans);
  text-align: left;
}
button.bar-row { cursor: pointer; }
button.bar-row:is(:hover, :focus-visible, [aria-pressed="true"]) { background: #1b2a41; }
.bar-row .bname { min-width: 0; overflow-wrap: anywhere; }
.btrack { height: 6px; border-radius: 3px; background: rgb(255 255 255 / 7%); overflow: hidden; }
.bfill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--stat-bar-start), var(--stat-bar-end)); }
.bar-row .bn, .donut .n { color: var(--muted); font: 11px/1 var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.bar-row .bn { min-width: 30px; }

.donut { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.donut-figure { display: grid; place-items: center; flex: 0 0 104px; }
.donut-figure > * { grid-area: 1 / 1; }
.donut svg { width: 100%; transform: rotate(-90deg); }
.donut-total { display: grid; gap: 3px; text-align: center; color: var(--muted); font-size: 9px; }
.donut-total strong { color: #eee4cf; font: 600 19px/1 var(--serif); }
.donut .legend { display: grid; flex: 1 1 116px; gap: 7px; color: var(--text-2); font-size: 11.5px; }
.donut .legend .row { display: grid; grid-template-columns: 7px minmax(0, 1fr) auto; align-items: center; gap: 7px; }
.donut .legend .sw { width: 7px; height: 7px; border-radius: 50%; }

.pane:is([data-pane="about"], [data-pane="profile"]) > .section-head, .about-sections, .account-profile-content {
  max-width: 1180px;
  margin-inline: auto;
}
.about-sections {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  grid-template-areas: "intro contributors" "copyright contributors" "support support";
  gap: 16px;
}
.about-sections .panel { padding: clamp(14px, 2.2vw, 26px); }
.about-intro { grid-area: intro; }
.about-copyright { grid-area: copyright; }
.about-support {
  grid-area: support;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 24px;
}
.about-support h3 { grid-column: 1 / -1; }
.about-copy p { max-width: 36em; margin: 0 0 12px; line-height: 1.85; color: var(--text-2); }
.about-copy p:last-child { margin-bottom: 0; }
.about-copy a { color: var(--gold); text-underline-offset: 3px; }
.about-support p { max-width: 52em; margin-bottom: 0; }
.about-support-actions { display: grid; justify-items: center; gap: 8px; }
.about-support-actions > :last-child { font-size: 0.875em; }
.about-support .donation-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 96px;
  min-height: 40px;
  border-color: var(--gold-line);
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}
.about-support .donation-link[aria-disabled="true"] {
  border-color: var(--line);
  color: var(--muted);
  background: transparent;
  cursor: not-allowed;
  transform: none;
}
.about-contributors { grid-area: contributors; display: flex; flex-direction: column; }
.contributors {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.contributor {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 12px 2px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--gold);
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.contributor:is(:hover, :focus-visible) { border-color: var(--line); background: var(--blue-dim); }
.contributor-avatar {
  display: block;
  inline-size: min(100%, 100px);
  aspect-ratio: 1;
  border: 2px solid var(--gold);
  border-radius: 50%;
  overflow: hidden;
  background: #0d1627;
}
.contributor-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.contributor-illustration { background: #fafafa; }
.contributor-illustration img { object-position: center top; transform: translateY(7%) scale(1.95); transform-origin: center top; }
.contributors-actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.join-contributors { padding-inline: 20px; border-color: var(--gold-line); color: var(--gold); text-decoration: none; }

.submission-dialog {
  width: min(480px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: clamp(16px, 4vw, 24px);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
}
.submission-dialog::backdrop { background: rgb(4 6 12 / 72%); }
.submission-dialog h2 { margin: 0 0 16px; color: var(--gold); font: 600 22px/1.3 var(--serif); }
.submission-dialog form, .submission-dialog label:not([hidden]) { display: grid; gap: 8px; }
.submission-dialog form { gap: 13px; }
.submission-dialog input, .submission-dialog textarea, .account-profile-name input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.submission-dialog textarea { resize: vertical; }
.submission-dialog [role="status"] { margin: 0; color: var(--text-2); }
.submission-dialog [role="status"]:empty { display: none; }
.submission-actions { display: flex; justify-content: flex-end; gap: 8px; }
.account-dialog .submission-actions { margin-top: 16px; }
.account-dialog [role="status"] { margin-top: 12px; }
.account-options { display: flex; flex-wrap: wrap; gap: 8px; }
.account-profile-panel { padding: clamp(14px, 2.2vw, 26px); }
.account-profile-panel[hidden] { display: none; }
.account-profile-panel h3 { margin-bottom: 18px; }
.account-profile-panel > p { margin: 0 0 14px; color: var(--text-2); }
.account-profile-panel > p:last-child { margin-bottom: 0; }
.account-profile-form {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: 18px 28px;
}
.account-profile-head { display: flex; align-items: center; gap: 14px; }
.account-profile-head .account-avatar { flex: 0 0 68px; width: 68px; height: 68px; font-size: 27px; }
.account-profile-identity { min-width: 0; }
.account-profile-name { display: grid; gap: 8px; max-width: 30rem; }
.account-profile-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.account-profile-status { margin: 10px 0 0; color: var(--text-2); }
.account-profile-status:empty { display: none; }
#accountEmail { margin: 0 0 8px; overflow-wrap: anywhere; color: var(--text-2); }
#accountPreview { color: var(--text-2); }

@media (max-width: 770px) {
  .account-profile-form { grid-template-columns: minmax(0, 1fr); }
  .about-sections {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "copyright" "support" "contributors";
    gap: 12px;
  }
  .about-support { grid-template-columns: minmax(0, 1fr); }
  .about-support-actions { justify-self: start; margin-top: 12px; }
}

@container (min-width: 820px) {
  .stats-overview { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(230px, .88fr); }
  .stats-overview > :last-child { grid-column: auto; }
}
@container (max-width: 620px) {
  .statgrid, .stats-pair, .stats-overview { gap: 10px; margin-bottom: 10px; }
  .statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat, .stat:nth-child(-n+3) { grid-column: span 1; }
  .stat:first-child { grid-column: 1 / -1; }
  .stat { padding: 13px 32px 12px 13px; }
  .stat-arrow { top: 10px; right: 12px; }
  .panel { padding: 13px 12px 14px; }
  .stats-overview { grid-template-columns: minmax(0, 1fr); }
  .years { gap: 3px; }
}

.detail-error {
  border: 1px solid rgba(232, 82, 125, 0.35);
  background: rgba(232, 82, 125, 0.07);
  color: var(--rose-soft);
  border-radius: 3px;
  padding: 12px 15px;
  font-size: 12.5px;
  font-family: var(--mono);
  white-space: pre-wrap;
}

/* ---------------------------------------------------------------- 抽屉 */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.drawer.open { pointer-events: auto; opacity: 1; }
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 9, 0.7);
  backdrop-filter: blur(3px);
}
.drawer-panel {
  position: absolute;
  isolation: isolate;
  top: 0;
  right: 0;
  height: 100%;
  width: min(900px, 79vw);
  background: linear-gradient(180deg, #080c15, #060910);
  border-left: 1px solid var(--line);
  box-shadow: -40px 0 90px -30px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  transform: translateX(30px);
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.drawer.open .drawer-panel { transform: none; }
.drawer.work-mode { opacity: 1; visibility: hidden; transition: visibility 0s linear .24s; }
.drawer.work-mode.open { visibility: visible; transition-delay: 0s; }
.drawer.work-mode .drawer-backdrop { background: transparent; backdrop-filter: none; }
.drawer.work-mode .drawer-panel { box-shadow: none; }
.drawer.work-mode:not(.open) .drawer-panel { transform: translateX(100%); }
.drawer-rose {
  position: absolute;
  z-index: -1;
  right: -46px;
  top: 4px;
  width: min(410px, 75%);
  aspect-ratio: 1;
  pointer-events: none;
  opacity: .14;
}

.drawer-head {
  position: relative;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.drawer-head::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 106, 0.42), transparent);
}
.drawer-title { min-width: 0; flex: 1; }
.drawer-title h2 {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  margin: 0 0 9px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #f4f7fd;
  overflow-wrap: anywhere;
}
.drawer-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}
.drawer-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: 0 0 auto; }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 26px 34px 100px;
}
.drawer-body .textual {
  max-width: 44em;
  font-family: var(--serif);
  font-size: var(--art-size);
  line-height: 2.05;
  color: #cfd9e6;
  overflow-wrap: anywhere;
}
.drawer-body .textual p { margin: 0 0 1.05em; }
.article-origin { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; }
.article-origin a { color: #b9d8ff; text-decoration: underline; }
.article-origin a:focus-visible { outline: 2px solid #b9d8ff; outline-offset: 3px; }
.drawer-body .textual p:first-child { color: #e8eefa; }
.drawer-body .textual mark.focus {
  background: linear-gradient(180deg, transparent 52%, rgba(201, 168, 106, 0.34) 52%);
  color: #fff7e6;
  box-shadow: none;
}

/* ---------------------------------------------------------------- 滚动条 */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #1d2942;
  border-radius: 6px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #2c3d5e; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- 窄屏 */

@media (max-width: 1250px) {
  .topbar-end .dbmeta { display: none; }
}

@media (max-width: 950px) {
  :root { --pane-gutter: 20px; --pane-top: 18px; }
  .topbar {
    grid-template-areas: "brand end" "tabs tabs";
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0 16px;
  }
  .brand { padding: 9px 0; }
  .ambient::before { top: 112px; }
  .tabs { overflow-x: auto; padding: 3px 2px 8px; }
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .filter-rail {
    max-height: min(42dvh, 325px);
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .filter-heading { min-height: 0; margin: 0; padding: 4px 14px; border-bottom: 0; }
  .filter-heading > span { display: none; }
  .filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 37px;
    border-color: transparent;
    color: #c8d7f0;
  }
  .filter-toggle .filter-chevron { width: 14px; height: 14px; transition: transform .15s; }
  .filter-toggle[aria-expanded="true"] .filter-chevron { transform: rotate(180deg); }
  .filter-rail:has(.filter-toggle[aria-expanded="false"]) .sidebar { display: none; }
  .drawer-panel { width: 100vw; }
  .drawer-body { padding: 22px 20px 80px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* --------------------------------------------------- 作品详情（歌/专辑/演出） */
.work-body { padding: 2px 2px 48px; }
.work-sec { margin: 0 0 24px; }
.work-row.bd-stop .wr-main { padding-inline-start: 2em; }
.work-sec h3 {
  font-family: var(--serif, "Songti SC", serif);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--gold);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 7px;
  margin: 0 0 10px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.work-sec h3 .hint { color: var(--muted); font-size: 11px; letter-spacing: 0.06em; }
.work-radio-intro {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  align-items: start;
  gap: 14px 20px;
}
.work-radio-intro .work-show-art { margin: 0; }
.work-radio-intro p {
  margin: 0;
  color: var(--text-2);
  line-height: 1.75;
}
/* 折叠段的标题沿用详情页小节样式。 */
.work-sec.fold > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.work-sec.fold > summary::-webkit-details-marker { display: none; }
.work-sec.fold > summary .fold-hint {
  margin-left: auto;
  font-size: 11px;
  font-weight: normal;
  letter-spacing: 0.06em;
  color: var(--blue);
  opacity: 0.85;
}
.work-sec.fold:not([open]) > summary .fold-hint::after { content: '展开'; }
.work-sec.fold[open] > summary .fold-hint::after { content: '收起'; }
.work-sec.fold[open] > summary > h3 { margin-bottom: 12px; }
.song-lyrics {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text-2);
  line-height: 1.8;
}
.song-lyrics-source { margin: 8px 0 0; font-size: 11px; color: var(--muted); }
.song-lyrics-source a { color: var(--blue); text-underline-offset: 0.18em; }
.song-lyrics-empty { margin: 0; }
.song-lyrics-empty a { color: var(--blue); text-underline-offset: 0.18em; }
.work-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--text-2); font-size: 13px; }
.work-meta a { color: var(--blue); text-decoration: none; border-bottom: 1px solid rgba(109, 155, 255, 0.35); }
.drawer .event-venue-link {
  color: var(--blue);
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(109, 155, 255, 0.45);
  text-underline-offset: 0.18em;
}
.drawer .event-venue-link:is(:hover, :focus-visible) { text-decoration-color: currentColor; }
.work-row {
  display: flex;
  width: 100%;
  gap: 14px;
  align-items: baseline;
  justify-content: space-between;
  padding: 9px 6px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.work-row:hover { background: var(--blue-dim); }
/* Blu-ray 收录内容：主条目 + 紧凑的城市/场次小标签 */
.work-row.bd-has-subs { border-bottom: 0; padding-bottom: 3px; }
.bd-subs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 6px 9px 2.4em; margin-top: -2px; border-bottom: 1px solid var(--line-soft); }
.bd-sub-chip {
  font: inherit; font-size: 12.5px; line-height: 1.45; padding: 3px 11px; border-radius: 999px;
  color: var(--text-2); background: rgba(109, 155, 255, 0.16); border: 1px solid rgba(109, 155, 255, 0.35);
  cursor: default;
}
button.bd-sub-chip { cursor: pointer; }
button.bd-sub-chip:hover { background: var(--blue-dim); color: var(--text); }
.work-row .wr-main { color: var(--text); font-size: 14px; line-height: 1.5; }
.work-row .wr-sub { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.work-row.work-live {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}
.work-live .wr-main, .work-live .wr-sub { overflow-wrap: anywhere; }
.work-live .wr-sub { white-space: normal; text-align: right; }
.work-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  margin: 0 8px 9px 0;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.work-chip:hover { border-color: rgba(232, 82, 125, 0.5); color: #fff; }
.work-chip .wr-kind { color: var(--muted); font-size: 10.5px; letter-spacing: 0.06em; }

/* 作品详情时不显示正文字号/跳转按钮 */
.drawer.work-mode .art-only { display: none; }

/* 演出歌单：按天分组 + 曲顺 */
.work-day {
  margin: 14px 0 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--gold);
  border-left: 2px solid rgba(201, 168, 106, 0.5);
  padding-left: 8px;
}
.work-day.encore-heading {
  margin: 16px 0 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: #e1ceaa;
}
.work-row .seq {
  display: inline-block;
  min-width: 22px;
  margin-right: 8px;
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.work-row[disabled] { cursor: default; opacity: 0.85; }
.work-row[disabled]:hover { background: transparent; }

/* 收录曲目里的伴奏版稍暗 */
.work-row.inst .wr-main { opacity: 0.55; }

/* 收录曲目：正曲 / 伴奏 / 剧情段 */
.work-row.inst .wr-main,
.work-row.drama .wr-main { opacity: 0.6; }
.work-row.drama .wr-main { font-style: italic; }
.tr-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  vertical-align: middle;
}
/* 版本角标（10th anniv. ver. 之类）：金色，和「伴奏/剧情」的灰色区分 */
.tr-badge.ver {
  color: var(--gold);
  border-color: rgba(201, 168, 106, 0.4);
  background: rgba(201, 168, 106, 0.08);
}
.work-extra { margin-top: 10px; }
.work-extra > summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 2px;
  letter-spacing: 0.06em;
}
.work-extra > summary:hover { color: var(--text-2); }

/* 成员卡片 */
[data-pane="members"] > :is(.member-heading, #memberGroups) { max-width: 1240px; }
.member-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.member-heading h2 { margin: 0; color: #f1eadc; font: 600 clamp(24px, 3vw, 34px)/1.3 var(--serif); letter-spacing: .06em; }
.member-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.mem-section { margin-top: 28px; }
.mem-section > h3 { display: flex; align-items: center; gap: 13px; margin: 0 0 13px; color: #e1ceaa; font: 600 17px/1.4 var(--serif); }
.mem-section > h3::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, var(--line), transparent); }
.mem-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; }
/* Roselia「Rosenchor」官方应援棒色系 */
.mem-tone-vocal { --member-tone: #c9a8ff; --member-accent: #9f5df4; --member-glow: #443268; }
.mem-tone-guitar { --member-tone: #a0ebec; --member-accent: #24c6cc; --member-glow: #254d59; }
.mem-tone-bass { --member-tone: #ffadb0; --member-accent: #e73448; --member-glow: #5b2c3c; }
.mem-tone-drums { --member-tone: #ffa8e6; --member-accent: #ec43ba; --member-glow: #602d59; }
.mem-tone-keys { --member-tone: #dce0e8; --member-accent: #bfc5cd; --member-glow: #404957; }
.member {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color .16s, background .16s, box-shadow .16s, transform .16s;
}
.member:is(:hover, :focus-visible) {
  border-color: var(--member-accent);
  background: var(--panel-2);
  box-shadow: 0 0 15px color-mix(in srgb, var(--member-accent) 60%, transparent);
}

.member:focus-visible { outline: 2px solid var(--member-tone); outline-offset: 3px; }
.mem-portrait {
  display: grid;
  position: relative;
  isolation: isolate;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 4.3;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 34%, var(--member-glow) 0%, #172239 70%);
}
.mem-portrait::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 9% 16% -17%;
  border: 1px solid rgb(195 209 240 / 16%);
  border-radius: 50% 50% 0 0 / 32% 32% 0 0;
  box-shadow: 0 0 0 9px rgb(195 209 240 / 4%);
}
.mem-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--portrait-position, center top);
  scale: var(--portrait-scale, none);
  transform-origin: 50% 55%;
  opacity: 0;
}
.mem-portrait img.is-loaded { opacity: 1; }
.mem-portrait img[hidden] { display: none; }
.mem-placeholder { width: 33%; aspect-ratio: 1; background: url('/sanctuary-mark.png') center / contain no-repeat; opacity: .47; }
.mem-portrait:has(img.is-loaded) .mem-placeholder { visibility: hidden; }
.mem-card-content { width: 100%; flex: 1; display: flex; flex-direction: column; padding: 11px 13px 10px; border-top: 1px solid var(--line); }
.mem-part { color: var(--member-tone); font-size: 11px; letter-spacing: .08em; }
.mem-name { margin-top: 2px; color: var(--text); font: 600 clamp(16px, 1.7vw, 22px)/1.36 var(--serif); overflow-wrap: anywhere; }
.mem-role { color: var(--muted); margin-top: 3px; font-size: 12px; }
.mem-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 9px; font-size: 11px; color: #bdcae1; }
.mem-arrow { margin-left: auto; color: var(--member-tone); font-size: 16px; }
.mem-profile { display: grid; grid-template-columns: minmax(130px, 205px) minmax(0, 1fr); gap: 20px; }
.mem-profile-photo { margin: 0; }
.mem-profile-photo .mem-portrait { border: 1px solid var(--line); border-radius: var(--radius); }
.mem-profile-photo figcaption { margin-top: 5px; font-size: 11px; text-align: center; }
.mem-profile .work-sec { margin-top: 0; }
.mem-summary { margin: 0 0 16px; color: var(--text-2); line-height: 1.75; }
.mem-source { margin-top: 14px; }
.mem-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.mem-facts dt { color: var(--muted); font-size: 11px; }
.mem-facts dd { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }

@media (min-width: 951px) and (max-width: 1140px) {
  .mem-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .mem-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 时间线：专场高亮、发行里程碑、成员更迭 */
.tl-item.tl-own, .tl-item.tl-radio { --tl-accent: #d2ad6d; }
.tl-item.tl-own { border-color: #4a4033; background: linear-gradient(100deg, #252531, #141f33 70%); }
/* 专场演唱会的类型标签用金色，和左边线同一个语义（作品页也复用这个类） */
.badge.tl-cat-own {
  color: var(--gold);
  border-color: rgba(201, 168, 106, 0.45);
  background: rgba(201, 168, 106, 0.10);
}
/* 企划外出演（含电视/地上波）：青色 */
.tl-item.tl-guest { --tl-accent: #7fd3e6; }
.badge.tl-cat-guest {
  color: #7fd3e6;
  border-color: rgba(120, 200, 220, 0.45);
  background: rgba(120, 200, 220, 0.08);
}
/* 企划内客串/拼盘 + 联合演唱会：共用一种淡绿 */
.tl-item.tl-pair { --tl-accent: #93d6ae; }
.badge.tl-cat-pair {
  color: #93d6ae;
  border-color: rgba(139, 205, 160, 0.45);
  background: rgba(139, 205, 160, 0.08);
}
/* RADIO SHOUT 线下活动：配色和专场一致（金），但类型标签写成 RADIO SHOUT，筛选里也单列 */
.badge.tl-cat-radio {
  color: var(--gold);
  border-color: rgba(201, 168, 106, 0.45);
  background: rgba(201, 168, 106, 0.10);
  letter-spacing: 0.04em;
}
/* 其他活动：暗灰，别跟专场金撞色 */
.badge.tl-cat-other { color: var(--muted); border-color: rgba(255, 255, 255, 0.09); }
/* 多日活动里 Roselia 实际出场的 DAY */
.badge.tl-day {
  color: var(--gold);
  border-color: rgba(201, 168, 106, 0.4);
  background: rgba(201, 168, 106, 0.08);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}
.tl-item.tl-release { --tl-accent: #e6a1b7; }
.tl-item.tl-release .badge.tl-rel { color: #efb1c4; border-color: rgba(232, 82, 125, 0.35); }
.tl-item.tl-release .tl-main b {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}
.tl-item.tl-member { --tl-accent: #c0a5e4; }
/* 成员更迭里的事件可以借专场演唱会的金色（tone=own），例如 2016-09-17 首次登台 */
.tl-item.tl-member.tl-own { --tl-accent: #d2ad6d; }
.tl-item.tl-member.tl-own .tl-main b { color: #ece0c8; }
.tl-item.tl-member .badge.mem {
  color: #cdbcf0;
  border-color: rgba(170, 145, 220, 0.42);
  background: rgba(170, 145, 220, 0.10);
}
.tl-item.tl-member .tl-main b { color: #e2d6f7; font-size: 13.5px; }
/* 歌曲页「演出场次」里的电视出演行 */
.work-row.is-tv .wr-sub { color: #7fd3e6; }
/* 多碟装：DISC 1 / DISC 2 小标题 */
.work-disc {
  margin: 14px 0 6px;
  font: 11px var(--mono);
  letter-spacing: 0.1em;
  color: var(--gold);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
}
.work-disc .hint { margin-left: 8px; color: var(--muted); letter-spacing: 0.04em; }
.work-sec h3:first-child + .work-disc { margin-top: 0; }
/* 段标题里的小开关（只显示专场演唱会） */
.work-sec h3 .ghost.tiny { margin-left: 8px; vertical-align: 1px; }
.work-sec h3 .ghost.tiny.on { color: var(--gold); border-color: rgba(201, 168, 106, 0.45); }

/* ---------------------------------------------------- 手机（≤640px） */
@media (max-width: 640px) {
  :root { --pane-gutter: 13px; --pane-top: 14px; }
  .topbar { padding: 0 12px; }
  .brand { gap: 9px; }
  .brand h1 { width: 124px; }
  .brand-emblem { flex-basis: 39px; height: 39px; border-radius: 9px; }
  .brand-emblem img { width: 28px; height: 28px; }
  .tabs { display: grid; grid-template-columns: repeat(8, minmax(31px, 1fr)) minmax(47px, 1.3fr); gap: 1px; overflow-x: auto; }
  .tab { flex-direction: column; justify-content: center; gap: 3px; padding: 5px 2px; min-height: 44px; font-size: 12px; }
  .tab svg { width: 15px; height: 15px; }
  .tab[data-tab="releases"] { font-size: 11px; }
  .tab[data-tab="about"] { font-size: 10px; }
  .contributor { font-size: 12px; }
  .topbar-end { gap: 5px; }
  .topbar-end .schema-badge { display: none; }
  .topbar-end .account-link { padding-inline: 6px; }
  .filter-heading { padding-inline: 9px; }
  .search-hero { margin-bottom: 12px; }
  .search-hero::before { right: -34px; opacity: .09; }
  .search-hero h2 { margin-bottom: 10px; }
  .searchbox kbd { display: none; }
  .search-help { font-size: 11px; }
  .toolbar { flex-wrap: wrap; gap: 8px; }
  .results { grid-template-columns: 1fr !important; }
  .ambient::before { top: 128px; right: -52px; opacity: .14; }
  .section-head { margin-bottom: 12px; padding-bottom: 11px; }
  .section-nav { padding: 5px 6px; margin-bottom: 14px; }
  .section-link { padding: 4px 8px; }
  .date-toolbar { padding: 7px 8px; }
  .date-toolbar .field { flex: 1 1 124px; }
  .date-toolbar input { width: 100%; }
  .rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .rel { grid-template-columns: 30px minmax(0, 1fr); gap: 6px; padding: 8px; }
  .rel-art svg { width: 18px; height: 18px; }
  .rel-name { font-size: 12.5px; }
  .rel-arrow { display: none; }
  .rel-grid.list .rel { grid-template-columns: 28px minmax(0, 1fr); }
  .rel-grid.list .rel-copy { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .rel-grid.list .rel-name { -webkit-line-clamp: 2; }
  .rel-grid.art-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .catalog-card .rel { grid-template-columns: minmax(0, 1fr); }
  .rel-grid.show-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 152px), 1fr)); }
  .edition-options button { min-height: 30px; }
  .rel-grid.list .catalog-card .rel { grid-template-columns: 39px minmax(0, 1fr); }
  .show-grid.list .catalog-card .rel { grid-template-columns: 52px minmax(0, 1fr); }
  .rel-grid.list .catalog-card.has-editions { grid-template-columns: minmax(0, 1fr) minmax(76px, 34%); }
  .mem-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .member-heading { padding-bottom: 12px; }
  .mem-section { margin-top: 21px; }
  .mem-card-content { padding: 8px 9px; }
  .mem-profile { grid-template-columns: minmax(96px, 115px) minmax(0, 1fr); gap: 12px; }
  .mem-facts { grid-template-columns: 1fr; }
  .card { padding: 14px 14px; }
  .card h3 { font-size: 15px; line-height: 1.45; }
  .card .snip { -webkit-line-clamp: 2; }
  .timeline { gap: 25px; }
  .tl-item { grid-template-columns: max-content minmax(0, 1fr); padding: 8px; }
  .tl-date { font-size: 10px; }
  .tl-main { grid-column: 1 / -1; }
  .tl-main b { font-size: 14px; }
  .tl-arrow { display: none; }
  .drawer-panel { width: 100vw; border-radius: 0; }
  .drawer-head { padding: 14px 14px 10px; }
  .drawer-body { padding: 16px 14px 90px; }
  .textual { font-size: 15px; }
  .work-row { padding: 10px 4px; }
  .work-row .wr-main { font-size: 14.5px; }
  .work-row.work-live { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .work-live .wr-sub { text-align: left; }
}

/* Blu-ray 收录内容里的小标题（如「Roselia部分」），不占编号 */
.bd-section .wr-main {
  color: var(--muted, #9aa0b5);
  letter-spacing: 0.04em;
}
/* 顶部「翻译中」提示 */
.tr-status {
  color: var(--muted, #9aa0b5);
  font-size: 12px;
  margin-right: 10px;
  white-space: nowrap;
}
.work-live-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  block-size: 1lh;
  margin-inline-start: 8px;
  vertical-align: top;
}
.work-live-tags > span {
  padding: 2px 7px;
  font-size: 10.5px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  color: #1a1206;
  background: var(--gold);
  border-radius: 4px;
  white-space: nowrap;
}
.qgroup { margin-bottom: 10px; }
.qgroup > summary { list-style: none; }
.qgroup > summary::-webkit-details-marker { display: none; }
.qgroup-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel-2, rgba(255, 255, 255, 0.02));
  color: var(--gold);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.qgroup-head:hover { border-color: var(--gold-dim, #7a6a3e); }
.qgroup-head .hint { color: var(--muted); font-size: 11px; }
.qgroup-head .fold-hint { margin-left: auto; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; }
.qgroup:not([open]) > summary .fold-hint::after { content: '展开'; }
.qgroup[open] > summary .fold-hint::after { content: '收起'; }
.qgroup[open] > summary { margin-bottom: 8px; }
.qgroup-body { padding-left: 4px; }
.qitem-more[hidden] { display: none; }
.qmore {
  margin: 2px 0 6px 2px;
  color: var(--gold);
  border-color: var(--gold-dim, #7a6a3e);
}
.qitem {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-left: 2px solid var(--line);
  padding: 6px 0 6px 12px;
  margin-bottom: 6px;
  color: var(--text-2);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.65;
}
.qitem[data-article] { cursor: pointer; }
.qitem[data-article]:hover { border-left-color: var(--rose, #e8527d); background: var(--blue-dim); }
.qitem .qtext { display: block; }
.qitem .qmeta { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.badge.zh-hit { color: #a8e6d8; border-color: rgba(95, 214, 192, 0.32); background: rgba(95, 214, 192, 0.08); }
/* 角色台词（现场 MC 里由角色说出的台词，报道转述）：与本人发言区分的中性标记 */
.badge.mc { color: #c9b6e4; border-color: rgba(180, 150, 220, 0.32); background: rgba(150, 120, 200, 0.08); }

/* 引语定位沿用详情页的金色标记。 */
.textual p.hl {
  position: relative;
  padding-inline-start: 14px;
  margin-inline-start: -14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #c9a86a15, #c9a86a06 65%, transparent);
}
.textual p.hl::before {
  content: '';
  position: absolute;
  inset-block: 0.35em;
  inset-inline-start: 0;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(#f3d69e, var(--gold) 55%, #c9a86a40);
  pointer-events: none;
}
.drawer-body .textual p.hl mark.focus {
  color: #fff1cf;
  background: #c9a86a24;
  border-radius: 3px;
  box-shadow: inset 0 -1px #e1bb7280;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
@media (prefers-reduced-motion: no-preference) {
  .textual p.hl.flash { animation: quote-arrival 900ms ease-out; }
}
@keyframes quote-arrival {
  from { box-shadow: inset 32px 0 42px -32px #dfb66b66; }
  to { box-shadow: inset 32px 0 42px -32px #dfb66b00; }
}

/* AI 复原稿：徽标 + 原始字幕折叠 */
.badge.ai-restore{background:#7a3b12;color:#ffd9b8;border:1px solid #a35a24;cursor:help}
details.asr-raw{margin:22px 0 8px;border-top:1px dashed var(--line,#333);padding-top:10px}
details.asr-raw>summary{cursor:pointer;font-size:12.5px;opacity:.7;list-style:none}
details.asr-raw>summary::-webkit-details-marker{display:none}
details.asr-raw>summary::before{content:"▸ "}
details.asr-raw[open]>summary::before{content:"▾ "}
details.asr-raw .asr-raw-body{opacity:.75;font-size:.92em;margin-top:8px}

/* 详情与目录各占一个可滚动的区域。 */
body {
  display: grid;
  grid-template: auto minmax(0, 1fr) / minmax(0, 1fr) min(51%, 860px);
}
body > .topbar { grid-column: 1 / -1; }
body > .layout { grid-area: 2 / 1 / 3 / -1; min-width: 0; }
body:has(> .drawer.open) > .layout { grid-column-end: 2; }
body > .drawer {
  position: relative;
  inset: auto;
  grid-area: 2 / 2;
  min-width: 0;
  min-height: 0;
  overflow: clip;
}
body > .drawer, body > .drawer.work-mode {
  opacity: 0;
  visibility: hidden;
  transform: translateX(14px);
  transition: opacity 150ms ease-out, transform 180ms ease-out, visibility 0s linear 180ms;
}
body > .drawer.open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.drawer .drawer-backdrop { display: none; }
body > .drawer .drawer-panel { left: 0; right: auto; width: 100%; box-shadow: none; transform: none; }
@media (min-width:761px) {
  .mem-grid {
    grid-template-columns:repeat(5,minmax(0,1fr));
    align-items:start;
  }
}
@media (max-width: 760px) {
  body {
    grid-template: auto minmax(0, 2fr) minmax(0, 3fr) / minmax(0, 1fr);
  }
  body > .layout { grid-row: 2 / 4; }

  body > .drawer:not(.open) { transform: translateY(12px); }
  body > .drawer { grid-area: 3 / 1; }
  .drawer.open .drawer-panel { border-top: 1px solid var(--line); }
  body:has(> .drawer.open) .filter-rail { max-height: 12dvh; overflow: auto; }
}
@media (prefers-reduced-motion: reduce) {
  body > .drawer, body > .drawer.work-mode, body > .drawer .drawer-panel { transition: none; }
}

.detail-skeleton { display: grid; gap: 14px; padding: 12px 0; }
.detail-skeleton i { height: 12px; width: 88%; border-radius: 4px; background: var(--line-soft); }
.detail-skeleton i:first-child { width: 43%; }
.detail-skeleton i:last-child { width: 66%; }
.drawer[aria-busy="true"] .drawer-panel::after {
  content: ""; position: absolute; inset: 0 auto auto 0; width: 35%; height: 2px;
  background: var(--gold); opacity: 0; pointer-events: none;
  animation: detail-progress 1.1s ease-in-out 180ms infinite;
}
@keyframes detail-progress {
  0% { transform: translateX(-100%); opacity: 0; }
  25%, 75% { opacity: .8; }
  100% { transform: translateX(290%); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer[aria-busy="true"] .drawer-panel::after { animation: none; opacity: .7; }
}

/* 目录工具栏保持原位，只有条目列表参与滚动和分栏。 */
.pane.is-active[data-pane="releases"] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
  scrollbar-gutter: auto;
}
.pane[data-pane="releases"] > :not(#releaseGroups) { flex: none; }
#releaseGroups {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
  padding-bottom: 72px;
}

.scroll-controls, .scroll-controls-body, .pane-scroll-list { display: contents; }
@media (max-width: 760px) {
  .pane.is-active:has(.pane-scroll-list) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 0;
    scrollbar-gutter: auto;
  }
  .pane.is-active:has(.pane-scroll-list) > :not(.pane-scroll-list) { flex: none; }
  .pane-scroll-list {
    display: block;
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-bottom: 72px;
  }
  .scroll-controls { display: block; block-size: var(--controls-visible, auto); overflow: clip; }
  .scroll-controls-body { display: flow-root; }
  .scroll-controls-body .searchbox { position: relative; top: auto; }
}
@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  .scroll-controls-body {
    opacity: calc(1 - var(--controls-progress, 0) * .8);
    transform: translateY(calc(var(--controls-progress, 0) * -12px));
  }
}

/* 桌面目录的卡片视图根据视口调整列数。 */
@media (min-width: 761px) {
  .rel-grid.art-grid:not(.list) {
    --card-width: var(--work-card-width);
    column-gap: 12px;
    justify-content: start;
    grid-template-columns: repeat(auto-fill, minmax(0, var(--card-width)));
    align-items: start;
  }
  .rel-grid.show-grid:not(.list) { --card-width: clamp(245px, 19vw, 285px); }
}

/* 作品详情：简介 / 获奖列表 */
.note-list { margin: 6px 0 0; padding-left: 20px; color: var(--muted, #9aa0b5); line-height: 1.75; }
.note-list li { margin: 2px 0; }

.venue-atlas { position:relative; overflow:hidden; border:1px solid #355266; border-radius:14px; background-color:#091321; background-image:linear-gradient(#27445855 1px,transparent 1px),linear-gradient(90deg,#27445855 1px,transparent 1px);background-size:28px 28px; }
.venue-atlas header {display:flex;align-items:center;gap:1em;padding:12px 18px;color:#abdce0}
.venue-atlas h3 {margin:0}
.venue-atlas svg {display:block;width:100%;height:auto;aspect-ratio:685 / 700;max-height:min(64vh,740px)}
.map-land {fill:#183a48;stroke:#5c9eaa;stroke-width:1;vector-effect:non-scaling-stroke}
.venue-atlas small {display:block;padding:6px 12px;color:#94b4c1;text-align:right}
.venue-index {display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
.venue-index span,.venue-detail small {color:var(--muted);font-size:.8em}
.venue-detail small {display:block}
.venue-detail figure {margin:0 0 22px}
.venue-detail img {display:block;max-width:100%;max-height:38vh;border-radius:10px}
.venue-detail figcaption {font-size:.8em;margin-top:6px}

.venue-atlas .map-land {stroke:#78a6ac;stroke-width:.65}
.pin-guide {
  position:absolute; left:50%; top:50%; pointer-events:none; visibility:hidden;
  width:calc(var(--distance) * var(--map-unit)); height:1px;
  transform-origin:0 50%; transform:translateY(-50%) rotate(var(--bearing));
  color:#a5dedf; background:linear-gradient(to right, transparent 10px, currentColor 10px);
}
.pin-guide::after {
  content:""; position:absolute; left:100%; top:50%; width:5px; height:5px;
  border-radius:50%; background:currentColor; transform:translate(-50%,-50%);
}
.map-pin:is(:hover,:focus-visible,.map-selected) .pin-guide {visibility:visible}
.map-pin.map-selected .pin-guide {color:#ffda85}
.map-pins:has(.map-pin:is(:hover,:focus-visible)) .map-pin:not(:hover,:focus-visible) .pin-guide {visibility:hidden}
.venue-index .map-selected {border-color:#d8af5c;color:#ffe19b}
.map-legend {display:flex;flex-wrap:wrap;gap:.35em .9em;padding:0 14px;color:#c2d0db;font-size:.78rem}
.map-legend span::before {content:"";display:inline-block;width:.95em;height:.95em;vertical-align:-.08em;margin-right:.4em;background:var(--region);border:1px solid #a4b5c2;border-radius:2px}

.map-stage {position:relative}
.map-pins {position:absolute;inset:0;overflow:hidden;pointer-events:none}
.map-pin {position:absolute;transform:translate(-50%,-50%);box-sizing:border-box;width:20px;height:20px;padding:0;border:1.5px solid #86efed;border-radius:50%;background:#103545;color:#ecffff;font:600 12px/1 monospace;cursor:pointer;pointer-events:auto}
.map-pin[data-venue]::before {content:"";position:absolute;inset:5px;border-radius:50%;background:#adffff}
.map-pin.map-selected {background:#60491e;border-color:#ffd271}
.map-pin.map-selected::before {background:#ffe19b}
.map-name {position:absolute;visibility:hidden;width:max-content;max-width:min(220px,56vw);white-space:normal;padding:2px 5px;border-radius:4px;background:#0b1925ed;color:#d6f2f4;font:500 11px/1.25 system-ui,sans-serif;text-align:left;pointer-events:none}
.map-labelled .map-name,.map-pin:is(:hover,:focus-visible,.map-selected) .map-name {visibility:visible}
.map-pin:is(:hover,:focus-visible,.map-selected) {z-index:2}
.map-pin.map-selected .map-name {color:#ffe19b}

.venue-detail { container-type: inline-size; }
.venue-detail .work-row {
  display: grid;
  grid-template-columns: 10ch minmax(0, 1fr);
  gap: 3px 1rem;
  align-items: baseline;
  padding-block: .75em;
  line-height: 1.45;
}
.venue-detail .work-row > :first-child {
  color: var(--muted);
  font-size: .9em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.venue-detail .work-row > :last-child { overflow-wrap: anywhere; }
.venue-detail .work-row small { margin-top: .2em; }
@container (max-width: 25rem) {
  .venue-detail .work-row { grid-template-columns: minmax(0, 1fr); }
}

.catalog-heading {display:flex;align-items:center;flex-wrap:wrap;gap:.5rem .9rem}
:is(#venueView,#lyricView) {color:#ffdf9c;border-color:#987443;background:#33291c;white-space:nowrap}
:is(#venueView,#lyricView):is(:hover,:focus-visible),:is(#venueView,#lyricView)[aria-pressed="true"] {color:#fff0cc;border-color:#e5bd70;background:#514027}
:is(#venueView,#lyricView)[hidden] {display:none}
.map-scope-note {flex:0 0 100%;margin:0;text-align:left;max-width:100%;color:#a1b3c1;line-height:1.5}

/* Keep the active page in one track as the detail track opens and closes. */
@media (min-width: 761px) {
  body {
    --work-card-width: clamp(164px, calc((100vw - 320px - 2 * var(--pane-gutter) - 76px) / 6), 196px);
    --six-card-pane: calc(6 * var(--work-card-width) + 60px + 2 * var(--pane-gutter) + 16px);
    grid-template-columns: minmax(0, 1fr) min(0%, 0px);
    transition: grid-template-columns 260ms cubic-bezier(.22,.7,.25,1);
  }
  body:has(> .drawer.open) {
    grid-template-columns: minmax(0, 1fr) max(min(38%, 320px), calc(100% - var(--six-card-pane)));
  }
  body > .layout { grid-column-end: 2; }
}
@media (max-width: 760px) {
  body {
    grid-template-rows: auto minmax(0, 5fr) minmax(0, 0fr);
    transition: grid-template-rows 260ms cubic-bezier(.22,.7,.25,1);
  }
  body:has(> .drawer.open) {
    grid-template-rows: auto minmax(0, 2fr) minmax(0, 3fr);
  }
  body > .layout { grid-row-end: 3; }
}
@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
}
.map-pin .map-name {max-width:min(12em,48vw);text-wrap:balance}
.map-pin[data-venue="36"] .map-name {max-width:8em}
.map-label-line {display:none;position:absolute;left:50%;top:50%;height:1px;transform-origin:left center;background:linear-gradient(to right,transparent 10px,#99b8ba 10px);pointer-events:none}
.map-labelled .map-label-line {display:block}
.venue-detail {position:relative}
.drawer-body.detail-outgoing {position:absolute;inset-inline:0;box-sizing:border-box;overflow:hidden;pointer-events:none}
@media (max-width:760px) {
  .venue-atlas svg {height:clamp(390px,60svh,540px);max-height:none}
}
.drawer-title {position:relative}
.drawer-title .detail-heading-outgoing {position:absolute;inset:0 0 auto;pointer-events:none}
.map-dense .map-name {background:#10202bd9}

.map-labelled .map-name {pointer-events:auto;cursor:pointer}

/* Let auto-fill card grids wrap once, without visiting intermediate column counts. */
@media (min-width:761px) {
  body:has(.pane.is-active :is(.rel-grid:not(.list), .mem-grid)) {transition-property:none}
}
@media (max-width:760px) {
  .mem-grid {grid-template-columns:repeat(5,minmax(0,1fr));gap:clamp(4px,1vw,9px)}
  .member {overflow-wrap:anywhere}
}

@media (prefers-reduced-motion:no-preference) {
  .mem-profile-photo .mem-portrait img {transition:opacity 240ms ease-out}
}

@media (min-width:761px) {
  .pane[data-pane="members"] {overflow-anchor:none}
  .mem-grid {container-type:inline-size;align-items:stretch}
  .mem-card-content {padding-inline:clamp(6px,1cqw,13px)}
  .mem-name {font-size:clamp(13px,1.8cqw,22px);min-block-size:2lh}
  .mem-role {min-block-size:2lh}
}



@media (max-width:760px) {
  .map-pin {width:20px;height:20px;font-size:11px}
  .map-pin[data-venue]::before {inset:5px}
  .map-pin:not(.map-selected, :focus-visible) .map-name {visibility:hidden}
  .map-pins:has(.map-pin:focus-visible) .map-pin:not(:focus-visible) .map-name {visibility:hidden}
  .map-labelled .map-label-line {display:none}
}

.member {transform-origin:top left}
@media (max-width:760px) { .map-pin[data-venue="38"] .map-name {max-width:6em;text-wrap:balance} }

.search-mode-heading { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.search-mode-heading [role="group"] { display:inline-flex; gap:4px; }
.search-mode-heading [aria-pressed="true"] { color:var(--gold); border-color:var(--gold-line); }

.lyric-star-mode > .scroll-controls {display:none}
.lyric-star-mode #releaseGroups {padding-bottom:8px;scrollbar-gutter:auto}
.lyric-sky {display:grid;grid-template-rows:minmax(0,1fr) auto;min-height:200px;height:100%;box-sizing:border-box;position:relative;isolation:isolate;overflow:hidden;border:1px solid #364366;border-radius:16px;background:radial-gradient(ellipse at 27% 65%,#222744 0%,transparent 55%),radial-gradient(ellipse at 73% 24%,#182d40 0%,transparent 50%),#080c19}
.lyric-sky canvas {display:block;width:100%;height:100%;min-height:0;touch-action:none;cursor:grab}
.lyric-sky::before {content:"";grid-area:1/1;pointer-events:none;background:
  radial-gradient(ellipse 29% 18% at 27% 70%,#70548d38,transparent),
  radial-gradient(ellipse 22% 15% at 42% 59%,#9781b01c,transparent),
  radial-gradient(ellipse 42% 26% at 70% 36%,#455e8b40,transparent),
  linear-gradient(151deg,transparent 25%,#41335438 42%,#51517530 48%,#2638562b 55%,transparent 68%),
  radial-gradient(ellipse at 12% 90%,#261d3c,#0c1125 59%,#070c1a)}
.lyric-sky canvas {grid-area:1/1;position:relative}
.lyric-sky canvas:not(.lyric-constellation) { z-index: 1; }
.lyric-sky .lyric-constellation { pointer-events: none; }
.lyric-sky canvas:active {cursor:grabbing}
.lyric-sky-tools {display:flex;align-items:center;flex-wrap:wrap;gap:.75rem;padding:.75rem 1rem;color:#b5c4d5}
.lyric-sky-tools select {max-width:100%}
.lyric-verses {padding-inline-start:1.7rem;line-height:1.8}
.lyric-verses li::marker {color:var(--muted)}

.lyric-sky-tools input {min-width:0;max-width:100%;padding:.5rem .75rem;border:1px solid #415070;border-radius:.5rem;background:#10192a;color:#e2e8f4;font:inherit}
.lyric-song-link {color:var(--gold);font:inherit;text-align:start}
.lyric-verses li {padding:.35rem .65rem;border-bottom:1px solid #273247}

.lyric-word-gloss {margin-inline-start:.4em;color:var(--muted,#a4b1c7);font:400 clamp(.82rem, .55em, 1rem)/1.5 system-ui,sans-serif;letter-spacing:normal}

.work-body .lyric-song-section {margin:0;padding:14px 0;border-bottom:1px solid #273247}
.work-body .lyric-song-section h3 {margin:0 0 5px;padding:0;border:0}
.lyric-song-section .lyric-verses {list-style:none;margin:0;padding:0}
.lyric-song-section .lyric-verses li {padding:2px 0;border:0;line-height:1.65}

@media (prefers-reduced-motion: no-preference) {
  .atlas-enter, .sky-enter {animation:atlas-surface-in .48s ease-out}
  .atlas-enter .map-region {transform-box:fill-box;transform-origin:center;animation:region-rise .8s cubic-bezier(.2,.72,.26,1) var(--arrival) backwards}
  .atlas-enter .map-stage {overflow:clip}
  .atlas-enter header, .atlas-enter .map-legend, .atlas-enter + .venue-index, .sky-enter .lyric-sky-tools {animation:atlas-controls-in .48s ease-out .24s backwards}
  .atlas-enter .map-pin {animation:atlas-surface-in .46s ease-out .38s backwards}
  @keyframes atlas-surface-in {from {opacity:0} to {opacity:1}}
  @keyframes region-rise {
    from {opacity:0;transform:translate(var(--lift-x),38px) rotate(-4deg) scale(.78)}
    58% {opacity:1;transform:translateY(-4px) rotate(.6deg) scale(1.035)}
    to {opacity:1;transform:none}
  }
  @keyframes atlas-controls-in {from {opacity:0;transform:translateY(5px)} to {opacity:1;transform:none}}
}

@media (prefers-reduced-motion: no-preference) {
  :root.atlas-transition {view-transition-name:none}
  .atlas-transition::view-transition {pointer-events:none}
  .atlas-transition::view-transition-group(catalog-departing) {z-index:1;animation:none;pointer-events:none}
  .atlas-transition::view-transition-old(catalog-departing) {animation:catalog-dissolve .85s linear both;pointer-events:none}
  /* Only the transparent artwork floats above the captured cards.
     The incoming night sky and atlas grid stay behind the outgoing snapshot. */
  .atlas-transition .atlas-enter .map-stage,
  .atlas-transition .sky-enter canvas:not(.lyric-constellation) {view-transition-name:atlas-artwork}
  .atlas-transition::view-transition-group(atlas-artwork) {z-index:2;animation:none;pointer-events:none}
  .atlas-transition::view-transition-new(atlas-artwork) {animation:none;mix-blend-mode:normal}
  @keyframes catalog-dissolve {from {opacity:1} to {opacity:0}}
}
