/* Tang Drum uses one visual system for the homepage and reading pages. */
:root {
  color-scheme: dark;
  --canvas: #080b12;
  --surface: #0c131d;
  --raised: #111a25;
  --text: #f0e9dc;
  --body: #cbc6bf;
  --muted: #aaaeb7;
  --rule: #2e3848;
  --control-rule: #778395;
  --accent: #b3cef4;
  --button: #294572;
  --button-hover: #365889;
  --gutter: max(clamp(22px, 5.2vw, 82px), calc((100% - 1376px) / 2));
  --section-space: clamp(58px, 7vw, 105px);
  --section-gap: clamp(26px, 5.1vw, 82px);
  --header-height: 72px;
  --title-size: clamp(32px, 3.7vw, 56px);
  --serif: 'Instrument Serif', Georgia, serif;
  --song: 'Noto Serif SC', 'Songti SC', SimSun, serif;
  --sans: 'Instrument Sans', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body { margin: 0; color: var(--text); background: var(--canvas); font: 400 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img, video { display: block; max-width: 100%; }
figure, h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 550; line-height: 1.13; letter-spacing: -.041em; text-wrap: balance; }
.is-zh h1, .is-zh h2, .is-zh h3 { letter-spacing: -.023em; }
h2 { font-size: var(--title-size); }
p { max-width: 65ch; color: var(--body); }
.is-zh p { line-height: 1.84; }
::selection { color: var(--text); background: var(--button); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.skip-link { position: fixed; z-index: 300; top: -100px; left: 16px; padding: 12px 16px; background: var(--text); color: var(--canvas); }
.skip-link:focus { top: 12px; }
section { scroll-margin-top: 16px; }
.section-shell { padding: var(--section-space) var(--gutter); border-top: 1px solid var(--rule); }

/* Header and navigation */
.site-header { position: sticky; z-index: 100; top: 0; background: rgba(7,11,19,.97); border-bottom: 1px solid var(--rule); backdrop-filter: blur(14px); }
.header-inner { min-height: calc(var(--header-height) - 1px); padding-inline: var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: clamp(15px, 2.4vw, 36px); }
.brand { display: inline-flex; align-items: center; flex: none; gap: 11px; white-space: nowrap; }
.brand-mark { width: 41px; height: 41px; object-fit: contain; filter: invert(1); }
.brand-name { font-size: 15px; line-height: 1.2; letter-spacing: .13em; font-weight: 660; }
.brand-cn { margin-left: 9px; font-size: 14px; letter-spacing: .02em; font-weight: 500; }
.desktop-navigation { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 38px); margin-left: auto; }
.desktop-navigation a, .language-switch { display: inline-flex; min-height: 44px; align-items: center; font-size: 14px; line-height: 1.2; white-space: nowrap; }
.desktop-navigation a { position: relative; color: var(--body); }
.desktop-navigation a:hover, .desktop-navigation a:focus-visible { color: var(--text); }
.desktop-navigation a::after { content: ''; position: absolute; inset: auto 0 7px; border-bottom: 1px solid currentColor; transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.desktop-navigation a:hover::after { transform: scaleX(1); }
.header-tools { display: flex; flex: none; gap: 10px; align-items: center; }
.language-picker { display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.language-picker > span { font-size: 13px; color: var(--muted); }
.language-switch { justify-content: center; min-width: 35px; padding-inline: 5px; color: var(--muted); }
.language-switch[aria-current="true"], .language-switch:hover { color: var(--text); }
.language-switch[aria-current="true"] { text-decoration: underline; text-underline-offset: 5px; }
.menu-toggle, .mobile-navigation { display: none; }

.button { display: inline-flex; min-height: 48px; gap: 18px; align-items: center; justify-content: center; padding: 12px 17px; border: 1px solid transparent; border-radius: 2px; color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.35; transition: background .2s, border-color .2s; }
.button-solid { background: var(--button); }
.button-solid:hover { background: var(--button-hover); }
.button > span[aria-hidden] { font-weight: 400; }

/* The artwork and the live photographs use visibly different captions. */
.stage-cover, .stage-panel { position: relative; background: #030817; }
.stage-cover { scroll-margin-top: 0; }
.stage-cover-image, .stage-work-image, .stage-story-image {
  width: 100%;
  height: auto;
}
.stage-cover-image { aspect-ratio: 2.12; object-fit: cover; object-position: center 58%; }
.stage-cover figure::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: min(33vw, 49%);
  background: linear-gradient(#030817b8, #03081774 55%, transparent);
  pointer-events: none;
}
.stage-cover-copy, .stage-panel-copy { position: absolute; z-index: 1; inset-inline: var(--gutter); }
.stage-cover-copy { inset-block-start: clamp(39px, 7.1vw, 122px); text-align: center; }
.stage-identity { max-width: none; margin: 0 0 13px; color: var(--body); font-size: 14px; letter-spacing: .14em; }
.stage-cover h1, .stage-panel h2, .stage-course h2, .stage-gallery h2 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.015em;
}
.is-zh :is(.stage-cover h1, .stage-panel h2, .stage-course h2, .stage-gallery h2) {
  font-family: var(--song);
  font-weight: 500;
  line-height: 1.21;
  letter-spacing: .06em;
}
.stage-cover h1 { font-size: clamp(39px, 5.3vw, 82px); }
.is-zh .stage-cover h1 { font-size: clamp(34px, 4.55vw, 72px); }
.stage-credit {
  padding: 12px var(--gutter) 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.stage-cover-credit { display: flex; flex-wrap: wrap; gap: 3px 16px; }
.stage-cover-credit a:hover { text-decoration: underline; text-underline-offset: 4px; }
.stage-work, .stage-story { border-top: 1px solid var(--rule); }
.stage-work .stage-panel-copy { inset-block-start: 47%; transform: translateY(-50%); inset-inline-end: auto; width: min(38%, 500px); }
.stage-panel h2, .stage-course h2, .stage-gallery h2 { font-size: clamp(33px, 4.4vw, 67px); }
.is-zh :is(.stage-panel h2, .stage-course h2, .stage-gallery h2) { font-size: clamp(31px, 4.1vw, 61px); }
.stage-label { margin-bottom: 13px; color: var(--body); font-size: 14px; letter-spacing: .16em; }
.stage-link, .work-player summary, .live-film summary, .booking-disclosure > summary {
  display: inline-flex;
  min-height: 44px;
  gap: 11px;
  align-items: center;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 5px;
  font-size: 14px;
  line-height: 1.5;
}
.stage-link:hover, summary:hover, .video-direct:hover { color: var(--accent); }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.disclosure-icon { flex: none; text-decoration: none; font-size: 16px; }
details[open] > summary > .disclosure-icon { transform: rotate(45deg); }
.work-player { width: min(100%, 320px); margin-top: 12px; }
.work-player audio { display: block; width: 100%; height: 42px; margin-bottom: 8px; }
.stage-course { display: flex; gap: 26px; align-items: flex-end; justify-content: space-between; background: var(--surface); }
.stage-course > a { flex: none; }
.stage-story .stage-panel { background: #050a0b; }
.stage-story .stage-panel-copy { inset-block-start: clamp(38px, 6.5vw, 97px); text-align: center; }
.stage-story .stage-label { max-width: none; }
.stage-gallery { background: var(--canvas); }
.live-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 3.3vw, 50px); margin-top: clamp(27px, 4.3vw, 56px); }
.live-photos figure { min-width: 0; scroll-margin-top: 16px; }
.live-photos a { display: block; overflow: hidden; }
.live-photo { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.live-photos figcaption { color: var(--body); margin-top: 10px; font-size: 14px; }
.live-film { width: min(100%, 880px); margin-top: 30px; }
.film-frame { min-width: 0; margin-top: 15px; }
.film-frame video { width: 100%; height: auto; aspect-ratio: 16 / 9; background: #060a10; }
.film-frame figcaption { margin-top: 11px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.video-direct { color: var(--body); text-decoration: underline; text-underline-offset: 4px; }

/* Inquiries and footer */
.booking-disclosure { scroll-margin-top: 12px; padding-bottom: 15px; }
.booking-section { padding-block: 24px 38px; display: grid; grid-template-columns: minmax(0, .79fr) minmax(0, 1.21fr); align-items: start; gap: var(--section-gap); }
.booking-heading p { margin-top: 14px; }
.service-types { margin-top: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 470px; }
.service-types a { display: flex; min-height: 46px; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border: 1px solid var(--rule); color: var(--body); font-size: 14px; line-height: 1.3; }
.service-types a:hover, .service-types a:focus-visible { border-color: var(--accent); color: var(--text); }
.booking-direct { margin-top: 23px; font-size: 14px; }
.booking-direct > span { display: block; color: var(--muted); }
.booking-direct > a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); }
.booking-direct > a:hover { color: var(--accent); }
#inquiry-form { min-width: 0; display: grid; gap: 18px; padding: clamp(20px, 3vw, 38px); background: var(--raised); border: 1px solid var(--rule); scroll-margin-top: 16px; }
#inquiry-form label { display: block; min-width: 0; color: var(--text); font-size: 14px; font-weight: 560; line-height: 1.4; }
#inquiry-form label b { color: var(--accent); font-weight: 550; }
#inquiry-form label small { margin-left: 2px; color: var(--muted); font-size: 13px; font-weight: 400; }
#inquiry-form input:not([type="hidden"]), #inquiry-form select, #inquiry-form textarea { display: block; min-width: 0; min-height: 46px; width: 100%; padding: 9px 11px; margin-top: 8px; border: 1px solid var(--control-rule); border-radius: 2px; background: var(--canvas); color: var(--text); font-size: 16px; font-weight: 400; accent-color: var(--accent); }
#inquiry-form textarea { min-height: 100px; resize: vertical; }
#inquiry-form :is(input, select, textarea):focus-visible { outline-offset: 2px; border-color: var(--accent); }
#inquiry-form select option { background: var(--canvas); color: var(--text); }
#inquiry-form input:autofill { box-shadow: 0 0 0 100px var(--canvas) inset; -webkit-text-fill-color: var(--text); }
.form-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-hint { font-size: 14px; color: var(--body); }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 15px; }
.form-actions p, .form-status { margin: 0; color: var(--muted); font-size: 13px; }
.form-actions button:disabled { opacity: .66; cursor: wait; }
.form-status:empty { display: none; }
.form-status[data-state="success"] { color: #a5ce9e; }
.form-status[data-state="error"] { color: #fda396; }
.hp-field { position: absolute; left: -9999px; width: 1px; overflow: hidden; }
.site-footer { padding: clamp(38px, 5vw, 74px) var(--gutter) 23px; border-top: 1px solid var(--rule); }
.footer-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: clamp(19px, 4.1vw, 62px); padding-bottom: 32px; }
.footer-identity > p { margin-top: 13px; color: var(--muted); font-size: 14px; }
.footer-overline { display: block; color: var(--muted); font-size: 13px; font-weight: 550; }
.footer-contact { min-width: 0; }
#social { scroll-margin-top: calc(var(--header-height) + 20px); }
.footer-link { display: flex; justify-content: space-between; align-items: center; min-height: 44px; gap: 10px; border-bottom: 1px solid var(--rule); color: var(--body); font-size: 14px; overflow-wrap: anywhere; }
.footer-social-brand { display: flex; align-items: center; gap: 11px; }
.footer-social-brand img { display: block; width: 24px; height: 24px; flex: none; border-radius: 5px; }
.footer-link:hover, .footer-baseline a:hover { color: var(--accent); }
.footer-baseline { display: flex; justify-content: space-between; align-items: center; gap: 14px 28px; flex-wrap: wrap; padding-top: 17px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; }

/* Beginner's article */
.guide-header { min-height: var(--header-height); display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px var(--gutter); border-bottom: 1px solid var(--rule); font-size: 14px; }
.guide-header .language-picker a { min-height: 44px; display: inline-flex; align-items: center; padding-inline: 6px; color: var(--body); }
.guide-header .language-picker a[aria-current="page"] { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.guide { max-width: 826px; margin: 0 auto; padding: var(--section-space) 24px; }
.guide h1 { font-size: clamp(36px, 5.6vw, 65px); margin-bottom: 20px; }
.guide h2 { font-size: clamp(25px, 3.4vw, 36px); margin: 35px 0 10px; }
.guide figure { margin: 24px 0; }
.guide figure img { width: 100%; height: auto; background: #e3dacf; }
.guide figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; }
.guide .button { margin-top: 23px; }
.guide-other { display: inline-flex; align-items: center; min-height: 44px; color: var(--body); text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 990px) {
  :root { --header-height: 64px; }
  .desktop-navigation { display: none; }
  .menu-toggle { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 40px; height: 44px; gap: 6px; background: transparent; border: 0; }
  .menu-toggle span { width: 23px; height: 1px; background: var(--text); }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .mobile-navigation { display: none; position: fixed; z-index: 2; inset: var(--header-height) 0 0; height: calc(100svh - var(--header-height)); padding: 18px var(--gutter); background: var(--canvas); overflow-y: auto; }
  .mobile-navigation.open { display: block; }
  .mobile-navigation a { display: flex; min-height: 57px; align-items: center; border-bottom: 1px solid var(--rule); font-size: 22px; }
}
@media (max-width: 740px) {
  :root { --section-space: 52px; --section-gap: 24px; }
  .stage-cover-copy, .stage-work .stage-panel-copy, .stage-story .stage-panel-copy {
    position: static;
    transform: none;
    width: auto;
    padding-inline: var(--gutter);
  }
  .stage-cover-copy { padding-block: 43px 26px; }
  .stage-identity { margin-bottom: 11px; font-size: 13px; }
  .stage-cover h1 { font-size: clamp(36px, 8.5vw, 61px); }
  .is-zh .stage-cover h1 { font-size: clamp(25px, 7vw, 49px); letter-spacing: .025em; }
  .stage-cover-image { aspect-ratio: 2.32; object-position: center 65%; }
  .stage-cover figure::before { content: none; }
  .stage-work .stage-panel-copy, .stage-story .stage-panel-copy {
    padding-block: 35px 19px;
    text-align: start;
  }
  .stage-work-image { aspect-ratio: 1.36; object-fit: cover; object-position: 80% 50%; }
  .stage-story-image { aspect-ratio: 2.37; object-fit: cover; object-position: center 67%; }
  .stage-course { display: block; }
  .stage-course .stage-link { margin-top: 13px; }
  .stage-label { margin-bottom: 10px; }
  .live-photos { gap: 21px 13px; }
  .live-photos figcaption { font-size: 13px; }
  .booking-section { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px 15px; }
  .footer-identity { grid-column: 1 / -1; }
}
@media (max-width: 440px) {
  .brand { gap: 8px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 13px; letter-spacing: .095em; }
  .brand-cn { margin-left: 6px; font-size: 12px; }
  .header-tools { gap: 4px; }
  .language-switch { min-width: 31px; padding-inline: 3px; font-size: 13px; }
  .form-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 360px) {
  .header-inner { padding-inline: 14px; gap: 7px; }
  .brand-mark { width: 29px; height: 29px; }
  .brand-name { font-size: 12px; }
  .brand-cn { font-size: 11px; }
  .menu-toggle { width: 34px; }
  .service-types a { font-size: 13px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-identity { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
