.qhc-gm-helper {
  box-sizing: border-box;
  margin: 0 0 10px;
  max-width: 100%;
  min-width: 0;
}

.qhc-gm-link {
  align-items: center;
  background: transparent;
  border: 0;
  color: #0f766e;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  gap: 4px;
  line-height: 1.25;
  margin: 2px 0 4px;
  max-width: 100%;
  min-height: 32px;
  overflow-wrap: anywhere;
  padding: 4px 0;
  text-align: start;
}

.qhc-gm-link:hover,
.qhc-gm-link:focus-visible {
  text-decoration: underline;
}

.qhc-gm-helper.is-open {
  background: #e4f0ec;
  border: 1px solid #c5dbd5;
  border-radius: 12px;
  padding: 12px;
}

.qhc-gm-prompt p,
.qhc-gm-sales p,
.qhc-gm-meta,
.qhc-gm-check,
.qhc-gm-confirm p {
  color: #3d4f48;
  font-size: 0.95rem;
  line-height: 1.4;
  margin: 0;
}

.qhc-gm-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 8px;
}

.qhc-gm-helper button {
  box-sizing: border-box;
  cursor: pointer;
  font: inherit;
}

.qhc-gm-helper .qhc-gm-actions button,
.qhc-gm-helper .qhc-gm-add,
.qhc-gm-helper .qhc-gm-primary,
.qhc-gm-helper .qhc-gm-confirm button {
  background: #fff;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 8px;
  color: #0f766e;
  font-size: 0.86rem;
  font-weight: 700;
  min-height: 40px;
  padding: 8px 12px;
  white-space: normal;
  width: auto;
}

