:root {
  --bg: #000000;
  --panel: #050505;
  --text: #f4f4f1;
  --text-soft: rgba(244, 244, 241, 0.72);
  --line: rgba(244, 244, 241, 0.2);
  --line-strong: rgba(244, 244, 241, 0.84);
  --button-black: #050505;
  --button-white: #f4f4f1;
  --red: #bf1e2d;
  --font-serif: "Noto Serif TC", "Noto Serif CJK TC", "Songti TC", "Songti SC", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  --font-sans: "Helvetica Neue", "Noto Sans TC", "Noto Sans CJK TC", "PingFang TC", "Hiragino Sans", Arial, sans-serif;
  --font-display: "Arial Black", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --shell: min(100% - 40px, 980px);
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a,
button,
select {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.frame-lines {
  position: fixed;
  inset: 14px;
  pointer-events: none;
  z-index: 1;
}

.frame-line {
  position: absolute;
  background: var(--line);
}

.frame-line-top,
.frame-line-bottom {
  left: 0;
  width: 100%;
  height: 1px;
}

.frame-line-left,
.frame-line-right {
  top: 0;
  width: 1px;
  height: 100%;
}

.frame-line-top {
  top: 0;
}

.frame-line-right {
  right: 0;
}

.frame-line-bottom {
  bottom: 0;
}

.frame-line-left {
  left: 0;
}

.rule {
  height: 1px;
  background: var(--line-strong);
}

.rule-double {
  height: 0;
  border-top: 3px double var(--line-strong);
}

.language-control {
  position: fixed;
  top: 28px;
  right: 28px;
  z-index: 16;
}

.lang-select {
  min-width: 104px;
  height: 42px;
  padding: 0 38px 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background-color: rgba(0, 0, 0, 0.96);
  color: var(--text);
  appearance: none;
  cursor: pointer;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  text-transform: uppercase;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text) 50%),
    linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position: calc(100% - 15px) 18px, calc(100% - 9px) 18px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.lang-select:focus-visible,
.action:focus-visible,
.lyric-link:focus-visible,
.source-link:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.site-main {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 48px;
  width: var(--shell);
  margin: 0 auto;
  padding: 74px 0 68px;
}

.site-main-centered {
  min-height: 100vh;
  align-content: center;
}

.hero-rail {
  position: fixed;
  top: 50%;
  z-index: 2;
  color: rgba(244, 244, 241, 0.32);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  pointer-events: none;
}

.hero-rail-left {
  left: 20px;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
}

.hero-rail-right {
  right: 20px;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
}

.hero-shell,
.catalog-shell {
  display: grid;
  gap: 22px;
}

.hero-shell {
  min-height: 520px;
  align-content: center;
}

.hero-header,
.catalog-heading,
.hero-meta,
.lyric-meta,
.lyric-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-kicker,
.hero-route,
.section-kicker,
.hero-meta,
.lyric-label,
.lyric-route,
.lyric-status,
.source-link {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-title {
  display: grid;
  gap: 8px;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 4.8rem;
  font-weight: 700;
  line-height: 1.06;
}

.hero-title span:first-child {
  font-family: var(--font-display);
  text-transform: uppercase;
}

.hero-title span:last-child {
  color: var(--text-soft);
  font-size: 2.35rem;
}

.hero-note {
  max-width: 52ch;
  margin: 0;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.action-primary {
  background: var(--button-white);
  color: #000000;
}

.action-secondary {
  background: var(--button-black);
  color: var(--text);
}

.action:hover {
  transform: translateY(-2px);
}

.hero-meta {
  flex-wrap: wrap;
}

.catalog-heading {
  align-items: end;
}

.catalog-heading h2 {
  margin: 4px 0 0;
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1.25;
}

.section-note {
  max-width: 34ch;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.7;
  text-align: right;
}

.lyric-list {
  display: grid;
  gap: 14px;
}

.lyric-card {
  display: grid;
  gap: 18px;
  min-height: 190px;
  padding: 20px;
  border: 1px solid var(--line-strong);
  background: rgba(5, 5, 5, 0.74);
}

.lyric-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.7rem;
  line-height: 1.28;
}

.lyric-subtitle {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 0.96rem;
  line-height: 1.6;
}

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

.lyric-detail {
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--line);
}

.lyric-detail span {
  display: block;
}

.lyric-detail span:first-child {
  color: var(--text-soft);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lyric-detail span:last-child {
  margin-top: 6px;
  font-size: 0.86rem;
  line-height: 1.35;
}

.lyric-footer {
  flex-wrap: wrap;
}

.lyric-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  background: var(--button-white);
  color: #000000;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.source-link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

@media (max-width: 820px) {
  :root {
    --shell: min(100% - 28px, 980px);
  }

  .site-main {
    padding-top: 92px;
  }

  .language-control {
    top: 24px;
    right: 24px;
  }

  .hero-rail {
    display: none;
  }

  .hero-shell {
    min-height: auto;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-title span:last-child {
    font-size: 1.7rem;
  }

  .catalog-heading,
  .hero-header,
  .hero-meta,
  .lyric-meta,
  .lyric-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-note {
    max-width: none;
    text-align: left;
  }

  .lyric-details {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .frame-lines {
    inset: 10px;
  }

  .hero-title {
    font-size: 2.35rem;
  }

  .hero-title span:last-child {
    font-size: 1.35rem;
  }

  .action,
  .lyric-link {
    width: 100%;
  }
}
