:root {
    --ink: #253248;
    --muted: #627086;
    --blue: #1f659f;
    --blue-dark: #16466f;
    --blue-soft: #e9f4fc;
    --amber: #f2a43a;
    --amber-soft: #fff5df;
    --green-soft: #eef7e9;
    --line: #d8e0e8;
    --paper: #ffffff;
    --page: #eef2f5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--page);
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.65;
}

.guideHeader, .guideNav, main, footer {
    width: min(1080px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.guideHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-top: 20px;
    padding: 30px 38px;
    color: white;
    background: linear-gradient(130deg, var(--blue-dark), var(--blue));
    border-radius: 18px 18px 0 0;
}

.eyebrow { margin: 0 0 2px; color: #a9d7f7; font-size: 12px; font-weight: 700; letter-spacing: 1.6px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: 32px; line-height: 1.25; }
h2 { margin-bottom: 5px; font-size: 23px; line-height: 1.35; }
h3 { margin-bottom: 6px; font-size: 17px; }
.lead { margin-bottom: 0; color: #dceefb; }

.closeButton {
    min-width: 82px;
    padding: 9px 20px;
    color: var(--blue-dark);
    background: white;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .15);
}
.closeButton:hover { background: var(--amber-soft); }

.guideNav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #26374a;
}
.guideNav a {
    padding: 13px 18px;
    color: #edf5fb;
    text-align: center;
    text-decoration: none;
    border-right: 1px solid #41556b;
}
.guideNav a:last-child { border-right: 0; }
.guideNav a:hover { background: #344b63; }
.guideNav span { margin-right: 8px; color: #82c5f1; font-size: 12px; font-weight: 800; }

main { padding: 34px 38px 40px; background: var(--paper); }
section { margin-bottom: 48px; scroll-margin-top: 18px; }
.sectionHeading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.sectionHeading > span {
    display: inline-grid;
    flex: 0 0 40px;
    height: 40px;
    place-items: center;
    color: white;
    background: var(--blue);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
}
.sectionHeading p { margin-bottom: 0; color: var(--muted); }

.introGrid, .adminColumns { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }
.goalCard, .modeCard, .adminColumns article {
    padding: 21px 24px;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.goalCard { display: flex; align-items: center; gap: 18px; background: var(--amber-soft); border-left: 5px solid var(--amber); }
.goalCard p, .modeCard p:last-child { margin-bottom: 0; }
.goalIcon {
    display: grid;
    flex: 0 0 62px;
    height: 62px;
    place-items: center;
    color: white;
    background: var(--blue);
    border-radius: 50%;
    font-size: 16px;
    font-weight: 800;
}
.goalIcon.amber { background: var(--amber); font-size: 19px; }
.modeCard { background: #f8fafc; }
.loginNote { margin-top: 14px; padding: 13px 17px; color: var(--muted); background: #f8fafc; border-left: 4px solid var(--blue); border-radius: 7px; }

.supplyCard { margin-top: 17px; padding: 19px 22px; background: var(--blue-soft); border-radius: 12px; }
.supplyChain { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.endpoint, .playerNode { display: flex; min-height: 91px; flex: 1 1 0; align-items: center; justify-content: center; flex-direction: column; padding: 11px; text-align: center; background: white; border: 1px solid #cbdce9; border-radius: 10px; }
.endpoint { background: #e6f0f7; }
.endpoint.customer { background: #fff3dc; border-color: #e9c98b; }
.playerNode img { width: 42px; height: 32px; object-fit: contain; margin-bottom: 3px; }
.endpoint small, .playerNode small { color: var(--muted); font-size: 11px; }
.arrow { color: var(--blue); font-size: 24px; font-weight: 800; }
.flowLabel { font-size: 12px; font-weight: 700; }
.orderFlow { margin-bottom: 9px; color: #80520d; text-align: right; }
.goodsFlow { margin-top: 9px; color: var(--blue-dark); }

.conceptGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-top: 16px; }
.conceptGrid article { position: relative; min-height: 105px; padding: 17px 18px 15px 64px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; }
.conceptGrid img, .costMark { position: absolute; top: 21px; left: 18px; width: 34px; height: 34px; object-fit: contain; }
.costMark { display: grid; place-items: center; color: white; background: var(--amber); border-radius: 50%; font-size: 20px; font-weight: 800; }
.conceptGrid p { margin-bottom: 0; color: var(--muted); font-size: 13px; }

.adminSteps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 17px; }
.adminSteps article { position: relative; padding: 18px; background: #f8fafc; border-top: 4px solid #78a8cc; border-radius: 9px; }
.adminSteps span, .stepCard > span { position: absolute; top: 10px; right: 14px; color: #b8c3cf; font-size: 25px; font-weight: 800; }
.adminSteps p { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.adminColumns table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adminColumns th, .adminColumns td { padding: 8px 9px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.adminColumns th { width: 43%; color: var(--blue-dark); }
ul { margin: 0; padding-left: 21px; }
li + li { margin-top: 6px; }
.warning { margin-top: 15px; padding: 16px 19px; background: #fff1ee; border-left: 4px solid #d26a55; border-radius: 8px; }

.playerGoal { display: flex; align-items: center; gap: 18px; margin-bottom: 17px; padding: 18px 22px; background: var(--amber-soft); border-radius: 10px; }
.playerGoal p { margin-bottom: 0; }
.stepGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stepCard { position: relative; min-height: 200px; padding: 20px; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; }
.stepCard.important { background: #fffaf0; border-color: #efbd6b; }
.stepCard img { width: 36px; height: 36px; object-fit: contain; }
.strategyBlock { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.strategyBlock div { padding: 14px 16px; background: var(--blue-soft); border-radius: 9px; }
.strategyBlock div.external { background: var(--amber-soft); }
.strategyBlock p { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.downloadButton {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 15px;
    color: white;
    background: var(--blue);
    border-radius: 7px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}
.downloadButton:hover { background: var(--blue-dark); }
.strategyBlock .macroHint { margin-top: 8px; color: #80520d; font-size: 11px; }
.strategyNote { margin: 12px 0 0; padding-left: 12px; color: var(--muted); border-left: 3px solid var(--blue); }
.playerColumns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.playerColumns article { padding: 19px 21px; border: 1px solid var(--line); border-radius: 11px; }

.contactCard { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 26px; background: var(--green-soft); border: 1px solid #cfe0c2; border-radius: 12px; }
.contactCard h2 { color: #426633; }
.contactCard p { margin-bottom: 0; }
.contactText { color: #527542; font-weight: 800; }

footer { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding: 16px 38px; color: #dce4ea; background: #26374a; border-radius: 0 0 18px 18px; font-size: 13px; }
.footerClose { padding: 7px 18px; box-shadow: none; }

@media (max-width: 800px) {
    .guideHeader { align-items: flex-start; padding: 24px; }
    main { padding: 26px 24px; }
    .introGrid, .adminColumns, .stepGrid, .playerColumns { grid-template-columns: 1fr; }
    .adminSteps, .strategyBlock { grid-template-columns: repeat(2, 1fr); }
    .supplyChain { align-items: stretch; flex-direction: column; }
    .arrow { transform: rotate(90deg); align-self: center; }
    .orderFlow, .goodsFlow { text-align: center; }
}

@media (max-width: 520px) {
    .guideNav { grid-template-columns: 1fr; }
    .guideNav a { border-right: 0; border-bottom: 1px solid #41556b; }
    .adminSteps, .strategyBlock, .conceptGrid { grid-template-columns: 1fr; }
    .contactCard, footer { align-items: flex-start; flex-direction: column; }
}

@media print {
    body { background: white; }
    .guideHeader, .guideNav, main, footer { width: 100%; }
    .guideHeader { margin-top: 0; }
    .closeButton { display: none; }
    article, .supplyCard, .contactCard { break-inside: avoid; }
}