.qhc-gm-helper .qhc-gm-primary,
.qhc-gm-helper [data-qhc-gm-action="confirm-use"] {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.qhc-gm-helper .qhc-gm-add {
  justify-self: start;
  margin-top: 0;
}

.qhc-gm-conditions {
  align-items: end;
  display: grid;
  gap: 10px 12px;
  grid-template-columns: minmax(0, 1fr);
  margin: 14px 0;
}

.qhc-gm-condition-fields {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.qhc-gm-basis {
  margin: 0;
  max-width: 360px;
}

@media (min-width: 800px) {
  .qhc-gm-conditions {
    grid-template-columns: minmax(180px, 260px) minmax(220px, 340px) auto;
  }

  .qhc-gm-conditions > .qhc-gm-text {
    justify-self: end;
  }
}

.qhc-gm-stage {
  align-items: start;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.qhc-gm-maincol,
.qhc-gm-sidecol {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.qhc-gm-fields {
  background: #fff;
  border: 1px solid rgba(15, 118, 110, 0.1);
  border-radius: 12px;
  box-sizing: border-box;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
}

.qhc-gm-foot {
  display: grid;
  gap: 8px;
  justify-items: start;
  min-width: 0;
}

.qhc-gm-editor,
.qhc-gm-live,
.qhc-gm-summary {
  box-sizing: border-box;
  min-width: 0;
}

.qhc-gm-live {
  background: transparent;
  padding: 0;
}

.qhc-gm-kicker {
  color: #17211d;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 6px;
}

.qhc-gm-result-line {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 0 0 4px;
  max-width: 16rem;
}

.qhc-gm-editor-head {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.qhc-gm-editor-head .qhc-gm-choices {
  flex: 1 1 auto;
}

.qhc-gm-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
  min-width: 0;
}

.qhc-gm-conditions .qhc-gm-basis {
  margin: 0;
}

.qhc-gm-helper .qhc-gm-choice {
  align-items: center;
  background: #fffaf5;
  border: 1px solid #e2d8c8;
  border-radius: 8px;
  color: #17211d;
  display: inline-flex;
  flex: 1 1 0;
  font-size: 0.84rem;
  font-weight: 700;
  justify-content: center;
  line-height: 1.25;
  min-height: 40px;
  min-width: 0;
  padding: 6px 8px;
  text-align: center;
}

.qhc-gm-helper .qhc-gm-choice.is-current {
  background: rgba(15, 118, 110, 0.12);
  border-color: rgba(15, 118, 110, 0.5);
  color: #0f766e;
  font-weight: 800;
}

.qhc-gm-grid {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
}

.qhc-gm-field {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: flex-end;
  min-width: 0;
}

.qhc-gm-editor > .qhc-gm-grid .qhc-gm-field > span,
.qhc-gm-more .qhc-gm-field > span {
  align-items: flex-end;
  display: flex;
  min-height: 2.6em;
}

.qhc-gm-field span,
.qhc-gm-more summary,
.qhc-gm-average-label {
  color: #17211d;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
}

#quick-health-check.qhc-module .qhc-gm-helper .qhc-gm-field input,
#quick-health-check.qhc-module .qhc-gm-helper .qhc-gm-field select {
  appearance: none;
  background: #fffaf5;
  border: 1px solid #e2d8c8;
  border-radius: 8px;
  box-sizing: border-box;
  color: #17211d;
  font: inherit;
  font-size: inherit;
  height: 40px;
  line-height: 1.25;
  margin: 0;
  min-height: 40px;
  min-width: 0;
  padding: 8px 10px;
  width: 100%;
}

#quick-health-check.qhc-module .qhc-gm-helper .qhc-gm-field input:focus,
#quick-health-check.qhc-module .qhc-gm-helper .qhc-gm-field select:focus,
.qhc-gm-helper .qhc-gm-choice:focus-visible {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
  outline: none;
}

.qhc-gm-sales {
  border-top: 1px solid #e2d8c8;
  margin-top: 12px;
  padding-top: 12px;
}

.qhc-gm-sales .qhc-gm-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 280px;
}

.qhc-gm-more summary {
  cursor: pointer;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.qhc-gm-live .qhc-gm-left,
.qhc-gm-live .qhc-gm-margin-line {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin: 0 0 6px;
}

.qhc-gm-live strong,
.qhc-gm-average,
.qhc-gm-margin-line strong,
.qhc-gm-average-row strong {
  color: #0f766e;
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.qhc-gm-summaries,
.qhc-gm-history-list {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.qhc-gm-summary-row {
  align-items: center;
  border-bottom: 1px solid #d5e6df;
  display: grid;
  gap: 4px 8px;
  grid-template-columns: minmax(0, 1fr) minmax(7.5rem, 12rem) auto;
  padding: 8px 0;
}

.qhc-gm-summary-weight {
  grid-column: 2;
  grid-row: 1;
  max-width: none;
  min-width: 0;
}

.qhc-gm-summary-weight .qhc-gm-field > span {
  min-height: 0;
}

.qhc-gm-helper .qhc-gm-summary-edit,
.qhc-gm-summary-current {
  background: transparent;
  border: 0;
  color: #17211d;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.3;
  min-height: 40px;
  min-width: 0;
  padding: 8px 0;
  text-align: left;
}

.qhc-gm-summary-row.is-current .qhc-gm-summary-current {
  color: #0f766e;
}

.qhc-gm-item-top {
  align-items: start;
  display: grid;
  gap: 4px 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
}

.qhc-gm-item-top > span {
  align-self: center;
  color: #17211d;
  font-size: 0.84rem;
  font-weight: 700;
  grid-column: 1;
  grid-row: 1;
  line-height: 1.25;
  min-width: 0;
}

.qhc-gm-item-top .qhc-gm-remove {
  grid-column: 2;
  grid-row: 1;
}

.qhc-gm-item-top > .qhc-gm-field {
  grid-column: 1 / -1;
  grid-row: 2;
}

.qhc-gm-helper .qhc-gm-remove {
  background: transparent;
  border: 0;
  color: #0f766e;
  flex: 0 0 auto;
  font-size: 0.84rem;
  font-weight: 700;
  justify-self: end;
  line-height: 1.25;
  border-radius: 8px;
  min-height: 40px;
  padding: 8px;
  text-align: end;
  width: auto;
}

.qhc-gm-summary-main {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.qhc-gm-summary-row .qhc-gm-remove {
  grid-column: 3;
  grid-row: 1;
  padding: 8px;
}

@media (max-width: 899px) {
  .qhc-gm-summary-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .qhc-gm-summary-weight {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: 16rem;
  }

  .qhc-gm-summary-row .qhc-gm-remove {
    grid-column: 2;
    grid-row: 1;
  }
}

.qhc-gm-helper .qhc-gm-text {
  background: transparent;
  border: 0;
  color: #0f766e;
  flex: 0 0 auto;
  font-weight: 700;
  justify-self: start;
  min-height: 40px;
  padding: 8px 0;
  text-align: start;
  width: auto;
}

.qhc-gm-check {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.qhc-gm-summary {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.qhc-gm-summary .qhc-gm-primary,
.qhc-gm-confirm .qhc-gm-actions,
.qhc-gm-summary .qhc-gm-add,
.qhc-gm-history-view .qhc-gm-add {
  margin-top: 10px;
}

.qhc-gm-history {
  margin-top: 4px;
  width: 100%;
}

.qhc-gm-history > summary {
  color: #17211d;
  cursor: pointer;
  font-weight: 700;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.qhc-gm-history-view {
  background: #fff;
  border: 1px solid rgba(15, 118, 110, 0.1);
  border-radius: 12px;
  margin-top: 8px;
  padding: 12px;
}

.qhc-gm-history-view ul {
  margin: 8px 0;
  padding-left: 18px;
}

.qhc-gm-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.qhc-gm-grid.qhc-gm-main,
.qhc-gm-grid.qhc-gm-lines {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qhc-gm-field > span {
  min-height: 2.5em;
}

/* qhc-desktop-media-guard-20261202: desktop columns only above the phone sheets (max-width: 900px), so the two never mix (Bob, iPad landscape). */
@media (min-width: 901px) {
@container qhc (min-width: 52rem) {
  .qhc-gm-panel {
    align-items: start;
    column-gap: 20px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    row-gap: 12px;
  }

  .qhc-gm-kinds,
  .qhc-gm-foot {
    grid-column: 1 / -1;
  }

  .qhc-gm-kinds {
    grid-row: 1;
  }

  .qhc-gm-maincol {
    grid-column: 1;
    grid-row: 2;
  }

  .qhc-gm-sidecol {
    align-self: start;
    grid-column: 2;
    grid-row: 2;
    justify-items: start;
  }

  .qhc-gm-foot {
    grid-row: 3;
  }

  .qhc-gm-live,
  .qhc-gm-summary {
    justify-self: start;
    max-width: 100%;
    width: max-content;
  }
}
}

@media (max-width: 430px) {
  .qhc-gm-grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }
}

.qhc-gm-titlebar {
  align-items: center;
  display: flex;
  gap: 8px;
  margin: 0 0 8px;
}

.qhc-gm-title {
  flex: 1 1 auto;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
  min-width: 0;
}

.qhc-gm-fold,
.qhc-gm-title-button {
  background: transparent;
  border: 0;
  color: #17211d;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: start;
}

.qhc-gm-fold {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(15, 118, 110, 0.1);
  border-radius: 12px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-height: 40px;
  padding: 8px 12px;
  width: 100%;
}

.qhc-gm-title-button {
  min-height: 40px;
  padding: 8px 0;
}

.qhc-gm-fold:focus-visible,
.qhc-gm-title-button:focus-visible,
.qhc-gm-icon:focus-visible,
.qhc-gm-remove:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: 3px;
}

/* Keyboard focus keeps the solid brand ring (3:1+), drawn flush and rounded on the plain-text remove action. */
.qhc-gm-helper .qhc-gm-remove:focus-visible {
  background: rgba(15, 118, 110, 0.08);
  outline: 2px solid #0f766e;
  outline-offset: 0;
}

.qhc-gm-icon {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 8px;
  color: #0f766e;
  display: inline-flex;
  flex: 0 0 auto;
  height: 40px;
  justify-content: center;
  min-height: 40px;
  min-width: 40px;
  padding: 0;
  width: 40px;
}

.qhc-gm-toolbar {
  align-items: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 40px;
  margin: 0 0 8px;
  min-width: 0;
}

#quick-health-check.qhc-module .qhc-gm-helper .qhc-gm-toolbar > .qhc-gm-tool,
.qhc-gm-helper .qhc-gm-toolbar > .qhc-gm-tool {
  appearance: none;
  background: #fff;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 8px;
  box-sizing: border-box;
  color: #17211d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  height: auto;
  line-height: 1.25;
  margin: 0;
  min-height: 40px;
  min-width: 0;
  overflow: visible;
  padding: 6px 8px;
  text-align: center;
  text-align-last: center;
  text-overflow: clip;
  white-space: normal;
  width: 100%;
}

.qhc-gm-helper .qhc-gm-toolbar > .qhc-gm-choice.is-current {
  background: rgba(15, 118, 110, 0.12);
  border-color: rgba(15, 118, 110, 0.5);
  color: #0f766e;
}

.qhc-gm-helper .qhc-gm-toolbar > .qhc-gm-icon {
  color: #0f766e;
  height: auto;
  min-width: 40px;
  padding: 0;
  width: 40px;
}

.qhc-gm-basic {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qhc-gm-cost-total {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin: 10px 0 0;
}

.qhc-gm-cost-total strong {
  color: #0f766e;
  font-size: 1.05rem;
}

.qhc-gm-kinds {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  min-width: 0;
  width: 100%;
}

.qhc-gm-kinds.is-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.qhc-gm-kinds .qhc-gm-choice {
  align-items: center;
  box-sizing: border-box;
  flex: 0 0 auto;
  font-size: 0.92rem;
  height: 40px;
  justify-content: center;
  min-height: 40px;
  min-width: 0;
  overflow: visible;
  padding: 6px 10px;
  text-align: center;
  white-space: nowrap;
  width: 100%;
}

.qhc-gm-kinds.is-row .qhc-gm-choice {
  min-width: max-content;
  width: auto;
}

.qhc-gm-methods {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  margin: 0 0 8px;
  max-width: 100%;
}

.qhc-gm-method-choices {
  display: flex;
  flex: 1 1 16rem;
  gap: 8px;
  min-width: 0;
}

.qhc-gm-methods .qhc-gm-choice {
  flex: 1 1 0;
  font-size: 0.92rem;
  min-height: 40px;
  min-width: 0;
  width: auto;
}

.qhc-gm-methods .qhc-gm-period-select {
  appearance: none;
  background: #fff;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 8px;
  box-sizing: border-box;
  color: #17211d;
  flex: 0 0 auto;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  margin-left: auto;
  min-height: 40px;
  padding: 6px 28px 6px 10px;
}

.qhc-gm-period {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}

.qhc-gm-period select {
  field-sizing: content;
  width: auto;
}

.qhc-gm-margin-line {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.qhc-gm-margin-line strong {
  color: #0f766e;
  font-size: 1.2rem;
}

.qhc-gm-average-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.qhc-gm-average-row p {
  margin: 0;
}

.qhc-gm-average-row strong {
  color: #0f766e;
  font-size: 1.2rem;
}

.qhc-gm-summary-row .qhc-gm-summary-edit {
  width: 100%;
}

@media (max-width: 360px) {
  .qhc-gm-basic,
  .qhc-gm-grid.qhc-gm-lines {
    grid-template-columns: 1fr;
  }
}

/* Desktop arrangement starts at 1100px. Below that, the published stack stays. */
.qhc-gm-now {
  display: contents;
}

.qhc-gm-live {
  order: 1;
}

.qhc-gm-summary {
  order: 2;
}

.qhc-gm-save {
  order: 3;
}

.qhc-gm-desk-name,
.qhc-gm-desk-margin,
.qhc-gm-list-head {
  display: none;
}

@media (min-width: 1100px) {
  .qhc-gm-panel {
    align-items: start;
    column-gap: 20px;
    grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr);
    row-gap: 12px;
  }

  .qhc-gm-kinds,
  .qhc-gm-kinds.is-row {
    display: grid;
    gap: 8px;
    grid-column: 1 / -1;
    grid-row: 1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .qhc-gm-kinds .qhc-gm-choice,
  .qhc-gm-kinds.is-row .qhc-gm-choice {
    flex: 1 1 auto;
    height: auto;
    min-height: 40px;
    min-width: 0;
    white-space: normal;
    width: 100%;
  }

  .qhc-gm-maincol {
    grid-column: 1;
    grid-row: 2;
  }

  .qhc-gm-panel:not(:has(.qhc-gm-summaries)) .qhc-gm-sidecol {
    align-content: start;
    background: #fff;
    border: 1px solid rgba(15, 118, 110, 0.1);
    border-radius: 12px;
    box-sizing: border-box;
    display: grid;
    gap: 8px;
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    padding: 12px;
  }

  .qhc-gm-panel:not(:has(.qhc-gm-summaries)) .qhc-gm-now {
    display: contents;
  }

  .qhc-gm-panel:not(:has(.qhc-gm-summaries)) .qhc-gm-live {
    order: 1;
  }

  .qhc-gm-panel:not(:has(.qhc-gm-summaries)) .qhc-gm-summary {
    order: 2;
  }

  .qhc-gm-panel:not(:has(.qhc-gm-summaries)) .qhc-gm-save {
    order: 3;
  }

  .qhc-gm-panel:has(.qhc-gm-summaries) .qhc-gm-sidecol,
  .qhc-gm-panel:has(.qhc-gm-summaries) .qhc-gm-foot {
    display: contents;
  }

  .qhc-gm-panel:has(.qhc-gm-summaries) .qhc-gm-now {
    align-content: start;
    background: #fff;
    border: 1px solid rgba(15, 118, 110, 0.1);
    border-radius: 12px;
    box-sizing: border-box;
    display: grid;
    gap: 8px;
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    padding: 12px;
  }

  .qhc-gm-kicker,
  .qhc-gm-live,
  .qhc-gm-meta {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .qhc-gm-panel:has(.qhc-gm-summaries) .qhc-gm-live,
  .qhc-gm-panel:has(.qhc-gm-summaries) .qhc-gm-summary,
  .qhc-gm-panel:has(.qhc-gm-summaries) .qhc-gm-save,
  .qhc-gm-panel:has(.qhc-gm-summaries) .qhc-gm-methods,
  .qhc-gm-panel:has(.qhc-gm-summaries) .qhc-gm-list,
  .qhc-gm-panel:has(.qhc-gm-summaries) .qhc-gm-foot > .qhc-gm-add,
  .qhc-gm-panel:has(.qhc-gm-summaries) .qhc-gm-history {
    order: 0;
  }

  .qhc-gm-panel:has(.qhc-gm-summaries) .qhc-gm-methods {
    grid-column: 1 / -1;
    grid-row: 3;
    max-width: 40rem;
  }

  .qhc-gm-panel:has(.qhc-gm-summaries) .qhc-gm-list {
    grid-column: 1 / -1;
    grid-row: 4;
    min-width: 0;
  }

  .qhc-gm-panel:has(.qhc-gm-summaries) .qhc-gm-summary {
    grid-column: 1 / -1;
    grid-row: 5;
    max-width: 40rem;
    width: 100%;
  }

  .qhc-gm-panel:has(.qhc-gm-summaries) .qhc-gm-foot > .qhc-gm-add {
    grid-column: 1 / -1;
    grid-row: 6;
    justify-self: start;
  }

  .qhc-gm-panel:has(.qhc-gm-summaries) .qhc-gm-history {
    grid-column: 1 / -1;
    grid-row: 7;
  }

  .qhc-gm-live,
  .qhc-gm-summary,
  .qhc-gm-save {
    justify-self: stretch;
    max-width: none;
    width: 100%;
  }

  .qhc-gm-result-line {
    max-width: none;
  }

  .qhc-gm-now .qhc-gm-primary,
  .qhc-gm-now .qhc-gm-add {
    width: 100%;
  }

  .qhc-gm-list {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(6.5rem, 0.7fr) minmax(9rem, 1fr) max-content;
  }

  .qhc-gm-summaries {
    display: contents;
  }

  .qhc-gm-list-head,
  .qhc-gm-summary-row {
    align-items: center;
    column-gap: 12px;
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    row-gap: 4px;
  }

  .qhc-gm-list-head {
    color: #4d6b63;
    display: grid;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.25;
    padding-bottom: 4px;
  }

  .qhc-gm-summary-main {
    display: none;
  }

  .qhc-gm-desk-name,
  .qhc-gm-desk-margin {
    display: block;
    min-width: 0;
  }

  .qhc-gm-helper .qhc-gm-desk-name {
    background: transparent;
    border: 0;
    color: #17211d;
    font-size: 0.84rem;
    font-weight: 700;
    grid-column: 1;
    line-height: 1.3;
    min-height: 40px;
    overflow-wrap: anywhere;
    padding: 8px 0;
    text-align: start;
  }

  .qhc-gm-summary-row.is-current .qhc-gm-desk-name {
    color: #0f766e;
  }

  .qhc-gm-desk-margin {
    color: #0f766e;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    grid-column: 2;
  }

  .qhc-gm-summary-weight {
    grid-column: 3;
    grid-row: 1;
    max-width: none;
    position: relative;
  }

  .qhc-gm-summary-weight .qhc-gm-field > span {
    clip-path: inset(50%);
    height: 1px;
    min-height: 0;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .qhc-gm-summary-row .qhc-gm-remove {
    grid-column: 4;
    grid-row: 1;
  }
}

/* 算毛利率 queue (Bob 2026-12-01): the 看利润 mini program's flow on the website, phone and desktop.
   01, 02, 03 one line each (dark green, bold, left-aligned); the 商品 being edited opens in its place;
   a saved 商品 flashes ✅ for about 2 seconds. */
.qhc-gm-queue .qhc-gm-rows {
  display: grid;
  gap: 0;
  min-width: 0;
}

.qhc-gm-queue .qhc-gm-row {
  align-items: center;
  border-bottom: 1px solid #d7e6dc;
  display: flex;
  gap: 8px;
  min-width: 0;
  padding: 4px 0;
  transition: background-color 0.6s;
}

.qhc-gm-queue .qhc-gm-row.is-flash {
  background: #c8ecd9;
}

.qhc-gm-queue .qhc-gm-row-text {
  color: #064e3b;
  flex: 1 1 auto;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}

.qhc-gm-queue .qhc-gm-row-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.qhc-gm-queue .qhc-gm-row-actions .qhc-gm-text,
.qhc-gm-queue .qhc-gm-row-actions .qhc-gm-remove {
  min-height: 36px;
  padding: 6px 4px;
}

.qhc-gm-queue .qhc-gm-remove {
  color: #b42318;
}

.qhc-gm-queue .qhc-gm-edit {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 6px 0 8px;
}

.qhc-gm-queue .qhc-gm-kinds {
  margin: 0;
}

.qhc-gm-queue .qhc-gm-line {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.qhc-gm-queue .qhc-gm-line .qhc-gm-kicker {
  margin: 0;
}

.qhc-gm-queue .qhc-gm-now {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.qhc-gm-queue .qhc-gm-now:empty,
.qhc-gm-queue .qhc-gm-weight-zone:empty,
.qhc-gm-queue .qhc-gm-actions:empty,
.qhc-gm-queue .qhc-gm-foot:empty {
  display: none;
}

.qhc-gm-queue .qhc-gm-result-line {
  max-width: none;
}

.qhc-gm-queue .qhc-gm-method-head {
  align-items: center;
  display: flex;
  gap: 8px;
  margin: 4px 0 6px;
  min-height: 40px;
}

.qhc-gm-queue .qhc-gm-method-label {
  color: #3d4f48;
  flex: 1 1 auto;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  min-width: 0;
}

.qhc-gm-queue .qhc-gm-method-head .qhc-gm-period-select {
  background: #fff;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 8px;
  color: #0f766e;
  flex: 0 0 auto;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  min-height: 36px;
  min-width: 4.5em;
  padding: 4px 12px;
  width: auto;
}

/* Three ways to fill, equal width, 3px apart (as in the mini program). */
.qhc-gm-queue .qhc-gm-methods {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.qhc-gm-queue .qhc-gm-weight {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  max-width: 24rem;
}

/* Bob 2026-12-01 19:15: the status follows the label on the same line, above the box. */
.qhc-gm-queue .qhc-gm-weight-head {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin: 0;
}

.qhc-gm-queue .qhc-gm-weight-label {
  color: #17211d;
  font-size: 0.88rem;
  font-weight: 700;
}

.qhc-gm-queue .qhc-gm-weight input {
  box-sizing: border-box;
  width: 100%;
}

.qhc-gm-queue .qhc-gm-affix {
  align-items: center;
  display: flex;
  gap: 6px;
}

.qhc-gm-queue .qhc-gm-affix > span {
  color: #3d4f48;
  font-weight: 700;
}

.qhc-gm-queue .qhc-gm-status {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

.qhc-gm-queue .qhc-gm-status--inline {
  font-size: 0.8rem;
}

.qhc-gm-queue .qhc-gm-status--ok {
  color: #0f766e;
}

.qhc-gm-queue .qhc-gm-status--bad {
  color: #9a3412;
}

.qhc-gm-queue .qhc-gm-status--plain {
  color: #3d4f48;
  font-weight: 400;
}

.qhc-gm-queue .qhc-gm-actions,
.qhc-gm-queue .qhc-gm-foot {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  margin-top: 6px;
}

.qhc-gm-queue .qhc-gm-foot > p {
  margin: 0;
}

.qhc-gm-queue .qhc-gm-wide {
  justify-self: stretch;
  width: 100%;
}

.qhc-gm-queue .qhc-gm-average {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin: 0;
}

@media (min-width: 768px) {
  .qhc-gm-queue .qhc-gm-wide {
    justify-self: start;
    max-width: 26rem;
  }

  .qhc-gm-queue .qhc-gm-now,
  .qhc-gm-queue .qhc-gm-weight-zone,
  .qhc-gm-queue .qhc-gm-average {
    max-width: 40rem;
  }
}

/* Labels sit right on their boxes, as in the mini program. */
.qhc-gm-queue .qhc-gm-field > span {
  min-height: 0;
}

/* Bob 2026-12-01 20:09: two columns on every phone, as in the mini program (the old ≤360px one-column
   rule made 名称／售价／进货成本… a single column on narrow Android phones). */
.qhc-gm-queue .qhc-gm-basic,
.qhc-gm-queue .qhc-gm-grid.qhc-gm-lines {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Bob 2026-12-01 20:12: 商品／产品／餐饮／服务 share the row in four equal widths, 3px apart (as in the
   mini program). A label that cannot fit a quarter keeps its own width rather than being cut. */
.qhc-gm-queue .qhc-gm-kinds.is-row {
  gap: 3px;
}

.qhc-gm-queue .qhc-gm-kinds.is-row .qhc-gm-choice {
  flex: 1 1 0;
  min-width: max-content;
  padding-left: 4px;
  padding-right: 4px;
}

.qhc-gm-queue .qhc-gm-kinds:not(.is-row) {
  gap: 3px;
}
