.team-section,
.team-dialog {
  --team-ink: #162a40;
  --team-body: #52606d;
  --team-line: #dbe0e4;
  color: var(--team-ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  letter-spacing: 0;
}

[data-team-lang="en"] { display: none; }
html[lang^="en"] [data-team-lang="zh"] { display: none; }
html[lang^="en"] [data-team-lang="en"] { display: revert; }

.team-section { padding: 64px 0 72px; background: #fff; scroll-margin-top: 88px; }
.team-heading { padding-top: 32px; border-top: 1px solid var(--team-line); margin-bottom: 34px; }
.team-heading h2 { font-size: 30px; font-weight: 600; line-height: 1.45; margin: 0; }
.team-heading p { max-width: 680px; margin: 10px 0 0; color: var(--team-body); font-size: 15px; line-height: 1.9; }
.team-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 40px 28px; }
.team-member { grid-column: span 2; min-width: 0; }
.team-member:nth-child(5) { grid-column: 2 / span 2; }
.team-member summary { display: block; list-style: none; cursor: pointer; text-align: left; border-radius: 2px; }
.team-member summary::-webkit-details-marker { display: none; }
.team-member summary:focus-visible { outline: 3px solid #c51e2f; outline-offset: 6px; }
.team-portrait { display: block; position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; background: #f3f5f6; }
.team-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform 350ms ease; }
.team-preview { position: absolute; inset: auto 0 0; padding: 18px; background: rgba(16, 36, 56, .95); color: #fff; font-size: 14px; line-height: 1.75; opacity: 0; transform: translateY(12px); transition: opacity 280ms ease, transform 280ms ease; pointer-events: none; }
.team-name { display: block; margin: 17px 0 5px; font-size: 21px; line-height: 1.4; font-weight: 700; overflow-wrap: anywhere; }
.team-role { display: block; min-height: 24px; color: var(--team-body); font-size: 14px; line-height: 1.65; }
.team-action { display: inline-flex; align-items: center; min-height: 44px; gap: 12px; color: var(--team-ink); font-size: 13px; text-decoration: underline; text-decoration-color: var(--team-line); text-underline-offset: 5px; }
.team-member summary:active .team-action { color: #c51e2f; }
.team-member summary:focus-visible .team-preview { opacity: 1; transform: none; }
.team-member.is-dismissed .team-preview { opacity: 0 !important; transform: translateY(12px); }
.team-biography { padding-top: 20px; }
.team-biography h3 { margin: 24px 0 10px; font-size: 16px; font-weight: 700; line-height: 1.5; }
.team-biography h3:first-child { margin-top: 0; }
.team-biography p { margin: 0 0 14px; color: var(--team-body); font-size: 15px; line-height: 1.95; overflow-wrap: anywhere; }
.team-biography .team-focus { color: var(--team-ink); }

/* 使用原生对话框管理焦点与背景不可交互状态；移动端保留独立的关闭栏。 */
body.team-dialog-open { overflow: hidden; }
.team-dialog { width: min(780px, calc(100% - 48px)); max-height: calc(100dvh - 64px); margin: auto; padding: 0; border: 0; border-radius: 4px; background: #fff; box-shadow: 0 24px 80px rgba(16, 36, 56, .22); overflow: hidden; }
.team-dialog[open] { display: flex; flex-direction: column; }
.team-dialog::backdrop { background: rgba(16, 36, 56, .6); }
.team-dialog-bar { display: flex; flex: 0 0 auto; justify-content: space-between; align-items: center; gap: 20px; padding: 10px 20px 10px 32px; border-bottom: 1px solid var(--team-line); }
.team-dialog-label { font-size: 13px; color: var(--team-body); }
.team-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 2px; background: transparent; color: var(--team-ink); font: inherit; font-size: 28px; cursor: pointer; transition: background 200ms ease; }
.team-close:hover { background: #f3f5f6; }
.team-close:active { background: #dbe0e4; }
.team-close:focus-visible { outline: 2px solid #c51e2f; outline-offset: 0; }
.team-dialog-body { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 28px 32px 32px; }
.team-dialog-person { display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: center; gap: 24px; }
.team-dialog-person img { display: block; width: 100px; height: 125px; object-fit: cover; object-position: top; border-radius: 2px; }
.team-dialog-person h2 { margin: 0 0 8px; font-size: 26px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.team-dialog-person p { color: var(--team-body); font-size: 15px; margin: 0; line-height: 1.7; }

@media (hover: hover) and (pointer: fine) {
  .team-member summary:hover .team-portrait img { transform: scale(1.03); }
  .team-member summary:hover .team-preview { opacity: 1; transform: none; }
  .team-member summary:hover .team-action { text-decoration-color: #c51e2f; }
}
@media (max-width: 1100px) {
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; margin-inline: auto; gap: 36px 28px; }
  .team-member, .team-member:nth-child(5) { grid-column: auto; }
  .team-member:last-child { grid-column: 1 / -1; width: calc((100% - 28px) / 2); justify-self: center; }
}
@media (max-width: 640px) {
  .team-section { padding-block: 36px 46px; }
  .team-heading { padding-top: 24px; margin-bottom: 26px; }
  .team-heading h2 { font-size: 25px; }
  .team-heading p { font-size: 14px; }
  .team-grid { gap: 28px 16px; }
  .team-member:last-child { width: calc((100% - 16px) / 2); }
  .team-name { font-size: 18px; margin-top: 12px; }
  .team-role { font-size: 13px; }
  .team-preview { display: none; }
  .team-dialog { width: 100%; max-height: calc(100dvh - 28px); max-width: none; margin: auto 0 0; border-radius: 8px 8px 0 0; }
  .team-dialog-bar { padding: 8px 16px 8px 20px; }
  .team-dialog-body { padding: 24px 20px max(28px, env(safe-area-inset-bottom)); }
  .team-dialog-person { grid-template-columns: 80px minmax(0, 1fr); gap: 18px; }
  .team-dialog-person img { width: 80px; height: 100px; }
  .team-dialog-person h2 { font-size: 23px; }
}
@media (prefers-reduced-motion: no-preference) {
  .team-dialog[open] { animation: team-dialog-enter 260ms ease both; }
  .team-dialog.is-closing { animation: team-dialog-exit 200ms ease both; pointer-events: none; }
  @keyframes team-dialog-enter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  @keyframes team-dialog-exit { to { opacity: 0; transform: translateY(12px); } }
}
@media (prefers-reduced-motion: reduce) {
  .team-portrait img, .team-preview, .team-dialog { transition: none !important; animation: none !important; transform: none !important; }
}
