:root {
  --paper: #f6f8fc;
  --surface: #fff;
  --ink: #17243a;
  --muted: #5f6f85;
  --blue: #2563eb;
  --line: rgb(23 36 58 / 11%);
  --blue-wash: rgb(37 99 235 / 7%);
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; min-width: 320px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
p, h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }
::selection { color: var(--ink); background: rgb(37 99 235 / 15%); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }
.page-width { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 10; top: 12px; left: 12px; padding: 12px 18px; color: var(--surface); background: var(--ink); border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.site-header { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 15px; font-weight: 650; letter-spacing: -.04em; }
.wordmark img { border-radius: 50%; width: 32px; height: 32px; }
.header-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 28px; font-size: 13px; color: var(--muted); }
.header-nav a { padding-block: 10px; transition: color 150ms ease; }
.header-nav a:hover, .site-footer a:hover { color: var(--blue); }
.external-link span { display: inline-block; margin-left: 3px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: start; gap: 72px; padding-block: 60px 72px; }
.letter { padding-top: 36px; }
.identity-label { display: flex; align-items: center; gap: 11px; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .065em; line-height: 1.6; }
.identity-label span { width: 24px; height: 2px; background: var(--blue); }
h1 { margin-top: 22px; font-size: clamp(52px, 5.1vw, 72px); font-weight: 680; line-height: 1.18; letter-spacing: -.055em; }
.letter-copy { max-width: 410px; margin-top: 30px; font-size: 16px; line-height: 1.95; color: var(--muted); }
.letter-thanks { margin-top: 10px; font-size: 16px; line-height: 1.95; color: var(--muted); }
.signature { display: flex; align-items: center; gap: 14px; margin-top: 36px; }
.signature-portrait { width: 56px; height: 56px; border-radius: 50%; }
.signature-name { font-family: var(--mono); font-size: 19px; font-weight: 600; letter-spacing: -.055em; line-height: 1.4; }
.signature-role { margin-top: 5px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.profile-copy { max-width: 400px; margin-top: 16px; font-size: 14px; line-height: 1.85; color: var(--muted); }
.sponsor-panel { min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 12px 36px rgb(23 36 58 / 3%); }
.sponsor-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.sponsor-heading > img { width: 32px; height: 32px; flex: 0 0 auto; }
.section-label { font-size: 11px; line-height: 1.6; color: var(--muted); letter-spacing: .035em; }
.sponsor-heading h2 { margin-top: 5px; font-size: 21px; font-weight: 650; line-height: 1.5; letter-spacing: -.035em; }
.payment-tabs { display: flex; gap: 4px; margin-top: 22px; padding: 4px; border-radius: 10px; background: var(--paper); }
.payment-tabs button { flex: 1 1 0; padding: 9px 8px; min-height: 40px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); font-size: 14px; line-height: 1.4; transition: background 150ms ease, color 150ms ease; }
.payment-tabs button[aria-selected="true"] { background: var(--surface); border-color: var(--line); color: var(--blue); font-weight: 600; box-shadow: 0 1px 3px rgb(23 36 58 / 3%); }
.payment-tabs button:hover { color: var(--blue); }
.payment-tabs button:focus-visible { position: relative; z-index: 1; outline-offset: 2px; }
.payment-panel { margin-top: 14px; }
.payment-panel:focus-visible { outline-offset: 4px; border-radius: 4px; }
.qr-stage { display: flex; align-items: center; justify-content: center; width: 100%; height: 324px; }
.qr-open { display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 4px; background: var(--surface); cursor: zoom-in; }
.payment-image { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.qr-hint { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }
.image-actions { display: flex; gap: 10px; margin-top: 16px; }
.image-action { flex: 1 1 0; display: flex; justify-content: center; align-items: center; gap: 5px; min-height: 40px; padding: 9px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 12px; line-height: 1.6; transition: color 150ms ease, background 150ms ease, border-color 150ms ease; }
.image-action:hover { border-color: rgb(37 99 235 / 25%); color: var(--blue); background: var(--blue-wash); }
.image-action span { font-size: 15px; line-height: 1; }
.sponsor-note { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.9; text-align: center; }
.sponsor-note a { color: var(--blue); text-underline-offset: 3px; }
.sponsor-note a:hover { text-decoration: underline; }
.noscript-note { margin-top: 16px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.noscript-note a { color: var(--blue); text-decoration: underline; }
.projects { border-top: 1px solid var(--line); padding-top: 36px; padding-bottom: 54px; }
.projects-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.projects h2 { margin-top: 7px; font-size: 24px; font-weight: 650; line-height: 1.5; letter-spacing: -.035em; }
.text-link { color: var(--blue); font-size: 12px; line-height: 1.8; white-space: nowrap; text-underline-offset: 4px; }
.text-link:hover { text-decoration: underline; }
.text-link span { margin-left: 3px; }
.project-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 32px; }
.project { min-width: 0; padding-right: 28px; }
.project + .project { border-left: 1px solid var(--line); padding-left: 30px; }
.project:last-child { padding-right: 0; }
.project-logo { width: 40px; height: 40px; object-fit: contain; object-position: left center; }
.project h3 { margin-top: 17px; font-family: var(--mono); font-size: 17px; font-weight: 600; letter-spacing: -.05em; line-height: 1.6; overflow-wrap: anywhere; }
.project p { margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.project .text-link { display: inline-block; margin-top: 14px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; padding-block: 26px 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.8; }
.site-footer > p { font-family: var(--mono); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 23px; }
.site-footer a { transition: color 150ms ease; }
.qr-dialog { width: min(760px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 20px; overflow: auto; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--surface); box-shadow: 0 24px 100px rgb(23 36 58 / 15%); }
.qr-dialog::backdrop { background: rgb(23 36 58 / 55%); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-heading h2 { font-size: 15px; font-weight: 600; line-height: 1.5; }
.dialog-heading form { margin: 0; }
.dialog-close { display: flex; justify-content: center; align-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--muted); font-size: 27px; font-weight: 300; line-height: 1; }
.dialog-close:hover { background: var(--paper); color: var(--ink); }
.dialog-image-area { display: flex; align-items: center; justify-content: center; margin-top: 14px; }
.dialog-image-area img { max-width: 100%; max-height: calc(100dvh - 188px); width: auto; height: auto; object-fit: contain; }
.dialog-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; }
.dialog-footer p { color: var(--muted); font-size: 12px; line-height: 1.7; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: minmax(0, 1fr) 390px; gap: 36px; }
  h1 { font-size: 58px; }
  .letter { padding-top: 28px; }
  .sponsor-panel { padding: 23px; }
}

