/* 延续原作品集的纸色与墨绿；详情用独立命名，避免影响首页。 */
dialog#projectDialog { width: min(1220px, calc(100% - 36px)); max-height: calc(100dvh - 36px); border-radius: 22px; padding: 0; background: #fffefa; color: #252b23; overflow-y: auto; }
#projectDialog .modal-wrap { display: block; max-height: none; padding: 0 42px 40px; overflow: visible; }
#projectDialog .modal-top { position: sticky; top: 0; z-index: 5; margin: 0 -42px 0; padding: 24px 42px 20px; background: #fffefa; border-bottom: 1px solid #deded3; align-items: center; }
#projectDialog .modal-top h3 { margin: 7px 0 0; font-size: clamp(25px, 3vw, 36px); line-height: 1.35; padding-right: 14px; }
#projectDialog .modal-close { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; font-size: 29px; background: #efeee6; color: #252b23; }
#projectDialog #modalContent { overflow: visible; padding: 0; }
.v2-prd, .v2-gallery { font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; font-size: 15px; line-height: 1.85; }
.v2-prd p, .v2-gallery p { margin: 0; color: #535b51; }
.v2-prd p, .v2-prd li { font-size: 15px !important; line-height: 1.9; }
.v2-prd a, .v2-gallery a { color: #2f5b43; }
.v2-prd button, .v2-gallery button { font: inherit; cursor: pointer; }
.v2-hero { padding: 28px 0 25px; border-bottom: 1px solid #deded3; }
.v2-topline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: #6d766a; font-size: 12px; letter-spacing: .03em; }
.project-live-label, .v2-live-label { display: inline-flex; align-items: center; align-self: flex-start; padding: 3px 10px; border: 1px solid #cedcc7; border-radius: 4px; background: #eaf1e6; color: #34573c; font: 12px/1.7 'PingFang SC', 'Microsoft YaHei', sans-serif; }
.project-live-label { margin-top: 8px; }
.v2-metric-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 22px; }
.v2-metric-card { padding: 18px 20px; border: 1px solid #dce4d3; border-radius: 8px; background: #fffefa; min-width: 0; }
.v2-metric-card strong { display: block; margin-bottom: 5px; color: #2f5b43; font: 600 clamp(21px, 2.1vw, 28px)/1.45 Georgia, 'Microsoft YaHei', sans-serif; font-variant-numeric: tabular-nums; }
.v2-metric-card span { display: block; color: #687561; font-size: 12px; line-height: 1.7; }
.v2-acceptance h5 { margin: 18px 0 12px; color: #2f5b43; font-size: 14px; font-weight: 600; }
.v2-acceptance > .v2-table-wrap { border: 1px solid #dce1d4; border-radius: 8px; }
.v2-acceptance > .v2-table-wrap .v2-table { min-width: 0; }
.v2-acceptance > .v2-table-wrap td:last-child { font-weight: 600; color: #2f5b43; width: 45%; }
.v2-review .v2-metric-cards { margin-top: 0; }
.project-content > .project-result { margin-top: 14px; color: #2f5b43; font-size: 15px; font-weight: 600; }
.v2-status { padding: 3px 10px; background: #eaf1e6; color: #34573c; border-radius: 4px; font-size: 12px; }
.v2-hero .v2-summary { margin-top: 14px; max-width: 820px; font-family: 'Songti SC', 'STSong', 'SimSun', serif; font-size: clamp(21px, 2.3vw, 27px) !important; color: #252b23; line-height: 1.6; }
.v2-stance { margin-top: 14px !important; color: #2f5b43 !important; font-weight: 600; }
.v2-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px; margin: 20px 0 0; }
.v2-facts dt { font-size: 12px; color: #737b70; }
.v2-facts dd { margin: 2px 0 0; color: #303a30; font-size: 14px; }
.v2-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.v2-actions button, .v2-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 18px; border: 1px solid #bfc9b9; border-radius: 7px; background: transparent; color: #2f5b43; font-size: 13px; line-height: 1.5; text-decoration: none; }
.v2-actions .v2-primary { background: #2f5b43; color: #fffefa; border-color: #2f5b43; }
.v2-actions :is(a,button):hover { background: #eaf1e6; color: #254a35; }
.v2-prd .v2-note { margin-top: 18px !important; padding: 12px 15px; border-left: 2px solid #829678; background: #f3f5ec; font-size: 13px !important; line-height: 1.8; color: #52614e !important; }
.v2-layout { display: grid; grid-template-columns: 170px minmax(0,1fr); gap: 32px; align-items: start; }
.v2-nav { position: sticky; top: 135px; display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding-top: 27px; font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; }
.v2-nav .v2-nav-label { margin: 0 0 9px 10px; font-size: 10px; letter-spacing: .12em; color: #80887b; }
.v2-nav a { display: flex; gap: 10px; padding: 8px 10px; color: #687061; font-size: 13px; line-height: 1.6; text-decoration: none; border-left: 2px solid transparent; border-radius: 0 5px 5px 0; }
.v2-nav a span { color: #8b947f; font-variant-numeric: tabular-nums; font-size: 11px; margin-top: 2px; }
.v2-nav a.active, .v2-nav a:hover { color: #2f5b43; background: #eff3e9; border-color: #2f5b43; }
.v2-nav a.active { font-weight: 600; }
.v2-main { min-width: 0; }
.v2-section { padding: 30px 0; border-bottom: 1px solid #e2e3d9; scroll-margin-top: 138px; }
.v2-section-label { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; color: #718065; font-size: 11px; letter-spacing: .1em; }
.v2-section-label span { color: #2f5b43; font-weight: 700; }
.v2-section h4 { margin: 0 0 18px; color: #293b2a; font-family: 'Songti SC', 'STSong', 'SimSun', serif; font-size: 25px; font-weight: 600; line-height: 1.5; }
.v2-pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
.v2-pair h5 { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: #293b2a; }
.v2-pair p { font-size: 14px; }
.v2-boundary { margin-top: 18px !important; padding: 12px 16px; background: #f5f1e7; border-radius: 7px; font-size: 13px; }
.v2-boundary strong { color: #735f3f; }
.v2-details { margin-top: 18px; border: 1px solid #dce1d4; border-radius: 8px; overflow: hidden; }
.v2-details summary { padding: 12px 15px; cursor: pointer; color: #2f5b43; font-size: 13px; font-weight: 600; background: #f3f5ed; }
.v2-details summary:hover { background: #eaf0e2; }
.v2-details > .v2-details-body { padding: 16px; }
.v2-table-wrap { overflow-x: auto; max-width: 100%; }
.v2-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.8; text-align: left; }
.v2-table th { background: #f5f6ef; color: #54634c; font-weight: 600; }
.v2-table :is(th,td) { padding: 11px 14px; border-bottom: 1px solid #e5e8dd; vertical-align: top; }
.v2-table td { color: #4f594a; }
.v2-table tbody tr:last-child td { border-bottom: 0; }
.v2-table td:first-child { min-width: 72px; color: #2c442f; }
.v2-flow { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; counter-reset: flow; }
.v2-flow li { position: relative; border-top: 1px solid #d8ddce; padding: 14px 0 16px 35px; counter-increment: flow; }
.v2-flow li::before { content: counter(flow, decimal-leading-zero); position: absolute; left: 0; top: 17px; color: #8e9a83; font: 12px Georgia,serif; }
.v2-actor { display: inline-block; color: #607255; font-size: 11px; margin-bottom: 3px; }
.v2-flow strong { display: block; font-size: 14px; font-weight: 600; color: #2e3b2b; }
.v2-flow p { font-size: 13px !important; margin-top: 4px; }
.v2-prompt { margin-top: 14px; padding: 18px 20px; border-left: 3px solid #56734c; background: #f2f5ec; }
.v2-prompt dl { margin: 0; display: grid; grid-template-columns: 54px 1fr; gap: 8px 12px; }
.v2-prompt dt { color: #667c5b; font-size: 12px; }
.v2-prompt dd { margin: 0; color: #344830; font-size: 13px; }
.v2-list { padding-left: 19px; margin: 0; color: #535b51; font-size: 14px; }
.v2-list li + li { margin-top: 7px; }
.v2-prd .v2-muted { color: #75806c !important; font-size: 12px !important; margin-top: 12px !important; }
.v2-review { background: #f3f5ec; border: 0; padding: 25px; margin-top: 26px; border-radius: 10px; }
.v2-review h4 { font-size: 23px; }
.v2-review .v2-lesson { padding-top: 15px; margin-top: 18px; border-top: 1px solid #d6decb; color: #2f5b43; font-family: 'Songti SC','SimSun',serif; font-size: 20px !important; }
.v2-gallery { padding-top: 23px; }
.v2-gallery .screenshot-grid { margin-top: 23px; }
.v2-gallery .screenshot-card { border-radius: 12px; }
.v2-version { margin-top: 24px !important; text-align: right; font-size: 11px; color: #808b75 !important; }
#projectDialog :is(a,button,summary):focus-visible { outline: 2px solid #2f5b43; outline-offset: 4px; }
.project-stage-label { display: inline-block; color: #486342; font-size: 12px; margin-bottom: 10px; }
@media (max-width: 800px) {
  dialog#projectDialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 14px; }
  #projectDialog .modal-wrap { padding: 0 20px 25px; }
  #projectDialog .modal-top { margin: 0 -20px; padding: 16px 20px; }
  #projectDialog .modal-top h3 { font-size: 24px; }
  #projectDialog .modal-top .eyebrow { font-size: 10px; }
  .v2-layout { display: block; }
  .v2-nav { position: static; flex-direction: row; overflow-x: auto; padding: 15px 0; border-bottom: 1px solid #dde2d2; gap: 5px; }
  .v2-nav .v2-nav-label { display: none; }
  .v2-nav a { flex: 0 0 auto; padding: 8px 10px; font-size: 12px; border-left: 0; border-bottom: 2px solid transparent; }
  .v2-facts { gap: 12px; }
  .v2-section { scroll-margin-top: 135px; padding: 25px 0; }
  .v2-review { padding: 20px; }
}
@media (max-width: 520px) {
  .v2-metric-cards { grid-template-columns: 1fr; gap: 9px; }
  .v2-metric-card { padding: 14px 16px; }
  .v2-acceptance > .v2-table-wrap::before { display: none; }
  .v2-pairs, .v2-facts, .v2-flow { grid-template-columns: 1fr; }
  .v2-summary { font-size: 22px; }
  .v2-section h4 { font-size: 23px; }
  .v2-flow li { padding-bottom: 13px; }
  .v2-table { min-width: 470px; }
  .v2-table-wrap { scrollbar-width: thin; }
  .v2-table-wrap::before { content: '← 左右滑动查看完整表格 →'; display: block; color: #6c7c62; font-size: 11px; padding: 0 0 7px; }
  .v2-prompt { padding: 15px; }
}
@media (prefers-reduced-motion: reduce) { #projectDialog * { scroll-behavior: auto !important; } }
@media print {
  body:has(#projectDialog[open]) > :not(#projectDialog) { display: none !important; }
  #projectDialog[open] { position: static; width: 100%; max-height: none; overflow: visible; border: 0; }
  #projectDialog .modal-top { position: static; }
  .v2-nav, .v2-actions, #projectDialog .modal-close { display: none; }
  .v2-layout { display: block; }
  .v2-section { break-inside: avoid; }
}

/* 二次弹层只引导联系，不把“我知道了”当作下载授权。 */
dialog.prd-contact-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #dce1d4; border-radius: 20px; background: #fffefa; overflow-y: auto; color: #293b2a; }
.prd-contact-dialog::backdrop { background: rgba(26,34,26,.38); backdrop-filter: blur(4px); }
.prd-contact-body { position: relative; padding: 32px; }
.prd-contact-kicker { font-size: 11px; letter-spacing: .08em; color: #698062; margin-bottom: 13px; }
.prd-contact-body h3 { margin: 0 34px 16px 0; font-size: 25px !important; line-height: 1.45; }
.prd-contact-body p { margin: 0; font-size: 14px !important; color: #5b6654; line-height: 1.9; }
.prd-contact-close { position: absolute; top: 17px; right: 17px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #eff0e8; font-size: 24px; cursor: pointer; }
.prd-contact-body .prd-contact-project { margin-top: 18px; padding: 10px 13px; background: #eff4e9; color: #2f5b43; border-left: 2px solid #6f8c61; }
.prd-contact-info { display: grid; gap: 10px; margin: 20px 0 24px; font-size: 14px; }
.prd-contact-info div { display: grid; grid-template-columns: 60px minmax(0,1fr); gap: 10px; }
.prd-contact-info dt { color: #7a8471; }
.prd-contact-info dd { margin: 0; overflow-wrap: anywhere; user-select: text; }
.prd-contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.prd-contact-actions button { min-height: 42px; padding: 9px 18px; border: 1px solid #bcc9b4; border-radius: 7px; background: transparent; color: #2f5b43; font-size: 14px; cursor: pointer; }
.prd-contact-actions .prd-contact-copy { background: #2f5b43; border-color: #2f5b43; color: #fffefa; }
.prd-contact-body .prd-contact-feedback { margin-top: 14px; font-size: 12px !important; }
.prd-contact-dialog button:focus-visible { outline: 2px solid #2f5b43; outline-offset: 3px; }
@media (max-width: 520px) { .prd-contact-body { padding: 27px 22px; } }
