/* 实战库统一查看器：所有作战地图与执行 SOP 共用这一套视觉和交互。 */

.playbook-page { background: #F5F7FA; }
.playbook-hero { padding-block: 48px 44px; border-bottom: 1px solid #DCE3EC; background: #FFFFFF; }
.playbook-hero__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: 48px; align-items: end; }
.playbook-hero__title { max-width: 820px; font-size: clamp(36px, 5vw, 60px); font-weight: 900; line-height: 1.12; letter-spacing: -.03em; color: #111111; }
.playbook-hero__desc { max-width: 760px; margin-top: 16px; color: #5C6573; font-size: 18px; line-height: 1.8; }
.playbook-hero__meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.playbook-hero__meta span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; background: #F0F4F9; color: #526071; font-size: 13px; font-weight: 600; }
.playbook-brief { display: grid; gap: 1px; overflow: hidden; border: 1px solid #DCE3EC; border-radius: 18px; background: #DCE3EC; }
.playbook-brief > div { display: grid; gap: 6px; padding: 18px 20px; background: #FFFFFF; }
.playbook-brief span { color: #657083; font-size: 12px; font-weight: 700; }
.playbook-brief strong { color: #172033; font-size: 14px; line-height: 1.65; }

.playbook-viewer { min-height: 640px; background: #F5F7FA; }
.playbook-tools { position: sticky; top: var(--header-h); z-index: 20; border-bottom: 1px solid #DCE3EC; background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px) saturate(1.3); }
.playbook-tools__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.playbook-search { display: flex; align-items: center; gap: 10px; width: min(520px, 100%); min-height: 42px; padding: 0 14px; border: 1px solid #CAD4E0; border-radius: 12px; background: #FFFFFF; color: #657083; }
.playbook-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.playbook-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #111111; font-size: 15px; }
.playbook-search output { flex-shrink: 0; color: #657083; font-size: 12px; font-variant-numeric: tabular-nums; }
.playbook-tools__actions { display: flex; align-items: center; gap: 6px; }
.playbook-tools__actions button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: #4F5B6B; font-size: 13px; font-weight: 650; cursor: pointer; }
.playbook-tools__actions button:hover { background: #F0F4F9; color: var(--brand); }

.playbook-track { overflow-x: auto; border-bottom: 1px solid #DCE3EC; background: #0B1830; scrollbar-width: thin; }
.playbook-track__inner { display: flex; align-items: stretch; width: max-content; min-width: min(100%, var(--wrap)); padding-block: 14px; }
.playbook-track a { position: relative; display: flex; min-width: 120px; align-items: center; gap: 9px; padding: 5px 18px 5px 10px; color: #B9C9E4; text-decoration: none; white-space: nowrap; }
.playbook-track a::after { content: ""; position: absolute; right: 1px; top: 50%; width: 24px; height: 1px; background: #334565; }
.playbook-track a:last-child::after { display: none; }
.playbook-track a span { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border: 1px solid #536685; border-radius: 50%; color: #D9E5F8; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.playbook-track a strong { margin-right: 14px; color: inherit; font-size: 13px; font-weight: 650; }
.playbook-track a:hover, .playbook-track a[aria-current="step"] { color: #FFFFFF; text-decoration: none; }
.playbook-track a[aria-current="step"] span { border-color: var(--brand); background: var(--brand); color: #FFFFFF; box-shadow: 0 0 0 4px rgba(0, 102, 255, .2); }

.playbook-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; padding-block: 40px 80px; }
.playbook-outline { position: sticky; top: calc(var(--header-h) + 92px); max-height: calc(100vh - var(--header-h) - 120px); overflow: auto; padding: 18px; border: 1px solid #DCE3EC; border-radius: 16px; background: #FFFFFF; }
.playbook-outline > p { margin-bottom: 10px; color: #657083; font-size: 12px; font-weight: 750; }
.playbook-outline ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.playbook-outline a { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 9px; color: #354052; font-size: 13px; text-decoration: none; }
.playbook-outline a:hover { background: #F0F4F9; color: var(--brand); text-decoration: none; }
.playbook-outline a[aria-current="step"] { background: var(--brand-soft); color: #004FCA; font-weight: 750; }
.playbook-outline a span { width: 24px; color: #7D8999; font-size: 11px; font-weight: 750; }
.playbook-outline a[aria-current="step"] span { color: inherit; }
.playbook-stages { display: grid; gap: 24px; min-width: 0; }
.playbook-no-results { padding: 48px 24px; border: 1px dashed #B9C5D2; border-radius: 18px; background: #FFFFFF; color: #657083; text-align: center; }

.playbook-stage { scroll-margin-top: calc(var(--header-h) + 88px); overflow: hidden; border: 1px solid #DCE3EC; border-radius: 22px; background: #FFFFFF; box-shadow: 0 14px 36px rgba(26, 48, 78, .055); }
.playbook-stage__head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 18px; padding: 26px 28px 22px; border-bottom: 1px solid #E6EBF1; background: linear-gradient(135deg, #FFFFFF 0%, #F7FAFF 100%); }
.playbook-stage__number { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: #0B1830; color: #FFFFFF; font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 10px 22px rgba(11, 24, 48, .16); }
.playbook-stage__labels { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 7px; }
.playbook-stage__labels span { padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: #0052CC; font-size: 11px; font-weight: 750; }
.playbook-stage__labels span + span { background: #EEF1F5; color: #657083; }
.playbook-stage__head h2 { color: #111111; font-size: 26px; font-weight: 900; letter-spacing: -.01em; }
.playbook-stage__head p { margin-top: 6px; color: #657083; font-size: 14px; }
.playbook-groups { padding: 4px 28px 18px; }
.playbook-group { border-bottom: 1px solid #E6EBF1; }
.playbook-group:last-child { border-bottom: 0; }
.playbook-group summary { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 4px; color: #1D2635; font-size: 16px; font-weight: 750; cursor: pointer; list-style: none; }
.playbook-group summary::-webkit-details-marker { display: none; }
.playbook-group summary::before { content: "+"; display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; margin-right: -8px; border-radius: 7px; background: #EEF3FA; color: #3C516D; font-size: 18px; font-weight: 500; }
.playbook-group[open] summary::before { content: "−"; background: var(--brand-soft); color: var(--brand); }
.playbook-group summary > span:first-of-type { flex: 1; }
.playbook-group__meta { display: inline-flex; align-items: center; gap: 8px; }
.playbook-group__meta small { color: #7D8999; font-size: 11px; font-weight: 550; white-space: nowrap; }
.playbook-group__meta em { font-style: normal; }
.playbook-group__note { margin: -2px 4px 12px 40px; color: #657083; font-size: 13px; }
.playbook-items { display: grid; gap: 1px; margin: 0 0 16px 40px; padding: 0; overflow: hidden; border: 1px solid #E3E9F0; border-radius: 13px; background: #E3E9F0; list-style: none; }
.playbook-items li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 16px; background: #FBFCFE; }
.playbook-item__mark { width: 7px; height: 7px; margin-top: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.playbook-items strong { color: #1D2635; font-size: 14px; font-weight: 750; }
.playbook-items p { margin-top: 3px; color: #657083; font-size: 13px; line-height: 1.65; }
.playbook-tag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 999px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.playbook-tag--must { background: #E6F0FF; color: #0052CC; }
.playbook-tag--tip { background: #E6F7EF; color: #14744B; }
.playbook-tag--adv { background: #F0ECFF; color: #5C43B7; }
.playbook-tag--warn { background: #FFF2D9; color: #8A5900; }
.playbook-tag--no { background: #FDE8E6; color: #B42318; }
.playbook-viewer.is-searching mark { background: #FFF0A8; }

.card--playbook { min-height: 380px; border-color: #DCE3EC; box-shadow: 0 12px 30px rgba(21, 45, 78, .05); }
.card--playbook:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(0, 102, 255, .1); }
.playbook-card__visual { position: relative; min-height: 126px; overflow: hidden; background: #0B1830; }
.playbook-card__visual::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 24px 24px; }
.playbook-card__icon { position: absolute; left: 24px; top: 27px; z-index: 1; display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 16px; background: var(--brand); color: #FFFFFF; box-shadow: 0 12px 24px rgba(0, 102, 255, .28); }
.playbook-card__icon .icon { width: 28px; height: 28px; }
.playbook-card__route { position: absolute; right: 24px; top: 52px; z-index: 1; display: flex; align-items: center; }
.playbook-card__route i { position: relative; width: 38px; height: 2px; background: #526887; }
.playbook-card__route i::before { content: ""; position: absolute; left: 0; top: 50%; width: 9px; height: 9px; border: 2px solid #8298B8; border-radius: 50%; background: #0B1830; transform: translateY(-50%); }
.playbook-card__route i:last-child { width: 10px; background: transparent; }
.playbook-card__route i:last-child::before { border-color: var(--brand); background: var(--brand); }

@media (max-width: 900px) {
  .playbook-hero__grid { grid-template-columns: 1fr; gap: 28px; }
  .playbook-brief { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .playbook-layout { grid-template-columns: 1fr; }
  .playbook-outline { display: none; }
}

@media (max-width: 767px) {
  .playbook-hero { padding-block: 32px 30px; }
  .playbook-hero__title { font-size: 36px; }
  .playbook-hero__desc { font-size: 16px; }
  .playbook-brief { grid-template-columns: 1fr; }
  .playbook-tools { top: 0; }
  .playbook-tools__inner { min-height: 0; flex-direction: column; align-items: stretch; gap: 8px; padding-block: 10px; }
  .playbook-tools__actions { justify-content: flex-end; }
  .playbook-track a { min-width: 104px; padding-inline: 8px 14px; }
  .playbook-layout { padding-block: 24px 56px; }
  .playbook-stage { scroll-margin-top: 120px; border-radius: 18px; }
  .playbook-stage__head { grid-template-columns: 48px minmax(0, 1fr); gap: 14px; padding: 20px 18px 18px; }
  .playbook-stage__number { width: 46px; height: 46px; border-radius: 13px; font-size: 15px; }
  .playbook-stage__head h2 { font-size: 22px; }
  .playbook-groups { padding-inline: 18px; }
  .playbook-group summary { gap: 10px; font-size: 15px; }
  .playbook-group__meta small { display: none; }
  .playbook-group__note, .playbook-items { margin-left: 0; }
  .playbook-items li { grid-template-columns: auto minmax(0, 1fr); }
  .playbook-items li > .playbook-tag { grid-column: 2; justify-self: start; }
}
