:root {
  color-scheme: light;
  --pine: #112d25;
  --dark-pine: #0c231d;
  --gold: #efce91;
  --paper: #f8f5ed;
  --ink: #1a3028;
  --muted: #58645b;
  --line: #d9d6c9;
  --serif: "Songti TC", "Noto Serif TC", "PMingLiU", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); }
button, input { font: inherit; }
button { cursor: pointer; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 3px solid #a15e29; outline-offset: 4px; }
h1, h2, p { margin: 0; }
.shell { width: min(calc(100% - 80px), 1100px); margin-inline: auto; }
.site-header { background: var(--dark-pine); color: var(--paper); border-bottom: 1px solid #ffffff23; }
.header-inner, nav, .hero-actions, .section-heading, .score-heading, .dialog-header, .viewer-actions {
  display: flex; align-items: center;
}
.header-inner { justify-content: space-between; min-height: 66px; gap: 14px; }
.wordmark { font: 700 19px var(--serif); letter-spacing: .08em; text-decoration: none; white-space: nowrap; }
.wordmark span { color: var(--gold); margin-right: 5px; }
nav { gap: 25px; font-size: 14px; }
nav a, .nav-action { text-decoration: none; }
.nav-action { background: transparent; color: inherit; border: 1px solid #ffffff4f; border-radius: 4px; padding: 7px 13px; white-space: nowrap; }
.nav-action:hover, nav a:hover { color: var(--gold); }
.hero { background: radial-gradient(ellipse at 74% 42%, #254438, var(--pine) 64%); color: var(--paper); overflow: hidden; }
.hero-inner { min-height: 341px; display: grid; grid-template-columns: 1fr minmax(230px, .65fr); align-items: center; gap: 22px; position: relative; }
.hero-content { padding-block: 42px; position: relative; z-index: 1; }
.kicker { font: 13px/1.3 Georgia, serif; letter-spacing: .26em; color: var(--gold); margin-bottom: 13px; }
h1 { font: 800 clamp(44px, 7vw, 82px)/1.17 var(--serif); letter-spacing: .04em; }
.hero-description { color: #e1e8de; margin-top: 13px; }
.hero-actions { gap: 23px; margin-top: 26px; flex-wrap: wrap; }
.primary, .secondary, .danger { min-height: 44px; border-radius: 4px; padding: 9px 16px; font-weight: 700; }
.primary { color: var(--dark-pine); background: var(--gold); border: 1px solid var(--gold); }
.primary:hover { background: #f9dfa9; }
.primary span { margin-left: 8px; }
.score-jump { text-underline-offset: 5px; font-size: 14px; }
.score-jump span { margin-left: 5px; }
.registration-status { color: #f5dfb4; margin-top: 12px; font-size: 14px; }
.registration-status:empty { display: none; }
.ornament { width: min(100%, 350px); height: 265px; position: relative; margin-inline: auto; color: var(--gold); }
.ornament-frame { position: absolute; inset: 14px 17% 8px; border: 1px solid #efce917d; border-radius: 50% 50% 5% 5% / 45% 45% 5% 5%; }
.ornament-frame::after { content: ""; position: absolute; inset: 8px; border: 1px solid #efce913e; border-radius: inherit; }
.music-staff { position: absolute; inset: 40% 0 auto; height: 49px; transform: rotate(-10deg); background: repeating-linear-gradient(to bottom, #efce9154 0 1px, transparent 1px 12px); mask-image: linear-gradient(to right, transparent, black 30% 70%, transparent); }
.music-note { position: absolute; inset: 26px 0 auto; text-align: center; line-height: 1; font: 176px/1 Georgia, serif; text-shadow: 0 0 36px #efce9150; }
.spark { position: absolute; font-family: Georgia, serif; line-height: 1; }
.spark-top { top: 15%; left: 30%; font-size: 28px; }
.spark-right { top: 34%; right: 19%; font-size: 22px; }
.spark-left { bottom: 11%; left: 28%; font-size: 25px; }
.spark-bottom { bottom: 13%; right: 30%; font-size: 23px; }
.scores-section { padding-block: 37px 65px; scroll-margin-top: 16px; }
.section-heading { justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 19px; padding-bottom: 12px; }
h2 { font: 800 30px/1.25 var(--serif); }
.section-heading p, #form-description, .hint { color: var(--muted); font-size: 14px; }
.score-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px; }
.score-card { background: #f0ece1; border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
.score-button { display: block; padding: 0; border: 0; border-radius: inherit; width: 100%; background: none; color: inherit; text-align: left; }
.score-heading { justify-content: space-between; gap: 10px; padding: 14px 17px; }
.score-heading strong { font: 800 24px/1.25 var(--serif); }
.english { display: block; color: var(--muted); font: italic 15px/1.5 Georgia, serif; }
.expand { width: 34px; height: 34px; border: 1px solid #afbaad; border-radius: 50%; display: grid; place-items: center; font-size: 19px; }
.score-button:hover .expand { background: var(--pine); color: white; }
.score-paper { display: block; margin: 0 9px 9px; background: white; overflow: hidden; border-radius: 2px; }
.score-paper img { width: 100%; height: auto; display: block; }
dialog { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 22px; max-height: 92dvh; }
dialog::backdrop { background: #081b16bc; }
body:has(dialog[open]) { overflow: hidden; }
.form-dialog { width: min(460px, calc(100% - 28px)); }
.dialog-header { justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.dialog-header h2 { font-size: 24px; }
.close { border: 1px solid var(--line); border-radius: 4px; width: 44px; height: 44px; background: transparent; color: var(--ink); font-size: 25px; flex: none; }
form, .details { display: grid; gap: 14px; margin-top: 16px; }
label { display: grid; gap: 4px; font-weight: 700; }
input { width: 100%; min-height: 44px; color: var(--ink); background: white; border: 1px solid #a4aea4; border-radius: 4px; padding: 8px 10px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.secondary { border: 1px solid #a4aea4; color: var(--ink); background: transparent; }
.secondary:hover, .close:hover { background: #ebe6da; }
.danger { background: #84362e; border: 1px solid #84362e; color: white; }
.danger:hover { background: #6e2a23; }
.form-error { margin-top: 12px; color: #8d2b25; }
.score-dialog { width: min(890px, calc(100% - 24px)); padding: 12px; }
.score-dialog[open] { display: flex; flex-direction: column; }
.viewer-actions { gap: 8px; }
.viewer { overflow: auto; background: #ece9e0; }
.viewer img { display: block; width: 100%; height: auto; margin-inline: auto; }
.viewer.is-zoomed img { width: max(150%, min(880px, 250vw)); }
@media (max-width: 650px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { min-height: 59px; }
  nav { gap: 11px; }
  .hero-inner { min-height: auto; display: block; }
  .hero-content { padding-block: 34px; }
  .ornament { position: absolute; right: -38px; top: 0; width: 170px; height: 174px; opacity: .27; pointer-events: none; }
  .music-note { font-size: 110px; }
  .scores-section { padding-block: 25px 40px; }
  .score-list { gap: 9px; }
  .score-heading { align-items: flex-start; padding: 10px 7px 8px; gap: 3px; }
  .score-heading strong { font-size: clamp(15px, 4.5vw, 23px); }
  .english { font-size: 12px; }
  .expand { width: 24px; height: 24px; font-size: 15px; flex: none; }
  .score-paper { margin: 0 4px 4px; }
}
@media (max-width: 360px) {
  nav > a { display: none; }
  .hero-actions { gap: 14px; }
}
