.guide-main { width: min(1180px, calc(100% - 32px)); }
.guide-hero { align-items: center; }
.guide-hero h1 { max-width: 850px; font-size: clamp(38px, 6.6vw, 70px); }

.core-mod-note {
  display: flex;
  gap: 9px 14px;
  align-items: baseline;
  margin: 0 0 18px;
  padding: 13px 15px;
  border: 1px solid #bcd8cf;
  border-left: 4px solid var(--green);
  border-radius: 9px;
  background: #edf7f4;
  color: #315e55;
  line-height: 1.55;
}
.core-mod-note strong { flex: 0 0 auto; color: var(--green-dark); }

.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}
.focus-card {
  display: grid;
  min-height: 126px;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 4px 10px;
  align-content: start;
  padding: 17px;
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 22px #1d3a320d;
}
.focus-card:hover, .focus-card:focus-visible { border-color: var(--green); background: #f4fbf8; }
.focus-card > span { grid-row: 1 / 3; color: var(--green); font-size: 12px; font-weight: 900; }
.focus-card b { font-size: 19px; }
.focus-card small { color: var(--muted); line-height: 1.45; }

.emergency-panel {
  display: grid;
  grid-template-columns: minmax(210px, .38fr) 1fr;
  gap: 24px;
  margin: 24px 0;
  padding: 22px;
  border: 1px solid #e6c29d;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff7ed, #fff 54%);
  box-shadow: var(--shadow);
}
.emergency-panel h2 { margin: 0; font-size: 27px; }
.emergency-list { display: grid; gap: 8px; }
.emergency-link {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}
.emergency-link:hover, .emergency-link:focus-visible { border-color: var(--amber); outline: none; }
.emergency-link > span:first-child { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: #fff0df; color: var(--amber); font-size: 11px; font-weight: 900; }
.emergency-link small { color: var(--muted); }

.quick-tips-panel {
  scroll-margin-top: 84px;
  margin: 24px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.quick-tips-heading { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-bottom: 16px; }
.quick-tips-heading h2 { margin: 0; font-size: clamp(26px, 4vw, 38px); }
.quick-tips-heading p:last-child { max-width: 820px; margin: 8px 0 0; color: var(--muted); line-height: 1.65; }
.quick-tips-count { flex: 0 0 auto; padding: 6px 10px; border: 1px solid #bcd8cf; border-radius: 999px; background: #edf7f4; color: var(--green-dark); font-size: 11px; font-weight: 900; }
.quick-tips-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; }
.quick-tips-table { width: 100%; border-collapse: collapse; background: #fff; }
.quick-tips-table th, .quick-tips-table td { padding: 12px 13px; border-bottom: 1px solid #e7eeea; text-align: left; vertical-align: top; line-height: 1.55; }
.quick-tips-table th { background: var(--paper-2); color: var(--green-dark); font-size: 11px; letter-spacing: .04em; white-space: nowrap; }
.quick-tips-table td { color: #536861; font-size: 12px; }
.quick-tips-table td:first-child { width: 17%; color: var(--ink); font-weight: 900; }
.quick-tips-table td:nth-child(2) { width: 31%; color: #315e55; }
.quick-tips-table td:last-child { width: 17%; }
.quick-tips-table tr:last-child td { border-bottom: 0; }
.quick-tips-table tbody tr:hover { background: #f7fbf9; }
.tip-proof { display: inline-flex; margin: 2px 4px 2px 0; padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; background: #f7faf8; color: var(--muted); font-size: 9px; font-weight: 900; white-space: nowrap; }
.tip-proof.server-observed { border-color: #e6c29d; background: #fff0df; color: var(--amber); }
.tip-proof.current-client { border-color: #bcd8cf; background: #edf7f4; color: var(--green-dark); }

.manual-search { position: sticky; z-index: 5; top: 62px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.filter-button { min-height: 44px; padding: 0 12px; font-size: 12px; font-weight: 800; }
.filter-button.active { border-color: var(--green); background: #e4f3ed; color: var(--green-dark); }

.guide-sections { display: grid; gap: 24px; min-width: 0; }
.manual-section { min-width: 0; scroll-margin-top: 160px; }
.manual-section[hidden] { display: none; }
.section-heading {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}
.section-number { display: grid; width: 50px; height: 50px; place-items: center; border-radius: 12px; background: var(--green); color: #fff; font-size: 17px; font-weight: 900; }
.section-heading h2 { margin: 0; font-size: clamp(28px, 4vw, 40px); }
.section-heading p { margin: 5px 0 0; color: var(--muted); line-height: 1.55; }
.section-count { align-self: start; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); font-size: 11px; font-weight: 900; white-space: nowrap; }
.step-list { display: grid; min-width: 0; gap: 10px; }

.current-base-card {
  min-width: 0;
  scroll-margin-top: 170px;
  margin-bottom: 12px;
  padding: 20px;
  border: 1px solid #a9d0c3;
  border-radius: 12px;
  background: linear-gradient(135deg, #edf7f4, #fff 62%);
  box-shadow: 0 12px 30px #1d3a3212;
}
.current-base-heading { display: flex; min-width: 0; justify-content: space-between; gap: 18px; align-items: start; }
.current-base-heading h3 { margin: 0; color: var(--green-dark); font-size: clamp(24px, 3.5vw, 34px); }
.current-base-heading p:last-child { max-width: 820px; margin: 7px 0 0; color: #47685f; line-height: 1.65; }
.base-updated { flex: 0 0 auto; padding: 6px 9px; border: 1px solid #bcd8cf; border-radius: 999px; background: #fff; color: var(--green-dark); font-size: 10px; font-weight: 900; }
.base-facts { display: grid; min-width: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.base-fact, .crop-fact { min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.base-fact small, .crop-fact small { display: block; color: #71817c; font-size: 10px; font-weight: 900; }
.base-fact b, .crop-fact b { display: block; margin-top: 4px; color: var(--ink); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.base-fact span, .crop-fact span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.base-action-grid { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.base-action-grid section { padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.base-action-grid h4 { margin: 0 0 8px; color: var(--green-dark); }
.base-action-grid ul { margin: 0; padding-left: 18px; }
.base-action-grid li { color: #536861; line-height: 1.55; }
.base-action-grid li + li { margin-top: 8px; }
.base-action-grid li b, .base-action-grid li span { display: block; }
.base-action-grid li span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.base-jump { min-height: 44px; margin-top: 7px; padding: 0 11px; font-size: 11px; }

.crop-browser { min-width: 0; margin: 20px 0 10px; padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.crop-browser-heading { display: flex; min-width: 0; justify-content: space-between; gap: 16px; align-items: center; }
.crop-browser-heading h3 { margin: 0; font-size: 23px; }
.crop-filter-clear { flex: 0 0 auto; min-height: 44px; padding: 0 13px; font-size: 11px; font-weight: 900; }
.crop-filter-grid { display: grid; min-width: 0; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin-top: 13px; }
.crop-filter { display: grid; min-width: 0; gap: 4px; }
.crop-filter span { color: var(--muted); font-size: 10px; font-weight: 900; }
.crop-filter select { width: 100%; min-width: 0; min-height: 44px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); }
.crop-grid { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.crop-card { align-self: start; }
.crop-card[open] { grid-column: 1 / -1; }
.crop-index { border-color: #d8c7a9; background: #fff7ed; color: var(--amber); }
.crop-facts { display: grid; min-width: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.crop-layout { min-width: 0; padding: 13px; border: 1px solid #bcd8cf; border-radius: 9px; background: #f4fbf8; }
.crop-layout h3 { margin: 0 0 8px; font-size: 13px; }
.crop-layout pre { max-width: 100%; overflow-x: auto; margin: 0; padding: 12px; border-radius: 7px; background: #173a35; color: #eaf5f1; font: 700 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }
.crop-layout p { margin: 8px 0 0; color: #536861; font-size: 11px; line-height: 1.55; }

.manual-step {
  min-width: 0;
  scroll-margin-top: 170px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 10px 28px #1d3a320c;
}
.manual-step[hidden] { display: none; }
.manual-step[open] { border-color: #bcd8cf; }
.manual-step > summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 82px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}
.manual-step > summary::-webkit-details-marker { display: none; }
.manual-step > summary::after { content: "+"; grid-column: 3; grid-row: 1; align-self: center; justify-self: end; color: var(--green); font-size: 24px; font-weight: 500; }
.manual-step[open] > summary::after { content: "−"; }
.step-index { display: grid; width: 38px; height: 38px; grid-column: 1; grid-row: 1; place-items: center; border: 1px solid #bcd8cf; border-radius: 50%; background: #edf7f4; color: var(--green-dark); font-size: 12px; font-weight: 900; }
.step-heading { min-width: 0; grid-column: 2; grid-row: 1; }
.step-heading b { display: block; font-size: 18px; line-height: 1.35; }
.step-heading small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.4; }
.step-badges { display: flex; grid-column: 3; grid-row: 1; flex-wrap: wrap; justify-content: flex-end; gap: 5px; padding-right: 30px; }
.priority, .verdict, .source-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 900; }
.priority.p0 { border: 1px solid #e6c29d; background: #fff7ed; color: var(--amber); }
.priority.p1 { border: 1px solid #bcd8cf; background: #edf7f4; color: var(--green-dark); }
.priority.p2 { border: 1px solid var(--line); background: var(--paper-2); color: var(--muted); }
.verdict.can-do { background: #dff3eb; color: var(--green-dark); }
.verdict.not-confirmed { background: #fff0df; color: var(--amber); }
.verdict.data-only, .verdict.local-data { background: #eef5ff; color: #285b99; }
.verdict.local-verified { background: #e7f1ff; color: #194f91; }
.source-badge { border: 1px solid var(--line); background: #f7faf8; color: var(--muted); }

.step-body { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 15px; padding: 0 18px 18px 72px; border-top: 1px solid #edf2ef; }
.step-goal { margin: 15px 0 0; color: var(--ink); font-size: 15px; line-height: 1.65; }
.efficiency-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.efficiency-fact { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2); }
.efficiency-fact b { display: block; margin-bottom: 4px; color: var(--green-dark); font-size: 11px; }
.efficiency-fact span { color: var(--muted); font-size: 12px; line-height: 1.55; }
.step-block h3 { margin: 0 0 8px; color: var(--ink); font-size: 13px; letter-spacing: .03em; }
.action-list { margin: 0; padding-left: 22px; }
.action-list li { color: #536861; line-height: 1.65; }
.action-list li + li { margin-top: 7px; }
.step-body.compact { gap: 11px; }
.recipe-gallery { display: grid; min-width: 0; max-width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.recipe-card { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper-2); }
.recipe-card h4 { margin: 0 0 8px; color: var(--green-dark); font-size: 12px; }
.recipe-layout { display: flex; align-items: center; justify-content: center; gap: 10px; }
.crafting-grid { display: grid; grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(3, 44px); gap: 3px; }
.recipe-slot, .recipe-output, .process-node { display: grid; place-items: center; margin: 0; border: 1px solid #cddbd5; border-radius: 7px; background: #fff; }
.recipe-slot { position: relative; width: 44px; height: 44px; }
.recipe-slot.is-empty { background: #edf2ef; box-shadow: inset 0 0 0 1px #fff; }
.recipe-slot img, .recipe-output img, .process-node img { width: 38px; height: 38px; object-fit: contain; padding: 3px; image-rendering: pixelated; }
.recipe-slot small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.recipe-output { width: 76px; min-height: 76px; padding: 5px; text-align: center; }
.recipe-output small, .process-node small { color: var(--ink); font-size: 9px; font-weight: 800; line-height: 1.2; }
.recipe-arrow { color: var(--green); font-size: 22px; }
.recipe-note { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.process-chain { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding: 2px 0 7px; scrollbar-width: thin; }
.process-node { flex: 0 0 68px; min-height: 70px; padding: 5px; text-align: center; }
.process-connector { display: grid; flex: 0 0 auto; justify-items: center; color: var(--green); }
.process-connector small { max-width: 64px; color: var(--muted); font-size: 9px; line-height: 1.2; text-align: center; }
.process-connector b { font-size: 18px; }
.recipe-slot.icon-error img, .recipe-output.icon-error img, .process-node.icon-error img { opacity: .24; }
.guide-figure-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.guide-figure { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #f7faf8; }
.guide-figure img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: #f2f8f5; }
.guide-figure figcaption { display: grid; gap: 3px; padding: 9px 11px 11px; }
.guide-figure figcaption b { color: var(--green-dark); font-size: 12px; }
.guide-figure figcaption span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.item-flow { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.item-group { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper-2); }
.item-group-title { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 900; }
.item-arrow { color: var(--green); font-size: 22px; }
.material-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 7px; }
.material-chip { display: grid; min-width: 0; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 8px; margin: 0; padding: 7px; border: 1px solid #d8e3de; border-radius: 8px; background: #fff; }
.material-chip img { width: 40px; height: 40px; object-fit: contain; padding: 3px; border: 1px solid #d5e0db; border-radius: 7px; background: #eef4f1; image-rendering: pixelated; }
.material-chip figcaption { min-width: 0; }
.material-chip b, .material-chip code, .material-chip small { display: block; }
.material-chip b { font-size: 12px; line-height: 1.35; }
.material-chip code { margin-top: 2px; padding: 0; background: none; color: #71817c; font-size: 8px; line-height: 1.25; word-break: break-all; }
.material-chip small { margin-top: 2px; color: var(--amber); font-size: 9px; }
.material-chip.icon-error img { opacity: .24; }

.step-callout { padding: 11px 13px; border-left: 3px solid var(--green); background: #edf7f4; color: #315e55; line-height: 1.6; }
.step-callout.warning { margin: 0; border-left-color: var(--amber); background: #fff7ed; color: #6f451e; }
.next-step { display: flex; gap: 8px; align-items: baseline; color: var(--muted); line-height: 1.55; }
.next-step b { flex: 0 0 auto; color: var(--green-dark); }
.evidence-details { padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 8px; background: #fbfdfc; }
.evidence-details summary { color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 900; }
.evidence-details ul { margin: 10px 0 0; padding-left: 18px; }
.evidence-details li { color: #71817c; font-size: 11px; line-height: 1.55; }

.evidence-panel { margin-top: 30px; padding: 22px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.evidence-panel h2 { margin: 0; font-size: 26px; }
.evidence-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.evidence-grid > div { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2); }
.evidence-grid b { display: block; margin-top: 10px; }
.evidence-grid p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.manual-error { padding: 20px; border: 1px solid #e6c29d; border-radius: 10px; background: #fff7ed; color: var(--amber); text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }

@media (max-width: 820px) {
  .focus-grid, .evidence-grid, .efficiency-facts, .crop-grid, .guide-figure-gallery { grid-template-columns: 1fr; }
  .emergency-panel { grid-template-columns: 1fr; }
  .manual-search { position: static; }
  .section-heading { grid-template-columns: 50px minmax(0, 1fr); }
  .section-count { grid-column: 2; justify-self: start; }
  .base-facts, .crop-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .guide-main { width: calc(100% - 24px); }
  .guide-hero h1 { font-size: clamp(34px, 10.8vw, 48px); }
  .current-base-card, .crop-browser { padding: 14px 12px; }
  .current-base-heading, .crop-browser-heading { display: grid; gap: 10px; }
  .base-updated, .crop-filter-clear { justify-self: start; }
  .base-action-grid, .base-facts, .crop-facts { grid-template-columns: 1fr; }
  .manual-step > summary { grid-template-columns: 38px minmax(0, 1fr); padding: 12px; }
  .manual-step > summary::after { display: block; grid-column: 1; grid-row: 2; justify-self: center; font-size: 18px; }
  .step-badges { grid-column: 2; grid-row: 2; justify-content: flex-start; padding-right: 0; }
  .step-body { padding: 0 12px 14px; }
  .item-flow { grid-template-columns: 1fr; }
  .recipe-gallery { display: flex; overflow-x: auto; padding-bottom: 7px; scroll-snap-type: x proximity; }
  .recipe-card { flex: 0 0 286px; scroll-snap-align: start; }
  .item-arrow { justify-self: center; transform: rotate(90deg); }
  .material-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .emergency-link { grid-template-columns: 28px minmax(0, 1fr); }
  .emergency-link small { grid-column: 2; }
  .core-mod-note { display: grid; }
  .quick-tips-panel { padding: 16px 12px; }
  .quick-tips-heading { display: grid; gap: 10px; }
  .quick-tips-count { justify-self: start; }
  .quick-tips-table-wrap { overflow: visible; border: 0; }
  .quick-tips-table, .quick-tips-table tbody, .quick-tips-table tr, .quick-tips-table td { display: block; width: 100%; }
  .quick-tips-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .quick-tips-table tbody { display: grid; gap: 9px; }
  .quick-tips-table tr { padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
  .quick-tips-table td, .quick-tips-table td:first-child, .quick-tips-table td:nth-child(2), .quick-tips-table td:last-child { width: auto; padding: 4px 0; border: 0; }
  .quick-tips-table td::before { content: attr(data-label); display: block; margin-bottom: 2px; color: #71817c; font-size: 9px; font-weight: 900; letter-spacing: .06em; }
}

@media (max-width: 400px) { .material-grid { grid-template-columns: 1fr; } }
