.mbody {
  height: 100vh;
  overflow: hidden;
}

.mexit {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 40;
}

.manual-stage {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 38px 16px 74px;
}

.book {
  width: min(860px, 95vw);
  height: min(calc(100vh - 116px), 1180px);
  background: linear-gradient(180deg, #f8f3e8, #ece2cf);
  color: #1c1a15;
  border-radius: 14px;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.65), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  display: flex;
  font-family: var(--font);
  animation: bookIn 0.4s ease;
}

.book::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 9px;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(180deg, #d0343d, #7c1c22);
}

@keyframes bookIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.mpage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 22px 30px 16px 42px;
}

.m-top {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 2px solid rgba(28, 26, 21, 0.55);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.m-brand {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #7a715c;
}

.m-sec {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #b5232b;
  text-align: right;
}

.m-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.m-foot {
  flex: 0 0 auto;
  text-align: right;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: #8a806a;
  padding-top: 8px;
  margin-top: 6px;
  border-top: 1px dashed rgba(28, 26, 21, 0.3);
}

.cover {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
  padding: 30px 34px;
}

.cover-logo {
  width: min(400px, 80%);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.cover-line {
  width: 74%;
  height: 2px;
  background: #1c1a15;
}

.mtitle {
  font-family: var(--mono);
  font-size: clamp(24px, 5vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}

.mver {
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #b5232b;
  font-weight: 700;
}

.mfoot {
  font-size: 12.5px;
  color: #6a6250;
  margin-top: 10px;
}

.vcard {
  border: 1.5px solid rgba(28, 26, 21, 0.25);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.4);
}

.vc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1c1a15;
  color: #f4efe4;
  padding: 6px 12px;
}

.vc-ic {
  font-size: 15px;
}

.vc-name {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 13px;
}

.vc-row {
  display: grid;
  grid-template-columns: 12px 162px 1fr;
  align-items: center;
  gap: 10px;
  padding: 5px 12px;
  border-top: 1px solid rgba(28, 26, 21, 0.12);
  font-size: 13px;
}

.vc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.vc-range {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12.5px;
  white-space: nowrap;
}

.vc-lbl {
  color: #4b4535;
}

.sev-ok .vc-dot { background: #1f9d4d; }
.sev-mild .vc-dot { background: #d3a017; }
.sev-mod .vc-dot { background: #dd6a12; }
.sev-crit .vc-dot { background: #cc2531; }

.sev-ok .vc-range { color: #167a37; }
.sev-mild .vc-range { color: #9a7508; }
.sev-mod .vc-range { color: #b8560c; }
.sev-crit .vc-range { color: #b5232b; }

.sev-crit {
  background: rgba(204, 37, 49, 0.07);
}

.m-content.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: minmax(min-content, 1fr);
  align-content: stretch;
  gap: 12px;
}

.dcard {
  border: 1.5px solid rgba(28, 26, 21, 0.22);
  border-left: 5px solid #b5232b;
  border-radius: 10px;
  padding: clamp(8px, 1.4vh, 13px) 16px;
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.m-content.grid2 .dcard:last-child {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - 6px);
}

.dc-name {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(12.5px, 1.85vh, 16px);
  letter-spacing: 0.3px;
  color: #1c1a15;
  margin-bottom: clamp(4px, 0.8vh, 7px);
  line-height: 1.2;
}

.dc-kv {
  font-size: clamp(10.5px, 1.6vh, 14px);
  line-height: 1.45;
  color: #26231b;
  margin-top: clamp(3px, 0.7vh, 6px);
}

.kv-ic {
  margin-right: 5px;
}

.kv-lbl {
  font-family: var(--mono);
  font-size: clamp(9px, 1.25vh, 11px);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-right: 5px;
}

.kv-pattern .kv-lbl { color: #1f6f8b; }
.kv-remedy .kv-lbl { color: #1f7a3d; }

.kv-remedy {
  background: rgba(31, 122, 61, 0.09);
  border-radius: 7px;
  padding: 6px 9px;
  margin-top: 7px;
}

.howto {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.howto-lead {
  font-size: 15px;
  line-height: 1.6;
  color: #26231b;
  background: rgba(255, 255, 255, 0.45);
  border: 1.5px solid rgba(28, 26, 21, 0.2);
  border-radius: 10px;
  padding: 14px 16px;
}

.howto-lead b {
  color: #b5232b;
}

.howto-steps {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 14px;
}

.hstep {
  position: relative;
  border: 1.5px solid rgba(28, 26, 21, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.42);
  padding: 14px 16px 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
}

.hstep-n {
  position: absolute;
  top: 8px;
  right: 12px;
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 700;
  color: rgba(181, 35, 43, 0.16);
  line-height: 1;
}

.hstep-b {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hstep-ic {
  font-size: 26px;
}

.hstep-t {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #1c1a15;
}

.hstep-d {
  font-size: 13px;
  line-height: 1.5;
  color: #3a3527;
}

.howto-note {
  flex: 0 0 auto;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: #7c1c22;
  background: rgba(181, 35, 43, 0.09);
  border: 1.5px dashed rgba(124, 28, 34, 0.5);
  border-radius: 10px;
  padding: 12px 14px;
}

.mnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  z-index: 30;
  background: linear-gradient(0deg, rgba(5, 7, 10, 0.92), transparent);
}

.mnav button {
  appearance: none;
  cursor: pointer;
  font-family: var(--display);
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 14px;
  padding: 11px 22px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: rgba(14, 17, 22, 0.9);
  color: var(--silver);
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.mnav button:hover {
  border-color: var(--red);
  color: #fff;
  transform: translateY(-2px);
}

.mnav button:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}

.mnav .home {
  background: linear-gradient(135deg, var(--red), #9c111a);
  border-color: transparent;
  color: #fff;
}

@media (max-width: 620px) {
  .howto-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .mbody {
    height: auto;
    overflow-y: auto;
  }

  .mpage {
    padding: 16px 14px 14px 18px;
  }

  .manual-stage {
    height: auto;
    min-height: 100vh;
    align-items: flex-start;
    padding: 44px 10px 96px;
  }

  .book {
    height: auto;
    min-height: auto;
    width: 96vw;
    padding: 0;
  }

  .m-content {
    overflow: visible;
  }

  .m-content.grid2 {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .m-content.grid2 .dcard:last-child {
    grid-column: auto;
    justify-self: stretch;
    width: auto;
  }

  .dcard {
    padding: 10px 14px;
    justify-content: flex-start;
  }

  .dc-name {
    font-size: 15px;
  }

  .dc-kv {
    font-size: 13px;
  }

  .cover {
    min-height: 62vh;
  }

  .howto {
    height: auto;
  }

  .vc-row {
    grid-template-columns: 10px minmax(80px, 42%) 1fr;
    font-size: 12.5px;
  }

  .vc-range {
    white-space: normal;
  }

  .mnav {
    gap: 8px;
    padding: 10px;
  }

  .mnav button {
    padding: 9px 13px;
    font-size: 12px;
    letter-spacing: 0.5px;
  }
}
