:root {
  --carnation: #A3172E;
  --carnation-dark: #7D0F21;
  --stem: #2E5A45;
  --petal: #F7E3E5;
  --ink: #231A1C;
  --mist: #6F6467;
  --line: #EBDCDE;
  --paper: #FFFFFF;
  --serif: "Noto Serif TC", "Noto Serif SC", "Songti TC", "Songti SC", "STSong", "PMingLiU", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "PingFang SC", "Hiragino Sans GB",
          "Microsoft JhengHei", "Microsoft YaHei", "Noto Sans CJK TC", "Noto Sans CJK SC", Roboto, Arial, sans-serif;
  --wrap: 1180px;
  --radius: 4px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.8 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--carnation); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--carnation-dark); }
:focus-visible { outline: 3px solid var(--stem); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.3; margin: 0 0 .5em; letter-spacing: .01em; }
.page-head h1 > span, .section-title > span, h2 > span.en { font-family: var(--sans); font-weight: 400; color: var(--mist); font-size: .55em; letter-spacing: 0; margin-left: .35em; white-space: nowrap; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }

.btn { display: inline-block; background: var(--carnation); color: #fff; text-decoration: none; padding: .55em 1.1em;
  border-radius: var(--radius); font-size: .95rem; line-height: 1.4; border: 1px solid var(--carnation); }
.btn:hover { background: var(--carnation-dark); border-color: var(--carnation-dark); color: #fff; }
.btn-quiet { background: transparent; color: var(--carnation); }
.btn-quiet:hover { background: var(--petal); color: var(--carnation-dark); }

/* header */
.masthead { border-bottom: 1px solid var(--line); background: var(--paper); }
.masthead-inner { display: flex; align-items: center; gap: 20px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-zh { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--carnation); letter-spacing: .04em; }
.brand-en { font-size: .82rem; color: var(--mist); }
.site-nav ul { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: .4em .7em; text-decoration: none; color: var(--ink); font-size: .95rem; border-radius: var(--radius); line-height: 1.35; }
.site-nav a span[lang="en"] { color: var(--mist); font-size: .85em; }
.site-nav a:hover { background: var(--petal); }
.site-nav a[aria-current="page"]:not(.btn) { color: var(--carnation); box-shadow: inset 0 -2px 0 var(--carnation); border-radius: 0; }
.site-nav .nav-join { margin-left: 8px; }
.site-nav .btn { color: #fff; padding: .5em 1em; }
.site-nav .btn:hover { background: var(--carnation-dark); }
.nav-toggle { display: none; }

/* hero: vertical name */
.hero { padding: 40px 0 24px; }
.hero-grid { display: grid; grid-template-columns: auto 1fr; gap: 36px; align-items: stretch; }
.hero-name { margin: 0; display: flex; align-items: stretch; }
.hero-name .v { writing-mode: vertical-rl; text-orientation: upright; font-family: var(--serif); font-weight: 700; color: var(--carnation);
  font-size: clamp(2.4rem, 4.6vw, 3.9rem); line-height: 1; letter-spacing: .06em; display: block; white-space: nowrap; }
.hero-name .v .seal { display: inline-block; margin-top: .25em; font-size: .42em; letter-spacing: .3em; color: var(--stem); font-weight: 600; }
.hero-photo { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--petal); min-height: 320px; color: #fff; text-decoration: none; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 28px 22px; display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(to top, rgba(35, 26, 28, .82), rgba(35, 26, 28, 0)); }
.hero-cap-k { font-size: .85rem; opacity: .9; }
.hero-cap-t { font-family: var(--serif); font-weight: 700; font-size: clamp(1.1rem, 1.8vw, 1.5rem); line-height: 1.4; max-width: 34em; }
.hero-cap time { font-size: .9rem; opacity: .9; }
.hero-photo:hover .hero-cap-t { text-decoration: underline; text-underline-offset: .2em; }

.intro { padding: 8px 0 48px; }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 48px; padding-left: calc(clamp(2.4rem, 4.6vw, 3.9rem) + 36px); }
.intro-en { font-size: 1.2rem; line-height: 1.6; margin: 0; }
.intro-zh { color: var(--mist); margin: 0; }
.intro-actions { grid-column: 1 / -1; margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }

.section-title { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 24px; }
.latest { padding: 48px 0; border-top: 1px solid var(--line); }
.latest-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; }
.feature { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.feature img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; margin-bottom: 10px; }
.feature-title { font-family: var(--serif); font-weight: 700; font-size: 1.45rem; line-height: 1.4; color: var(--ink); }
.feature:hover .feature-title { color: var(--carnation); }
.feature time { color: var(--mist); font-size: .92rem; }
.feature-ex { color: var(--mist); }
.more { margin-top: 28px; }

