/* 翡 · shared Apple-inspired design system */
:root {
  --accent: #007aff;
  --accent-hover: #0071e3;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --line: #e5e5ea;
  --paper: #f5f5f7;
  --card: rgba(255, 255, 255, .92);
  --shadow: 0 18px 42px rgba(0, 0, 0, .07);
  --radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); color: var(--ink); }
body.modal-open { overflow: hidden; }
button, select, input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
a { color: inherit; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; }

/* header */
.site-header { position: sticky; top: 0; z-index: 60; min-height: 72px; display: grid; grid-template-columns: 180px 1fr 260px; align-items: center; gap: 24px; padding: 0 clamp(22px, 5vw, 76px); background: rgba(255, 255, 255, .78); border-bottom: 1px solid rgba(0, 0, 0, .08); box-shadow: 0 5px 22px rgba(0, 0, 0, .04); backdrop-filter: saturate(180%) blur(18px); }
.brand { display: inline-flex; align-items: center; width: max-content; text-decoration: none; color: var(--ink); font-size: 27px; font-weight: 700; letter-spacing: .1em; }
.brand:hover { opacity: .7; }
.main-nav { display: flex; justify-content: center; align-items: center; gap: 6px; }
.nav-link { min-height: 38px; display: inline-flex; align-items: center; padding: 0 15px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .18s ease, color .18s ease; }
.nav-link:hover { color: var(--ink); background: #f2f2f7; }
.nav-link.active { color: var(--accent); background: #eaf3ff; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.round-btn { display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.round-btn:hover { transform: translateY(-1px); }
.donate-head, .profile-btn { width: 36px; height: 36px; border-radius: 50%; color: var(--muted); background: #f2f2f7; }
.donate-head:hover, .profile-btn:hover { background: #e8e8ed; color: var(--ink); }
.icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; color: var(--muted); background: #f2f2f7; cursor: pointer; transition: background .18s ease; }
.icon-btn:hover { background: #e8e8ed; color: var(--ink); }
.language-btn { min-height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 13px; border: 0; border-radius: 10px; color: var(--ink); background: #f2f2f7; cursor: pointer; font-size: 12px; }
.language-btn span { max-width: 62px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* layout */
.page { width: min(1320px, 100%); margin: 0 auto; padding: 52px clamp(18px, 4vw, 48px) 72px; }
.page-narrow { width: min(980px, 100%); margin: 0 auto; padding: 52px clamp(18px, 4vw, 48px) 72px; }
.section { margin-top: 68px; }
.section:first-child { margin-top: 0; }
.section-head { margin-bottom: 26px; }
.section-eyebrow { display: block; margin-bottom: 8px; color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.section-title { margin: 0; font-size: clamp(24px, 2.6vw, 34px); font-weight: 600; letter-spacing: -.025em; }
.section-desc { margin: 10px 0 0; max-width: 620px; color: var(--faint); font-size: 14px; line-height: 1.65; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: 11px; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease; }
.btn-primary { color: #fff; background: var(--accent); box-shadow: 0 8px 20px rgba(0, 122, 255, .22); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost { color: var(--ink); background: #fff; border-color: #d2d2d7; }
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }
.btn-quiet { color: var(--accent); background: #eaf3ff; }
.btn-quiet:hover { background: #dceafd; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: 9px; }

/* cards */
.card { background: var(--card); border: 1px solid rgba(0, 0, 0, .07); border-radius: var(--radius); box-shadow: var(--shadow); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

/* footer */
.site-footer { padding: 40px 20px 48px; border-top: 1px solid var(--line); background: #f5f5f7; text-align: center; }
.footer-donate { min-height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 0 18px; border: 0; border-radius: 9px; color: #fff; background: var(--ink); font-size: 12px; font-weight: 600; cursor: pointer; }
.footer-donate:hover { background: #3a3a3c; }
.footer-links { margin: 24px 0 16px; display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 12px; }
.footer-links a:hover { color: var(--ink); }
.footer-link-btn { padding: 0; border: 0; background: none; color: var(--muted); font-family: inherit; font-size: 12px; line-height: inherit; text-align: inherit; cursor: pointer; appearance: none; -webkit-appearance: none; }
.footer-link-btn:hover { color: var(--ink); }
.copyright { margin: 0; color: var(--muted); font-size: 12px; }

/* toast */
.toast { position: fixed; left: 50%; top: 84px; z-index: 150; transform: translate(-50%, -16px); padding: 11px 18px; border-radius: 12px; color: #fff; background: rgba(29, 29, 31, .92); box-shadow: 0 12px 32px rgba(0, 0, 0, .18); backdrop-filter: blur(12px); font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1080px) {
  .site-header { grid-template-columns: 120px 1fr 200px; padding-inline: 24px; }
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .site-header { min-height: 96px; grid-template-columns: 1fr auto; grid-template-rows: 42px 38px; gap: 4px 12px; padding: 8px 16px 7px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .nav-link { min-height: 32px; padding: 0 10px; font-size: 13px; }
  .brand { font-size: 24px; }
  .page, .page-narrow { padding: 30px 14px 52px; }
  .section { margin-top: 48px; }
  .grid-3, .grid-5, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 520px) {
  .grid-3, .grid-5, .grid-4 { grid-template-columns: 1fr; }
  .header-actions { gap: 5px; }
  .language-btn { padding: 0 10px; }
  .language-btn span { max-width: 52px; }
}