@media (max-width: 800px) {
  .page-width { width: min(560px, calc(100% - 40px)); }
  .site-header { min-height: 82px; gap: 14px; }
  .wordmark { gap: 8px; font-size: 14px; }
  .wordmark img { width: 28px; height: 28px; }
  .header-nav { gap: 18px; font-size: 12px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 38px; padding-block: 40px 44px; }
  .letter { padding-top: 0; }
  .identity-label { font-size: 10px; }
  h1 { margin-top: 18px; font-size: clamp(46px, 9vw, 64px); }
  .letter-copy { margin-top: 22px; max-width: 420px; font-size: 15px; line-height: 1.9; }
  .letter-thanks { margin-top: 7px; font-size: 15px; }
  .signature { margin-top: 24px; }
  .signature-portrait { width: 46px; height: 46px; }
  .signature-name { font-size: 17px; }
  .signature-role { font-size: 12px; margin-top: 3px; }
  .profile-copy { max-width: 440px; margin-top: 12px; font-size: 13px; }
  .sponsor-panel { padding: 24px; }
  .qr-stage { height: 340px; }
  .projects { padding-top: 28px; padding-bottom: 30px; }
  .projects h2 { font-size: 22px; }
  .project-list { grid-template-columns: minmax(0, 1fr); margin-top: 24px; }
  .project, .project:last-child { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 17px; padding: 23px 0; }
  .project + .project { padding: 23px 0; border-left: 0; border-top: 1px solid var(--line); }
  .project:first-child { padding-top: 0; }
  .project h3 { margin-top: 0; font-size: 16px; }
  .project p { margin-top: 5px; font-size: 13px; }
  .project .text-link { margin-top: 9px; }
  .site-footer { align-items: start; flex-direction: column; gap: 12px; padding-block: 24px 30px; }
  .site-footer nav { gap: 9px 20px; }
}

@media (max-width: 400px) {
  .page-width { width: calc(100% - 36px); }
  .site-header { align-items: start; flex-direction: column; justify-content: center; gap: 7px; padding-block: 17px 11px; }
  .header-nav { width: 100%; justify-content: space-between; gap: 14px; }
  .header-nav a { padding-block: 5px; }
  .hero { padding-top: 32px; }
  h1 { font-size: 46px; }
  .letter-copy, .letter-thanks { font-size: 14px; }
  .sponsor-panel { padding: 19px; border-radius: 14px; }
  .sponsor-heading h2 { font-size: 19px; }
  .sponsor-heading > img { width: 28px; height: 28px; }
  .section-label { font-size: 10px; }
  .qr-stage { height: 306px; }
  .image-action { font-size: 11px; }
  .projects-heading { align-items: center; gap: 10px; }
  .projects h2 { font-size: 20px; }
  .project, .project:last-child { grid-template-columns: 34px minmax(0, 1fr); gap: 14px; }
  .project-logo { width: 34px; height: 34px; }
  .qr-dialog { padding: 15px; width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
  .dialog-image-area img { max-height: calc(100dvh - 175px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
