:root {
  color-scheme: light;
  --ink: #122e43;
  --muted: #455c6c;
  --paper: #f8f8f3;
  --white: #fff;
  --line: #cedad9;
  --navy: #0e293a;
  --navy-light: #17394c;
  --mint: #b4decf;
  --green: #1c5a4f;
  --amber: #f3e3bc;
  --font: "Source Sans 3", "Noto Sans CJK SC", "Noto Sans CJK JP", "PingFang SC", "Hiragino Kaku Gothic ProN", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, "Noto Serif CJK SC", "Noto Serif CJK JP", "Songti SC", "Yu Mincho", serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 1rem/1.6 var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
:lang(ja) { --font: "Source Sans 3", "Noto Sans CJK JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .18em; }
button, input { font: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid #338574;
  outline-offset: 4px;
}
.hero a:focus-visible { outline-color: var(--mint); }
p, h1, h2, h3, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.17; }
[hidden] { display: none !important; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.skip-link:focus {
  position: absolute;
  z-index: 4;
  top: 10px;
  left: 12px;
  padding: 8px 12px;
  background: var(--white);
}
.container { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.site-header { background: var(--white); border-bottom: 1px solid #dae3e3; }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 720;
  font-size: .92rem;
  line-height: 1.2;
}
.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 4px);
  grid-template-rows: repeat(2, 4px);
  align-content: center;
  justify-content: center;
  gap: 3px;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  flex: 0 0 auto;
  background: var(--navy);
}
.brand-mark i { border-radius: 1px; background: #a8d5c6; }
.brand-mark i:nth-child(2) { background: #f3d699; }
.brand-divider { margin-inline: 3px; color: #6a817f; }
.primary-nav, .language-nav { display: flex; align-items: center; }
.primary-nav { margin-left: auto; gap: clamp(16px, 2.5vw, 34px); }
.primary-nav a, .language-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 620;
}
.primary-nav a:hover, .primary-nav [aria-current="page"] { color: var(--green); text-decoration: underline; }
.language-nav { gap: 2px; border-left: 1px solid var(--line); padding-left: 16px; flex-shrink: 0; }
.language-nav a { padding: 0 9px; border-radius: 4px; min-height: 40px; }
.language-nav a:hover { background: #eef4f0; }
.language-nav [aria-current="page"] { background: #e3f0eb; color: #164b41; }

.hero {
  color: #f5faf8;
  background: var(--navy);
  border-bottom: 1px solid #1b4955;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.36fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(36px, 6vw, 84px);
  padding-block: 66px 72px;
}
.release-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 10px;
  min-height: 32px;
  border: 1px solid #557079;
  border-radius: 5px;
  text-decoration: none;
  color: #e1ede8;
  font-size: .79rem;
  font-weight: 580;
}
.release-badge:hover { border-color: var(--mint); }
.status-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #a7d9c6; }
.badge-version, .record-id, .line-number { font: .76rem/1.4 var(--mono); letter-spacing: .015em; }
.badge-version { color: #bbd7cc; }
.hero h1 {
  max-width: 12ch;
  margin-top: 19px;
  font: 400 clamp(3rem, 5.05vw, 4.65rem)/1.04 var(--serif);
  letter-spacing: -.035em;
  text-wrap: balance;
}
.hero h1:lang(zh), .hero h1:lang(ja) {
  max-width: none;
  font-family: var(--font);
  font-size: clamp(2.1rem, 4.35vw, 4rem);
  font-weight: 650;
  line-height: 1.19;
  letter-spacing: -.04em;
  text-wrap: wrap;
}
.hero h1:lang(ja) { font-size: clamp(2.1rem, 3.8vw, 3.35rem); }
.hero-summary { max-width: 52ch; margin-top: 22px; color: #d2e1e4; font-size: clamp(1rem, 1.35vw, 1.15rem); line-height: 1.72; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 29px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 44px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 5px;
  text-decoration: none;
  font-size: .875rem;
  line-height: 1.4;
  font-weight: 680;
  text-align: center;
}
.button-mint { background: var(--mint); color: #102f35; }
.button-mint:hover { background: #d0ebdf; }
.button-outline { color: #f1f8f4; border-color: #6e8790; }
.button-outline:hover { background: var(--navy-light); }
.button-ink-outline { background: transparent; color: var(--ink); border-color: #8aa5a1; }
.button-ink-outline:hover { background: #e8f1ed; }

.hero-sample {
  padding: 24px 26px 22px;
  border: 1px solid #648189;
  border-radius: 8px;
  background: var(--navy-light);
  box-shadow: 0 17px 34px #05131b33;
}
.sample-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; color: #d9e9e6; font-size: .82rem; font-weight: 620; }
.sample-head .record-id { color: #c6dcd7; }
.sample-sentence {
  margin-top: 29px;
  padding-bottom: 25px;
  border-bottom: 1px solid #638088;
  font: 400 clamp(1.65rem, 3.1vw, 2.75rem)/1.2 var(--serif);
  letter-spacing: -.035em;
}
mark { color: #254735; background: #e0efb9; border-radius: 3px; padding-inline: .16em; }
.target-word { text-decoration: underline; text-decoration-color: #4a9785; text-underline-offset: .18em; }
.hero-sample .target-word { text-decoration-color: #acd9cd; }
.sample-tags { display: grid; grid-template-columns: 1fr 1.1fr; margin-block: 17px 13px; }
.sample-tags div + div { border-left: 1px solid #638088; padding-left: 17px; }
.sample-tags dt { font-size: .78rem; color: #c6dcdd; }
.sample-tags dd { margin-top: 2px; font-size: .98rem; font-weight: 650; }
.sample-tags dd a { text-decoration: none; }
.sample-tags dd a:hover, .sample-more:hover { text-decoration: underline; }
.word-gloss { color: #c6dcdd; font-size: .86em; font-weight: 500; }
.sample-more { display: inline-flex; align-items: center; min-height: 36px; gap: 8px; font-size: .82rem; color: #bee1d6; text-decoration: none; font-weight: 650; }

.catalogue { padding-block: 57px 70px; scroll-margin-top: 25px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px 22px; }
.section-heading h2, .related-band h2 { font: 400 clamp(2rem, 3.15vw, 2.8rem)/1.14 var(--serif); letter-spacing: -.023em; }
.section-heading h2:lang(zh), .section-heading h2:lang(ja), .related-band h2:lang(zh), .related-band h2:lang(ja) {
  font-family: var(--font);
  font-size: clamp(1.55rem, 2.6vw, 2.2rem);
  font-weight: 660;
  letter-spacing: -.035em;
}
.section-heading p { color: var(--muted); }
.catalogue-tools { display: none; }
.ready .catalogue-tools { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 25px; }
.catalogue-tools form { flex: 1 1 340px; max-width: 550px; min-width: 0; }
.search-field { position: relative; }
.search-field input {
  width: 100%;
  min-height: 48px;
  padding: 9px 13px 9px 42px;
  border: 1px solid #9fb4b4;
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
}
.search-field input::placeholder { color: #566b76; opacity: 1; }
.search-icon {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 13px;
  height: 13px;
  border: 1.5px solid #385b64;
  border-radius: 50%;
  pointer-events: none;
}
.search-icon::after { content: ""; position: absolute; top: 9px; left: 9px; width: 6px; height: 1.5px; background: #385b64; transform: rotate(45deg); transform-origin: left; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.filters button {
  padding: 6px 13px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font-size: .86rem;
  font-weight: 610;
}
.filters button:hover { background: #eaf1ec; }
.filters button[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: var(--white); }
.result-meta { display: flex; align-items: center; gap: 17px; min-height: 42px; margin-top: 7px; color: var(--muted); font-size: .82rem; }
.result-meta button { border: none; padding: 5px 2px; color: var(--green); background: transparent; text-decoration: underline; text-underline-offset: .18em; }
.record-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.record-card { display: flex; min-width: 0; }
.record-link {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 19px 20px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  text-decoration: none;
}
.record-link:hover { border-color: #488170; box-shadow: 0 4px 13px #183f3314; }
.record-meta, .detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; }
.record-meta { justify-content: space-between; }
.record-id { color: var(--muted); }
.language-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 3px;
  background: #e6f1e9;
  color: #254f41;
  font-size: .76rem;
  font-weight: 690;
}
.language-badge.zh { color: #5e4320; background: #f5ead1; }
.language-badge.ja { color: #244760; background: #e4eef5; }
.record-link h3 { margin-top: 16px; font-size: clamp(1.18rem, 1.65vw, 1.43rem); font-weight: 690; line-height: 1.32; overflow-wrap: anywhere; }
.record-use { flex: 1; margin-top: 8px; min-height: 2.85em; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.record-action { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: 16px; padding-top: 11px; border-top: 1px solid #e0e8e7; color: var(--green); font-size: .83rem; font-weight: 650; }
.record-action span[aria-hidden] { font-size: 1.03rem; }
.empty-state { padding: 23px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }

.related-band { background: #e8efec; border-top: 1px solid #d4e1db; }
.related-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 31px; }
.related-band h2 { font-size: clamp(1.65rem, 2.3vw, 2.1rem); }
.related-band p { margin-top: 7px; color: var(--muted); }
.related-band .button { flex: 0 0 auto; }
.footer { border-top: 1px solid var(--line); background: #fdfdfa; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px 28px; padding-block: 26px; }
.footer-author { padding-left: 40px; margin-top: 4px; color: var(--muted); font-size: .83rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 9px 25px; color: var(--muted); font-size: .83rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

.detail-heading { background: #eaf1ed; border-bottom: 1px solid #ccdad6; }
.detail-heading-inner { padding-block: 26px 44px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin-bottom: 14px; color: var(--green); text-decoration: none; font-size: .88rem; font-weight: 660; }
.back-link:hover { text-decoration: underline; }
.detail-meta { color: var(--muted); font-size: .8rem; }
.detail-meta a { font-family: var(--mono); color: var(--green); }
.detail-heading h1 {
  margin-top: 13px;
  font-size: clamp(2.1rem, 4.6vw, 4.1rem);
  font-weight: 670;
  letter-spacing: -.037em;
  overflow-wrap: anywhere;
}
.detail-heading h1:lang(en) { font-family: var(--serif); font-weight: 400; }
.detail-heading p { max-width: 64ch; color: var(--muted); margin-top: 12px; font-size: clamp(1rem, 1.4vw, 1.16rem); }
.detail-heading p + .button { margin-top: 23px; }
.detail-layout, .example-layout { padding-block: 32px 62px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; gap: 30px; }
.detail-main, .detail-aside { display: grid; gap: 14px; min-width: 0; }
.detail-panel {
  padding: 21px 23px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
}
.detail-panel h2 { font-size: 1.14rem; font-weight: 690; }
.detail-panel p { margin-top: 9px; color: var(--muted); }
.sentence-list, .reference-list, .lyric-lines { list-style: none; margin: 13px 0 0; padding: 0; }
.sentence-list li, .reference-list li { padding-block: 10px; border-top: 1px solid var(--line); }
.sentence-list li:last-child, .reference-list li:last-child { padding-bottom: 0; }
.sentence-list p { margin-top: 0; font-size: 1.06rem; color: var(--ink); }
.sentence-list .translation, .lyric-lines .translation { margin-top: 4px; color: var(--muted); font: .88rem/1.55 var(--font); }
.reference-list a { display: block; overflow-wrap: anywhere; color: var(--green); font-size: .93rem; font-weight: 610; }
.reference-list li > span { display: block; margin-top: 3px; font-size: .84rem; color: var(--muted); }
.citation-panel { background: #eef4ef; }
.citation-panel .citation-text { padding: 12px; border: 1px solid #ccddd3; background: #fcfdfa; border-radius: 4px; color: #304b54; font-size: .9rem; overflow-wrap: anywhere; }
.citation-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; margin-top: 12px; font-size: .82rem; color: var(--green); }
.release-badge.light { color: var(--green); border-color: #9bb9ad; }
.release-badge.light .status-dot { background: #377461; }
.release-badge.light .badge-version { color: #38635b; }
.download-list { display: grid; justify-items: start; gap: 8px; margin-top: 13px; }
.download-list .button { text-align: left; }

.legend { display: flex; flex-wrap: wrap; gap: 13px 28px; margin-bottom: 21px; }
.legend > div { display: flex; align-items: baseline; gap: 9px; }
.legend dt { color: var(--muted); font-size: .88rem; }
.legend dd { font-weight: 680; }
.legend dd a { text-decoration: none; }
.legend dd a:hover { text-decoration: underline; }
.legend-gloss { font-weight: 500; color: var(--muted); }
.track-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 18px; }
.track { background: var(--white); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.track-heading { padding: 18px 21px; background: #eaf2ef; }
.track h2 { margin-top: 6px; font-size: 1.4rem; }
.lyric-lines { margin: 0; }
.lyric-lines li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 14px 21px; border-top: 1px solid var(--line); scroll-margin-top: 18px; }
.lyric-lines li:target { background: #f8f8e9; box-shadow: inset 4px 0 #639788; }
.lyric-lines p { font: 400 clamp(1rem, 1.7vw, 1.34rem)/1.42 var(--serif); }
.line-number { padding-top: 4px; color: #577171; }
.recall { margin-top: 18px; }
.recall details { margin-top: 9px; }
.recall summary { display: list-item; width: fit-content; padding-block: 5px; cursor: pointer; color: var(--green); font-weight: 640; }
.recall details p { margin-top: 3px; }

@media (max-width: 890px) {
  .header-inner { gap: 13px; }
  .primary-nav { gap: 15px; }
  .language-nav { padding-left: 8px; }
  .language-nav a { padding-inline: 6px; }
  .hero-inner { gap: 30px; padding-block: 53px 58px; }
  .hero-sample { padding-inline: 18px; }
  .record-link { padding-inline: 15px; }
}

@media (max-width: 740px) {
  .container { width: calc(100% - 36px); }
  .header-inner { display: grid; grid-template-columns: 1fr auto; gap: 0 9px; padding-top: 7px; }
  .primary-nav { grid-column: 1 / -1; grid-row: 2; margin-left: 0; gap: 18px; border-top: 1px solid #e7edeb; margin-top: 6px; flex-wrap: wrap; }
  .primary-nav a { font-size: .82rem; min-height: 42px; }
  .language-nav { grid-column: 2; grid-row: 1; padding-left: 5px; }
  .language-nav a { font-size: .81rem; min-height: 36px; }
  .brand { font-size: .85rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; padding-block: 37px 39px; }
  .hero h1 { max-width: 16ch; margin-top: 16px; }
  .hero-summary { margin-top: 14px; }
  .hero-actions { margin-top: 21px; }
  .hero-sample { padding: 18px 19px 13px; }
  .sample-sentence { margin-top: 17px; padding-bottom: 16px; }
  .sample-tags { margin-block: 12px 8px; }
  .catalogue { padding-block: 33px 41px; }
  .ready .catalogue-tools { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 17px; }
  .catalogue-tools form { flex-basis: auto; max-width: none; }
  .record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .record-use { min-height: auto; }
  .related-inner, .footer-inner { flex-direction: column; align-items: flex-start; gap: 15px; }
  .related-inner { padding-block: 23px; }
  .footer-inner { padding-block: 21px; }
  .detail-heading-inner { padding-block: 18px 29px; }
  .detail-layout, .example-layout { padding-block: 22px 36px; }
  .detail-layout, .track-grid { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 405px) {
  .container { width: calc(100% - 30px); }
  .header-inner .brand { gap: 6px; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-divider { margin-inline: 1px; }
  .record-grid { grid-template-columns: 1fr; }
  .record-link { padding: 14px 15px 11px; }
  .record-link h3 { margin-top: 10px; }
  .record-action { margin-top: 11px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
