.resonance-material-panel {
  --resmat-ink: #173f48;
  --resmat-muted: #668087;
  --resmat-line: rgba(43, 96, 101, .16);
  --resmat-paper: #fbfdfc;
  color: var(--resmat-ink);
}

.resmat-hero {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) minmax(260px, .75fr);
  gap: 24px;
  align-items: center;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--resmat-line);
  border-radius: 24px;
  background: #eaf3f0;
}

.resmat-hero > figure {
  height: 190px;
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #d8e9e5;
}

.resmat-hero > figure img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.resmat-hero > div > p,
.resmat-section > header p { margin: 0 0 5px; color: #388076; font-size: 11px; font-weight: 800; letter-spacing: .13em; }
.resmat-hero h4 { margin: 16px 0 4px; font-size: clamp(28px, 4vw, 48px); line-height: 1; }
.resmat-hero > div > span { color: var(--resmat-muted); }
.resmat-hero label { display: grid; max-width: 440px; gap: 7px; }
.resmat-hero label > span,
.resmat-material label span,
.resmat-shop-item label span,
.resmat-shop-summary label span,
.resmat-synthesis-form label span { color: var(--resmat-muted); font-size: 11px; font-weight: 700; }
.resmat-hero select,
.resmat-material input,
.resmat-token input,
.resmat-shop-item input,
.resmat-shop-summary input,
.resmat-synthesis-form select,
.resmat-synthesis-form input {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid var(--resmat-line);
  border-radius: 9px;
  background: #fff;
  color: var(--resmat-ink);
  font: inherit;
}
.resmat-hero dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.resmat-hero dl div { min-width: 0; padding: 15px; border: 1px solid rgba(43, 96, 101, .13); border-radius: 13px; background: rgba(255,255,255,.66); }
.resmat-hero dt { color: var(--resmat-muted); font-size: 10px; }
.resmat-hero dd { margin: 7px 0 0; overflow: hidden; font-size: 22px; font-weight: 850; text-overflow: ellipsis; }

.resmat-section { margin-top: 20px; padding: 26px; border: 1px solid var(--resmat-line); border-radius: 24px; background: var(--resmat-paper); }
.resmat-section > header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.resmat-section > header h3 { margin: 0; font-size: clamp(21px, 2.6vw, 30px); }
.resmat-section > header > span { max-width: 520px; color: var(--resmat-muted); font-size: 12px; text-align: right; }
.resmat-token { display: grid; min-width: 180px; gap: 5px; }
.resmat-note { margin: -6px 0 18px; padding: 12px 14px; border-left: 3px solid #d5a944; background: #fff8e9; color: #735d26; font-size: 12px; }

.resmat-material-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.resmat-material { display: grid; min-width: 0; grid-template-columns: 56px minmax(0, 1fr) 120px; gap: 13px; align-items: center; padding: 13px; border: 1px solid var(--resmat-line); border-radius: 14px; background: #fff; }
.resmat-material.is-missing { border-color: rgba(176, 98, 65, .28); background: #fffaf6; }
.resmat-material > figure { display: grid; width: 56px; height: 56px; margin: 0; overflow: hidden; place-items: center; border-radius: 12px; background: #edf4f1; }
.resmat-material figure img { width: 100%; height: 100%; object-fit: contain; }
.resmat-material__body { min-width: 0; }
.resmat-material h4 { margin: 0 0 5px; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.resmat-material p,
.resmat-material small { display: block; margin: 0; color: var(--resmat-muted); font-size: 11px; line-height: 1.55; }
.resmat-material label { display: grid; gap: 5px; }
.resmat-material p strong { color: var(--resmat-ink); font-size: 13px; }
.resmat-material p i { color: #9aaba7; font-style: normal; font-size: 10px; }

.resmat-level-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.resmat-level { display: grid; min-width: 0; grid-template-columns: auto minmax(0, 1fr); gap: 10px 13px; align-content: start; padding: 15px; border: 1px solid var(--resmat-line); border-radius: 14px; background: #fff; }
.resmat-level > header { display: grid; align-content: start; min-width: 62px; padding-right: 12px; border-right: 1px solid var(--resmat-line); }
.resmat-level > header span { color: var(--resmat-muted); font-size: 9px; font-weight: 750; letter-spacing: .08em; }
.resmat-level > header strong { margin-top: 4px; color: #28746d; font-size: 20px; line-height: 1; }
.resmat-level > div { min-width: 0; }
.resmat-level h4 { margin: 0 0 5px; font-size: 13px; }
.resmat-level > div p { margin: 0; color: var(--resmat-muted); font-size: 10px; line-height: 1.5; }
.resmat-level__costs { display: flex; grid-column: 1 / -1; flex-wrap: wrap; gap: 5px; margin: 2px 0 0; }

.resmat-branch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.resmat-branch { min-width: 0; padding: 18px; border: 1px solid var(--resmat-line); border-radius: 16px; background: #f3f8f6; }
.resmat-branch header > span { color: #388076; font-size: 10px; font-weight: 800; }
.resmat-branch h4 { margin: 5px 0; font-size: 17px; }
.resmat-branch header small { color: var(--resmat-muted); }
.resmat-branch ol { display: grid; gap: 9px; margin: 16px 0 0; padding: 0; list-style: none; }
.resmat-branch li { padding: 12px; border-radius: 11px; background: #fff; }
.resmat-branch li > div { display: flex; align-items: center; gap: 8px; }
.resmat-branch li > div span { color: var(--resmat-muted); font-size: 10px; }
.resmat-branch li p { display: flex; flex-wrap: wrap; gap: 5px; margin: 9px 0 0; }
.resmat-cost { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 6px; background: #edf4f1; font-size: 9px; }
.resmat-cost img { width: 16px; height: 16px; object-fit: contain; }

.resmat-shop-summary { display: grid; grid-template-columns: minmax(180px, 1.2fr) repeat(3, 1fr); gap: 9px; margin-bottom: 13px; }
.resmat-shop-summary > div,
.resmat-shop-summary > label { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--resmat-line); border-radius: 12px; background: #f3f8f6; }
.resmat-shop-summary > div span { color: var(--resmat-muted); font-size: 10px; }
.resmat-shop-summary strong { font-size: 18px; }
.resmat-shop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.resmat-shop-item { display: grid; min-width: 0; grid-template-columns: 44px minmax(0, 1fr) 100px; gap: 11px; align-items: center; padding: 11px; border: 1px solid var(--resmat-line); border-radius: 13px; background: #fff; }
.resmat-shop-item figure { display: grid; width: 44px; height: 44px; margin: 0; place-items: center; overflow: hidden; border-radius: 10px; background: #e9f1ee; color: #b58526; font-weight: 800; }
.resmat-shop-item figure img { width: 100%; height: 100%; object-fit: contain; }
.resmat-shop-item h4 { margin: 0 0 4px; font-size: 13px; }
.resmat-shop-item p { margin: 0; color: var(--resmat-muted); font-size: 10px; }
.resmat-shop-item label { display: grid; gap: 4px; }

.resmat-synthesis-form { display: grid; grid-template-columns: minmax(220px, 1.5fr) 150px minmax(220px, 1fr); gap: 10px; align-items: end; }
.resmat-synthesis-form > label,
.resmat-synthesis-form > div { display: grid; gap: 5px; }
.resmat-synthesis-form > div { min-height: 42px; align-content: center; padding: 8px 12px; border-radius: 9px; background: #edf4f1; }
.resmat-synthesis-form > div span { color: var(--resmat-muted); font-size: 10px; }
.resmat-synthesis-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.resmat-synthesis-steps li { padding: 9px 11px; border: 1px solid var(--resmat-line); border-radius: 9px; background: #fff; font-size: 11px; }

/* 凝武升级材料：清单 / 重锻模组分档 / 经验材料 / 合成比例 */
.resmat-weapon-block { margin-bottom: 14px; }
.resmat-weapon-block:last-child { margin-bottom: 0; }
.resmat-weapon-block h4 { margin: 0 0 8px; color: #2c5f58; font-size: 13px; font-weight: 800; }
.resmat-weapon-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.resmat-weapon-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 11px; border-radius: 9px; background: #f3f8f6; font-size: 11px; }
.resmat-weapon-list li span { color: var(--resmat-muted); text-align: right; }
.resmat-weapon-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.resmat-weapon-table th { padding: 7px 8px; color: #6d8784; font-size: 10px; font-weight: 800; text-align: left; border-bottom: 1px solid #e2ece8; }
.resmat-weapon-table td { padding: 7px 8px; border-bottom: 1px solid #f0f5f3; font-variant-numeric: tabular-nums; }
.resmat-weapon-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.resmat-weapon-chips > span { padding: 8px 10px; border: 1px solid var(--resmat-line); border-radius: 9px; background: #f7faf9; color: #486863; font-size: 10px; }
.resmat-weapon-gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.resmat-weapon-gallery article { min-width: 0; border: 1px solid var(--resmat-line); border-radius: 12px; background: #fff; overflow: hidden; }
.resmat-weapon-gallery figure { display: grid; place-items: center; aspect-ratio: 1 / 1; margin: 0; padding: 8px; background: #f3f7f6; }
.resmat-weapon-gallery figure img { width: 100%; height: 100%; object-fit: contain; }
.resmat-weapon-gallery figure span { color: #8da29e; font-size: 22px; }
.resmat-weapon-gallery article > div { display: grid; gap: 3px; padding: 9px; }
.resmat-weapon-gallery small { color: #3b8179; font-size: 9px; font-weight: 900; }
.resmat-weapon-gallery b { overflow-wrap: anywhere; font-size: 11px; }
.resmat-weapon-gallery article span { color: var(--resmat-muted); font-size: 9px; }

.resmat-auto-summary { display: grid; grid-template-columns: 180px 210px minmax(0, 1fr); gap: 9px; margin-bottom: 12px; }
.resmat-auto-summary > div,
.resmat-auto-summary > p { display: grid; align-content: center; gap: 4px; min-height: 58px; box-sizing: border-box; margin: 0; padding: 11px 13px; border: 1px solid var(--resmat-line); border-radius: 12px; background: #edf5f2; }
.resmat-auto-summary span { color: var(--resmat-muted); font-size: 10px; }
.resmat-auto-summary strong { font-size: 17px; }
.resmat-auto-summary p { color: var(--resmat-muted); font-size: 11px; line-height: 1.6; }
.resmat-auto-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.resmat-auto-chain { min-width: 0; padding: 16px; border: 1px solid var(--resmat-line); border-radius: 14px; background: #fff; }
.resmat-auto-chain header span { color: #388076; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.resmat-auto-chain h4 { margin: 5px 0 12px; font-size: 16px; }
.resmat-auto-chain ol { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.resmat-auto-chain li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 9px; background: #f3f8f6; font-size: 10px; }
.resmat-auto-chain li span { color: var(--resmat-muted); text-align: right; }
.resmat-auto-chain > p { margin: 0; color: var(--resmat-muted); font-size: 11px; }
.resmat-auto-chain footer { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--resmat-line); }
.resmat-auto-chain footer span { color: var(--resmat-muted); font-size: 10px; }
.resmat-auto-chain footer strong { color: #9d5236; font-size: 12px; text-align: right; }
.resmat-manual-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; color: var(--resmat-muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; }
.resmat-manual-divider::before,
.resmat-manual-divider::after { height: 1px; flex: 1; background: var(--resmat-line); content: ''; }

@media (min-width: 980px) {
  .smart-hero-index { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .resmat-hero { grid-template-columns: 120px minmax(0, 1fr); }
  .resmat-hero > figure { height: 150px; }
  .resmat-hero dl { grid-column: 1 / -1; }
  .resmat-branch-grid { grid-template-columns: 1fr; }
  .resmat-level-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resmat-auto-summary { grid-template-columns: 1fr 1fr; }
  .resmat-auto-summary > p { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .resmat-hero { grid-template-columns: 82px minmax(0, 1fr); gap: 14px; padding: 16px; border-radius: 17px; }
  .resmat-hero > figure { height: 106px; border-radius: 12px; }
  .resmat-hero h4 { font-size: 28px; }
  .resmat-hero dl { grid-template-columns: 1fr 1fr 1fr; }
  .resmat-hero dl div { padding: 10px; }
  .resmat-hero dd { font-size: 16px; }
  .resmat-section { padding: 16px; border-radius: 17px; }
  .resmat-section > header { align-items: start; flex-direction: column; gap: 10px; }
  .resmat-section > header > span { text-align: left; }
  .resmat-token { width: 100%; }
  .resmat-material-grid,
  .resmat-shop-grid,
  .resmat-level-grid,
  .resmat-auto-grid { grid-template-columns: 1fr; }
  .resmat-material { grid-template-columns: 48px minmax(0, 1fr) 92px; gap: 9px; padding: 10px; }
  .resmat-material > figure { width: 48px; height: 48px; }
  .resmat-shop-summary { grid-template-columns: 1fr 1fr; }
  .resmat-shop-item { grid-template-columns: 40px minmax(0, 1fr) 82px; }
  .resmat-synthesis-form { grid-template-columns: 1fr; }
  .resmat-auto-summary { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
  .resmat-material { grid-template-columns: 44px minmax(0, 1fr); }
  .resmat-material label { grid-column: 1 / -1; grid-template-columns: 90px minmax(0, 1fr); align-items: center; }
  .resmat-shop-item { grid-template-columns: 36px minmax(0, 1fr); }
  .resmat-shop-item label { grid-column: 1 / -1; grid-template-columns: 90px minmax(0, 1fr); align-items: center; }
}


/* QJS resonance material progress workflow v3 */
.resmat-progress { display: grid; grid-template-columns: minmax(250px,.72fr) minmax(0,1.28fr); gap: 22px; margin: 20px 0; padding: 24px; border: 1px solid var(--resmat-line); border-radius: 22px; background: #f2f8f5; }
.resmat-progress p { margin: 0 0 5px; color: #388076; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.resmat-progress h3 { margin: 0 0 7px; font-size: clamp(20px,2.4vw,28px); }
.resmat-progress > div > span { color: var(--resmat-muted); font-size: 12px; line-height: 1.65; }
.resmat-progress-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.resmat-progress-grid label { display: grid; gap: 5px; }
.resmat-progress-grid label > span { color: var(--resmat-muted); font-size: 11px; font-weight: 700; }
.resmat-progress-grid select { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--resmat-line); border-radius: 10px; background: #fff; color: var(--resmat-ink); }
.resmat-progress-hero { grid-column: 1/-1; align-self: end; padding-top: 4px; text-align: right; }
.resmat-level.is-complete,.resmat-branch li.is-complete { opacity: .58; border-color: rgba(48,125,104,.2); background: #edf6f0; }
.resmat-level.is-complete > header strong { color: #4e9180; }
.resmat-calculate-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; padding: 15px 16px; border-radius: 14px; background: #e9f4ef; }
.resmat-calculate-bar > div { display: grid; gap: 3px; }
.resmat-calculate-bar span { color: var(--resmat-muted); font-size: 11px; }
.resmat-calculate-bar button { min-height: 44px; padding: 0 20px; border: 0; border-radius: 10px; background: #287f73; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.resmat-material.is-unchecked { border-style: dashed; }
.resmat-auto-inline { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--resmat-line); }
.resmat-auto-inline > header { margin-bottom: 12px; }
.resmat-auto-inline > header p { margin: 0; color: #388076; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.resmat-auto-inline > header h4 { margin: 4px 0 0; font-size: 18px; }
.resmat-auto-hint { display: block; margin-top: 6px; color: var(--resmat-muted); font-size: 11px; line-height: 1.6; }
.resmat-chain-tiers { display: grid; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.resmat-chain-tiers li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 9px; background: #eaf2ef; font-size: 10px; }
.resmat-chain-tiers li span { color: var(--resmat-muted); text-align: right; }
.resmat-chain-block { margin-top: 12px; }
.resmat-chain-block h5 { margin: 0 0 7px; color: #2b6059; font-size: 11px; font-weight: 800; }
.resmat-chain-block ol { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.resmat-chain-block li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 9px; background: #f3f8f6; font-size: 10px; }
.resmat-chain-block li span { color: var(--resmat-muted); text-align: right; }
.resmat-chain-block p { margin: 0; color: var(--resmat-muted); font-size: 11px; }
.resmat-shop-item h4 small { color: var(--resmat-muted); font-size: 10px; font-weight: 600; }
.resmat-shop-item output { display: block; margin-top: 5px; color: #28746d; font-size: 10px; font-weight: 750; }
.resmat-pending-window { display: flex; align-items: center; gap: 18px; min-height: 112px; padding: 20px; border: 1px dashed rgba(43,96,101,.28); border-radius: 16px; background: #f3f8f6; }
.resmat-pending-window > span { flex: 0 0 auto; padding: 8px 11px; border-radius: 999px; background: #e0ece8; color: #28746d; font-size: 11px; font-weight: 800; }
.resmat-pending-window h4 { margin: 0 0 5px; font-size: 17px; }
.resmat-pending-window p { margin: 0; color: var(--resmat-muted); font-size: 12px; line-height: 1.6; }
@media (max-width: 760px) {
  .resmat-weapon-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resmat-progress { grid-template-columns: 1fr; padding: 16px; border-radius: 17px; }
  .resmat-progress-grid { grid-template-columns: 1fr 1fr; }
  .resmat-progress-hero { text-align: left; }
  .resmat-calculate-bar { align-items: stretch; flex-direction: column; }
  .resmat-calculate-bar button { width: 100%; }
}
@media (max-width: 430px) {
  .resmat-progress-grid { grid-template-columns: 1fr; }
  .resmat-pending-window { align-items: flex-start; flex-direction: column; }
}


/* QJS two-stage settlement v4 */
.resmat-hero--profile { grid-template-columns: minmax(210px,.66fr) minmax(0,1.7fr); align-items: stretch; overflow: hidden; background: color-mix(in srgb,var(--resmat-hero-tint) 34%,#f8fbfc); }
.resmat-hero--profile > figure { height: auto; min-height: 360px; border-radius: 0; background: transparent; }
.resmat-hero--profile > figure img { object-fit: contain; object-position: bottom center; }
.resmat-hero-profile { display: grid; align-content: center; padding: 12px 8px; }
.resmat-hero-profile h2 { margin: 14px 0 0; font-size: clamp(40px,5vw,72px); line-height: .95; }
.resmat-hero-profile h3 { margin: 12px 0 3px; color: #367aa3; font-size: clamp(22px,2.4vw,34px); }
.resmat-hero-profile > p { margin: 0; color: var(--resmat-muted); font-weight: 700; }
.resmat-hero-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 22px 0 0; }
.resmat-hero-facts div { padding: 10px 0; border-top: 1px solid var(--resmat-line); }
.resmat-hero-facts dt { color: var(--resmat-muted); font-size: 10px; font-weight: 750; }
.resmat-hero-facts dd { margin: 5px 0 0; font-size: 14px; font-weight: 850; }
.resmat-hero-target { display: grid; gap: 10px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--resmat-line); }
.resmat-hero-target > strong { font-size: 17px; }
.resmat-hero-target > div { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 10px; align-items: start; }
.resmat-hero-target > div > b { padding-top: 5px; font-size: 12px; }
.resmat-hero-target p { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; }
.resmat-hero-target p span { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border-radius: 7px; background: rgba(255,255,255,.76); font-size: 10px; }
.resmat-hero-target p img { width: 20px; height: 20px; object-fit: contain; }
.resmat-material--settlement { grid-template-columns: 62px minmax(0,1fr) 112px; align-items: start; }
.resmat-material--settlement > figure { position: relative; overflow: visible; margin-bottom: 18px; }
.resmat-material--settlement > figure::after { position: absolute; inset: calc(100% + 5px) 50% auto auto; min-width: max-content; translate: 50% 0; padding: 3px 7px; border-radius: 999px; background: #edf3f1; color: #617975; content: '\005F85\008BA1\007B97'; font-size: 9px; font-weight: 850; line-height: 1.2; }
.resmat-material--settlement.is-missing > figure::after { background: #fff0e8; color: #a55332; content: '\004ECD\006709\007F3A\0053E3'; }
.resmat-material--settlement.is-ready > figure::after { background: #e0f3ea; color: #21765c; content: '\005DF2\006EE1\008DB3'; }
.resmat-process { display: grid; grid-column: 2 / 3; gap: 5px; margin: 2px 0 0; padding: 0; list-style: none; }
.resmat-process li { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; gap: 7px; align-items: center; padding: 5px 7px; border-radius: 8px; background: #f3f7f6; color: var(--resmat-muted); font-size: 10px; }
.resmat-process li + li { position: relative; }
.resmat-process li + li::before { position: absolute; top: -7px; left: 18px; color: #6aa096; content: '\002193'; font-weight: 900; }
.resmat-process b { color: #4b8d82; font-size: 9px; letter-spacing: .06em; }
.resmat-process strong { color: var(--resmat-ink); font-size: 11px; }
.resmat-material--settlement > label { grid-column: 3; grid-row: 1 / span 2; }
.resmat-material--settlement.is-missing .resmat-process li:last-child { background: #fff3ec; }
.resmat-material--settlement.is-ready .resmat-process li:last-child { background: #e9f6f0; }
.resmat-material--settlement .resmat-material__body dl { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px; margin: 6px 0; }
.resmat-material--settlement .resmat-material__body dl div { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 4px; border-bottom: 1px dashed var(--resmat-line); }
.resmat-material--settlement dt { color: var(--resmat-muted); font-size: 10px; }
.resmat-material--settlement dd { margin: 0; font-size: 11px; font-weight: 850; }
.resmat-stage-results { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.resmat-stage-results > article { min-width: 0; padding: 16px; border: 1px solid var(--resmat-line); border-radius: 15px; background: #fff; }
.resmat-stage-results article > header { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 10px; align-items: center; }
.resmat-stage-results article > header > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #dfeee9; color: #28746d; font-weight: 900; }
.resmat-stage-results small { color: #388076; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.resmat-stage-results h4 { margin: 2px 0 0; font-size: 16px; }
.resmat-stage-results header > b { font-size: 11px; }
.resmat-stage-shortage { display: flex; flex-wrap: wrap; gap: 6px; margin: 13px 0; }
.resmat-stage-shortage span,.resmat-stage-shortage strong { padding: 5px 7px; border-radius: 7px; background: #fff2e9; color: #8a4f34; font-size: 10px; }
.resmat-stage-results details { border-top: 1px dashed var(--resmat-line); padding-top: 10px; }
.resmat-stage-results summary { cursor: pointer; color: #28746d; font-size: 11px; font-weight: 800; }
.resmat-stage-results ol { display: grid; gap: 5px; margin: 9px 0 0; padding-left: 20px; color: var(--resmat-muted); font-size: 10px; }
.resmat-stage-results details p { color: var(--resmat-muted); font-size: 10px; }
.resmat-settlement-gate { margin-top: 16px; padding: 16px; border: 1px dashed var(--resmat-line); border-radius: 14px; background: #f3f8f6; }
.resmat-settlement-gate b,.resmat-settlement-gate span { display: block; }
.resmat-settlement-gate span { margin-top: 4px; color: var(--resmat-muted); font-size: 11px; }
@media (max-width:900px){.resmat-hero--profile{grid-template-columns:170px minmax(0,1fr)}.resmat-hero--profile>figure{min-height:320px}.resmat-stage-results{grid-template-columns:1fr}.resmat-material--settlement .resmat-material__body dl{grid-template-columns:1fr}}
@media (max-width:620px){.resmat-hero--profile{grid-template-columns:110px minmax(0,1fr);padding:14px}.resmat-hero--profile>figure{min-height:220px}.resmat-hero-profile h2{font-size:34px}.resmat-hero-profile h3{font-size:19px}.resmat-hero-facts{grid-template-columns:1fr 1fr}.resmat-hero-target{grid-column:1/-1}.resmat-hero-target>div{grid-template-columns:1fr}.resmat-material--settlement{grid-template-columns:44px minmax(0,1fr)}.resmat-material--settlement>label{grid-column:1/-1;grid-template-columns:90px minmax(0,1fr)} }
@media (max-width:620px) {
  .resmat-material--settlement > label { grid-row: auto; }
  .resmat-process { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .resmat-hero--profile {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
    overflow: hidden;
  }
  .resmat-hero--profile > figure {
    min-height: 300px;
    max-height: 380px;
    border-right: 0;
    border-bottom: 1px solid rgba(30, 75, 80, .12);
    background-position: center top;
  }
  .resmat-hero--profile > figure img {
    width: 100%;
    height: 100%;
    max-height: 380px;
    object-fit: contain;
    object-position: center bottom;
  }
  .resmat-hero-profile {
    min-width: 0;
    padding: 20px 16px 22px;
  }
  .resmat-hero-profile h2 {
    font-size: clamp(32px, 11vw, 48px);
    line-height: .98;
  }
  .resmat-hero-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .resmat-hero-facts > div {
    min-width: 0;
    padding: 10px 8px;
  }
  .resmat-material-grid,
  .resmat-inventory-grid,
  .resmat-auto-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .resmat-material,
  .resmat-inventory-card,
  .resmat-auto-chain {
    min-width: 0;
  }
  .resmat-weapon-block {
    min-width: 0;
    overflow: hidden;
  }
  .resmat-weapon-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    white-space: nowrap;
  }
  .resmat-weapon-list li {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}


/* Prominent material deficit v6 */
.resmat-stage-results header > b { padding: 7px 10px; border-radius: 9px; background: #fff0e8; color: #9d4a2d; font-size: clamp(14px, 1.4vw, 18px); font-weight: 950; line-height: 1; }
.resmat-stage-shortage { gap: 8px; }
.resmat-stage-shortage span, .resmat-stage-shortage strong { display: inline-flex; align-items: baseline; gap: 4px; padding: 8px 10px; border: 1px solid #f0d2c4; border-radius: 9px; font-size: 12px; font-weight: 850; }
.resmat-stage-shortage strong { color: #9d4327; font-size: 16px; font-weight: 950; }
.resmat-material--settlement.is-missing dd { color: #a6482a; font-size: 15px; font-weight: 950; }
.resmat-auto-chain footer strong { color: #9d4327; font-size: clamp(15px, 1.5vw, 20px); font-weight: 950; }
@media (max-width: 620px) {
  .resmat-stage-results article > header { grid-template-columns: 34px minmax(0, 1fr); }
  .resmat-stage-results header > b { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
  .resmat-stage-shortage span, .resmat-stage-shortage strong { width: 100%; justify-content: space-between; }
}