.ev-list { list-style: none; margin: 0; padding: 0; }
.ev a { display: grid; grid-template-columns: 132px 1fr; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.ev:first-child a { padding-top: 0; }
.ev-pic img, .ev-pic .noimg { width: 132px; height: 99px; object-fit: cover; border-radius: var(--radius); background: var(--petal); display: block; }
.ev-text { display: flex; flex-direction: column; min-width: 0; }
.ev-title { font-weight: 600; line-height: 1.45; }
.ev a:hover .ev-title { color: var(--carnation); }
.ev time { color: var(--mist); font-size: .88rem; }
.ev-ex { color: var(--mist); font-size: .9rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.years { padding: 48px 0; background: var(--petal); }
.year-strip { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.year-strip a { display: flex; flex-direction: column; padding: 10px 16px; background: var(--paper); border-radius: var(--radius); text-decoration: none; color: var(--ink); min-width: 104px; }
.year-strip .yr { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; color: var(--stem); line-height: 1.2; }
.year-strip .yr-n { font-size: .82rem; color: var(--mist); }
.year-strip a:hover .yr { color: var(--carnation); }

.join-band { padding: 56px 0; }
.join-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; }
.sponsors { border-left: 3px solid var(--stem); padding-left: 28px; }
.sponsors h3 { font-size: 1.2rem; }
.sponsors .tier { margin: 16px 0 4px; color: var(--stem); font-weight: 600; }
.sponsors ul { list-style: none; margin: 0; padding: 0; }

/* inner pages */
.page-head { padding: 44px 24px 20px; }
.page-head h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); color: var(--carnation); }
.page-head p { color: var(--mist); max-width: 62ch; }
.year-jump ul { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.year-jump a { display: block; padding: .2em .7em; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-size: .92rem; color: var(--stem); }
.year-jump a:hover { background: var(--petal); }
.events-archive { padding-bottom: 64px; }
.year-group { display: grid; grid-template-columns: 160px 1fr; gap: 32px; padding: 32px 0; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.year-num { font-size: 2.4rem; color: var(--stem); margin: 0; position: sticky; top: 16px; align-self: start; }

.post { padding: 36px 24px 72px; }
.post-back { font-size: .92rem; margin-bottom: 20px; }
.post-head h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.post-date { color: var(--mist); }
.prose { font-size: 1.06rem; }
.prose p { max-width: 70ch; }
.prose h2 { font-size: 1.4rem; margin-top: 1.6em; color: var(--stem); }
.prose h2 .en { font-size: .7em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.photo { margin: 28px 0; }
.photo img { border-radius: var(--radius); margin: 0 auto; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 28px 0; }
.gallery[data-count="2"], .gallery[data-count="4"] { grid-template-columns: repeat(2, 1fr); }
.gallery-item { display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 2px; background: var(--petal); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: opacity .15s; }
.gallery-item:hover img { opacity: .88; }
.video { position: relative; margin: 28px 0; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.file a::before { content: "PDF "; font-size: .75em; font-weight: 700; color: var(--paper); background: var(--carnation); padding: 1px 5px; border-radius: 2px; margin-right: 8px; vertical-align: 2px; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.post-nav a { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); font-weight: 600; line-height: 1.5; }
.post-nav a span { font-weight: 400; font-size: .85rem; color: var(--mist); }
.post-nav .older { grid-column: 2; text-align: right; }
.post-nav a:hover { color: var(--carnation); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(20, 14, 15, .92); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: calc(100vw - 120px); max-height: calc(100vh - 80px); object-fit: contain; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; font-size: 2rem; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; line-height: 1; }
.lightbox button:hover { background: rgba(255, 255, 255, .24); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #fff; font-size: .9rem; margin: 0; }

.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; padding-bottom: 48px; }
.about-photo { margin: 0; }
.about-photo img { border-radius: var(--radius); }
.petal-band { background: var(--petal); padding: 48px 0; }
.logo-grid { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
.logo-big { width: 220px; background: #fff; border-radius: 50%; padding: 8px; }
.board-now { padding: 48px 24px 64px; }
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 32px; margin: 0 0 20px; }
.roles div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.roles dt { font-size: .85rem; color: var(--mist); }
.roles dd { margin: 0; font-weight: 600; }
.boards { padding-bottom: 64px; }
.board { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding: 32px 0; border-top: 1px solid var(--line); }
.board .year-num { font-size: 1.7rem; }
.board figure { margin: 0 0 20px; max-width: 640px; }
.board figure img { border-radius: var(--radius); }
.board p { color: var(--mist); }

.join-page { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding-bottom: 72px; }
.join-page h2 { font-size: 1.5rem; }
.fees { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.fees th, .fees td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.fees th span { color: var(--mist); font-size: .88em; }
.fees td { text-align: right; font-weight: 600; white-space: nowrap; }
.note { color: var(--mist); font-size: .92rem; }
.steps ol { padding-left: 1.3em; margin-bottom: 32px; }
.steps li { margin-bottom: .6em; }
.notfound { padding: 80px 24px; }

.footer { background: var(--ink); color: #E9DFE1; padding: 44px 0 20px; margin-top: 0; }
.footer a { color: #fff; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; font-size: .95rem; }
.footer-name { font-family: var(--serif); font-weight: 700; color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-small { margin-top: 28px; font-size: .8rem; color: #B9AAAD; }

@media (max-width: 900px) {
  .latest-grid, .join-grid, .about-grid, .join-page { grid-template-columns: 1fr; gap: 36px; }
  .intro-grid { grid-template-columns: 1fr; padding-left: 0; }
  .sponsors { border-left: 0; border-top: 3px solid var(--stem); padding: 24px 0 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .logo-grid { grid-template-columns: 1fr; }
  .logo-big { width: 160px; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .masthead-inner { min-height: 68px; gap: 10px; }
  .brand img { width: 42px; height: 42px; }
  .brand-zh { font-size: 1rem; }
  .brand-en { font-size: .72rem; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: none; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
  .nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; content: ""; }
  .nav-toggle .bars::before { position: absolute; top: -6px; }
  .nav-toggle .bars::after { position: absolute; top: 6px; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 68px; background: var(--paper); border-bottom: 1px solid var(--line); z-index: 5; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 8px 16px 16px; gap: 2px; }
  .site-nav a { padding: .7em .6em; font-size: 1.05rem; }
  .site-nav .nav-join { margin: 8px 0 0; }
  .site-nav .btn { text-align: center; }
  .masthead { position: relative; }
  .hero { padding-top: 20px; }
  .hero-grid { gap: 14px; }
  .hero-name .v { font-size: 1.95rem; letter-spacing: .04em; }
  .hero-photo { min-height: 0; }
  .hero-cap { padding: 48px 16px 14px; }
  .ev a { grid-template-columns: 96px 1fr; gap: 14px; }
  .ev-pic img, .ev-pic .noimg { width: 96px; height: 72px; }
  .year-group, .board { grid-template-columns: 1fr; gap: 12px; }
  .year-num { position: static; font-size: 2rem; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .older { grid-column: 1; text-align: left; }
  .lightbox img { max-width: 100vw; max-height: calc(100vh - 140px); }
  .lb-prev, .lb-next { top: auto; bottom: 40px; transform: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .masthead, .footer, .post-nav, .lightbox { display: none; } }

/* Traditional / Simplified switch */
.script-switch { order: 3; display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 40px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--stem); text-decoration: none; font-size: .95rem; font-weight: 600; }
.script-switch:hover { background: var(--petal); color: var(--carnation); }
.site-nav { order: 2; }
.nav-toggle { order: 4; }
@media (max-width: 760px) { .script-switch { height: 44px; min-width: 48px; } }
.script-switch, .brand-zh { white-space: nowrap; }
@media (max-width: 440px) {
  .masthead-inner { gap: 8px; }
  .brand-en { display: none; }
  .brand-zh { font-size: 1.02rem; }
}

/* Join page: online form button */
.steps .form-cta { margin: .6rem 0 .4rem; }
.steps ol ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.steps ol ul li { margin: .25rem 0; }
