/* OPSIS · HERO EDITORIAL & SCORES DRAWER */
:root {
  --bg: #000000;
  --fg: #ffffff;
  --fg-dim: rgba(255, 255, 255, 0.45);
  --fg-muted: rgba(255, 255, 255, 0.25);
  --line: rgba(255, 255, 255, 0.12);
  --accent: #e2ba73;
  --font-serif: 'Cinzel', serif;
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* 顶部栏 */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 4vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
}

.topbar-mark {
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--fg-dim);
}

.topbar-nav {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.portal-btn {
  text-decoration: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  padding: 6px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.25s ease;
}

.portal-btn:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.portal-btn.outline {
  border-color: rgba(255, 255, 255, 0.4);
}

/* 巨幅画布 */
.hero-canvas {
  width: 100vw;
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(65vw, 520px);
  height: min(65vw, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.hero-visual a {
  display: block;
  width: 100%;
  height: 100%;
}

.sigil-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  filter: contrast(115%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

.sigil-img:hover {
  transform: scale(1.03);
  filter: contrast(125%) brightness(1.1);
}

/* 左下角品牌锚定 */
.hero-identity {
  position: absolute;
  bottom: 4vh;
  left: 4vw;
  z-index: 20;
}

.brand-wordmark {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 700;
  letter-spacing: 0.35em;
  line-height: 1;
  color: #fff;
  text-indent: 0.35em;
}

.brand-sub {
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  color: var(--fg-dim);
  margin-top: 0.8rem;
  text-indent: 0.4em;
}

/* 选谱抽屉 */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.scores-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(460px, 100vw);
  height: 100%;
  background: #090a0d;
  border-left: 1px solid var(--line);
  padding: 3rem 2.5rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.drawer-backdrop.is-open .scores-drawer {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.5rem;
}

.drawer-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.4rem;
}

.drawer-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.drawer-close {
  background: transparent;
  border: 1px solid var(--line);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  transition: background 0.2s;
}

.drawer-close:hover {
  background: #fff;
  color: #000;
}

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--fg-dim);
  display: block;
  margin-bottom: 0.8rem;
}

.section-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.8rem;
}

.song-meta {
  font-size: 0.75rem;
  color: var(--accent);
}

.song-tab {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.parts-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.part-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
}

.part-card.active {
  border-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.part-card.active:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #fff;
  transform: translateX(4px);
}

.part-card.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.part-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.part-role {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.part-name {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
}

.part-badge {
  font-size: 0.75rem;
  color: var(--accent);
}

.part-badge.pending {
  color: var(--fg-muted);
}
