:root {
  --yw-paper: #f8f6f1;
  --yw-surface: #fcfbf7;
  --yw-surface-glass: rgba(252, 251, 247, 0.88);
  --yw-ink: #18243b;
  --yw-muted: #6c7380;
  --yw-line: rgba(24, 36, 59, 0.12);
  --yw-navy: #243b68;
  --yw-blue: #416b96;
  --yw-teal: #438f8c;
  --yw-coral: #d86c48;
  --yw-gold: #ddb24c;
  --yw-shadow: 0 18px 50px rgba(24, 36, 59, 0.10);
  --yw-shadow-card: 0 8px 24px rgba(24, 36, 59, 0.05);
  --yw-tint-blue-soft: rgba(65, 107, 150, 0.06);
  --yw-tint-blue-hover: rgba(65, 107, 150, 0.11);
  --yw-control-line: rgba(65, 107, 150, 0.28);
  --yw-space-1: 4px;
  --yw-space-2: 8px;
  --yw-space-3: 12px;
  --yw-space-4: 16px;
  --yw-space-6: 24px;
  --yw-space-8: 32px;
  --yw-space-12: 48px;
  --yw-radius-control: 8px;
  --yw-radius-card: 14px;
  --yw-radius-table: 16px;
  --yw-radius-panel: 20px;
  --yw-radius-hero: 24px;
  --yw-radius-pill: 999px;
  --yw-control-sm: 36px;
  --yw-control-md: 40px;
  --yw-control-lg: 44px;
  --yw-directory-action-width: 108px;
  --yw-directory-action-width-mobile: 124px;
  --yw-directory-platform-column: 18%;
  --yw-directory-quota-column: 52%;
  --yw-directory-reference-column: 15%;
  --yw-directory-action-column: 15%;
  --yw-directory-label-min: 84px;
  --yw-directory-clamp-lines: 3;
  --yw-font-label: 12px;
  --yw-font-control: 13px;
  --yw-font-body: 16px;
  --yw-font-hero-compact: 26px;
  --yw-transition-fast: 160ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--yw-ink);
  background: var(--yw-paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: var(--yw-font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a,
button,
summary {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(65, 107, 150, 0.42);
  outline-offset: 3px;
}

.site-nav {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  padding: 16px clamp(20px, 5vw, 68px);
  border-bottom: 1px solid var(--yw-line);
  background: rgba(248, 246, 241, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  color: var(--yw-ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-works {
  margin-left: -0.08em;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.projects-summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--yw-ink);
  background: transparent;
  font: inherit;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 160ms ease;
}

.nav-link:hover,
.projects-summary:hover {
  background: rgba(255, 255, 255, 0.72);
}

.projects-menu {
  position: relative;
}

.projects-summary {
  list-style: none;
}

.projects-summary::-webkit-details-marker {
  display: none;
}

.projects-summary::after {
  content: "⌄";
  margin-left: 7px;
  font-size: 12px;
  transition: transform 160ms ease;
}

.projects-menu[open] .projects-summary::after {
  transform: rotate(180deg);
}

.projects-summary.is-active {
  color: var(--yw-navy);
  background: var(--yw-tint-blue-soft);
  font-weight: 600;
}

.projects-list {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  padding: 8px;
  border: 1px solid var(--yw-line);
  border-radius: 16px;
  background: rgba(252, 251, 247, 0.98);
  box-shadow: var(--yw-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.project-item {
  display: block;
  padding: 12px 13px;
  border-radius: 11px;
  color: var(--yw-ink);
  text-decoration: none;
  transition: background 160ms ease;
}

.project-item:hover {
  background: rgba(65, 107, 150, 0.10);
}

.project-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

.project-meta {
  display: block;
  margin-top: 4px;
  color: var(--yw-muted);
  font-size: 12px;
}

.glass-card {
  border: 1px solid var(--yw-line);
  background: var(--yw-surface-glass);
  box-shadow: var(--yw-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.yw-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--yw-control-sm);
  padding: 0 var(--yw-space-4);
  border: 1px solid var(--yw-control-line);
  border-radius: var(--yw-radius-control);
  color: var(--yw-navy);
  background: var(--yw-tint-blue-soft);
  font: inherit;
  font-size: var(--yw-font-control);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color var(--yw-transition-fast),
    background var(--yw-transition-fast),
    border-color var(--yw-transition-fast);
}

.yw-button:hover {
  border-color: var(--yw-blue);
  background: var(--yw-tint-blue-hover);
}

.yw-button--primary {
  border-color: var(--yw-navy);
  color: var(--yw-navy);
  background: var(--yw-surface);
}

.yw-button--primary:hover {
  color: #fff;
  background: var(--yw-navy);
}

.yw-button--secondary {
  color: var(--yw-navy);
}

.yw-button--ghost {
  border-color: transparent;
  color: var(--yw-ink);
  background: transparent;
}

.yw-language-switch {
  display: inline-flex;
  min-height: var(--yw-control-sm);
  align-items: center;
  justify-content: center;
  padding: 0 var(--yw-space-3);
  border: 1px solid var(--yw-line);
  border-radius: var(--yw-radius-pill);
  color: var(--yw-ink);
  background: rgba(252, 251, 247, 0.72);
  font: inherit;
  font-size: var(--yw-font-control);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background var(--yw-transition-fast),
    border-color var(--yw-transition-fast);
}

.yw-language-switch:hover {
  border-color: var(--yw-blue);
  background: var(--yw-surface);
}

.yw-text-link {
  display: inline-flex;
  align-items: baseline;
  gap: var(--yw-space-1);
  color: var(--yw-blue);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  border-bottom: 1px solid rgba(65, 107, 150, 0.32);
  transition:
    color var(--yw-transition-fast),
    border-color var(--yw-transition-fast);
}

.yw-text-link:hover {
  color: var(--yw-navy);
  border-color: var(--yw-navy);
}

.yw-text-link--external::after {
  content: "↗";
  font-size: 0.86em;
}

.yw-disclosure {
  display: inline-flex;
  align-items: center;
  gap: var(--yw-space-1);
  min-height: var(--yw-control-sm);
  padding: 0;
  border: 0;
  color: var(--yw-blue);
  background: transparent;
  font: inherit;
  font-size: var(--yw-font-control);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.yw-disclosure::after {
  content: "＋";
  font-size: 0.9em;
}

.yw-disclosure[aria-expanded="true"]::after {
  content: "−";
}

.yw-disclosure:hover {
  color: var(--yw-navy);
}

.site-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--yw-line);
  color: var(--yw-muted);
  font-size: 13px;
}

.site-footer-legal {
  display: block;
  margin-top: 6px;
}

.site-footer-legal:first-child {
  margin-top: 0;
}

.site-footer-global {
  width: min(1180px, calc(100% - 32px));
  margin-right: auto;
  margin-bottom: 32px;
  margin-left: auto;
}

.qr-dialog {
  width: min(calc(100% - 32px), 360px);
  padding: 0;
  border: 1px solid var(--yw-line);
  border-radius: 24px;
  color: var(--yw-ink);
  background: var(--yw-surface);
  box-shadow: var(--yw-shadow);
}

.qr-dialog::backdrop {
  background: rgba(19, 28, 45, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.qr-content {
  padding: 24px;
  text-align: center;
}

.qr-title {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
}

.qr-copy {
  margin: 8px 0 18px;
  color: var(--yw-muted);
  font-size: 14px;
  line-height: 1.6;
}

.qr-image {
  display: block;
  width: min(100%, 250px);
  height: auto;
  margin: 0 auto 20px;
  border: 10px solid #fff;
  border-radius: 14px;
  outline: 1px solid var(--yw-line);
}

.close-button {
  width: 100%;
}

@media (max-width: 640px) {
  .site-nav {
    min-height: 66px;
    padding: 12px 16px;
  }

  .brand {
    font-size: 14px;
  }

  .nav-link,
  .projects-summary {
    min-height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }

  .yw-language-switch {
    min-height: var(--yw-control-sm);
    padding: 0 var(--yw-space-3);
  }

  .projects-list {
    width: 196px;
  }
}

@media (max-width: 360px) {
  .site-nav {
    gap: 6px;
    padding: 10px;
  }

  .brand {
    font-size: 13px;
    letter-spacing: 0.1em;
  }

  .nav-links {
    gap: 1px;
  }

  .nav-link,
  .projects-summary {
    min-height: 36px;
    padding: 0 7px;
    font-size: 12px;
  }

  .yw-language-switch {
    min-height: var(--yw-control-sm);
    padding: 0 var(--yw-space-2);
    font-size: var(--yw-font-label);
  }

  .projects-summary::after {
    margin-left: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
