.chemrytgc-page {
  --chemrytgc-page-max: 1170px;
  --chemrytgc-card: #ffffff;
  --chemrytgc-border: #d7e0ea;
  --chemrytgc-ink: #16324a;
  --chemrytgc-muted: #5c7084;
  --chemrytgc-primary: #0d6e8a;
  --chemrytgc-primary-strong: #14532d;
  --chemrytgc-primary-soft: #e7f4fb;
  --chemrytgc-success: #14532d;
  --chemrytgc-success-soft: #dff5e6;
  --chemrytgc-danger: #b42318;
  --chemrytgc-danger-soft: #fde7e5;
  --chemrytgc-warm-soft: #fff8e6;
  --chemrytgc-shadow: 0 18px 40px rgba(20, 46, 67, 0.08);
  --chemrytgc-radius: 24px;
  --chemrytgc-control-height: 28px;
  --chemrytgc-font-family: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  min-height: 100vh;
  background: #eef3f8;
  color: var(--chemrytgc-ink);
  font-family: var(--chemrytgc-font-family);
  font-size: 14px;
  line-height: 1.45;
}

.chemrytgc-page *,
.chemrytgc-page *::before,
.chemrytgc-page *::after {
  box-sizing: border-box;
}

.chemrytgc-shell {
  width: min(100%, var(--chemrytgc-page-max));
  max-width: var(--chemrytgc-page-max);
  margin: 2rem auto 3rem;
  padding-inline: 15px;
}

.chemrytgc-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.35rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(13, 65, 98, 0.28);
  border-radius: var(--chemrytgc-radius);
  background:
    linear-gradient(135deg, rgba(12, 54, 88, 0.95), rgba(32, 110, 136, 0.92)),
    linear-gradient(120deg, #0e334d, #1f6c86);
  box-shadow: var(--chemrytgc-shadow);
  color: #f5fbff;
}

.chemrytgc-kicker,
.chemrytgc-card-kicker {
  margin: 0 0 0.25rem;
  color: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.chemrytgc-card-kicker {
  color: var(--chemrytgc-muted);
}

.chemrytgc-title,
.chemrytgc-card-title {
  margin: 0;
  line-height: 1.08;
}

.chemrytgc-title {
  color: #f5fbff;
  font-size: clamp(1.6rem, 2.2vw, 2rem);
}

.chemrytgc-card-title {
  color: var(--chemrytgc-ink);
  font-size: 1.05rem;
}

.chemrytgc-subtitle,
.chemrytgc-field-help,
.chemrytgc-inline-note,
.chemrytgc-result-copy,
.chemrytgc-chart-caption {
  margin: 0.35rem 0 0;
  color: var(--chemrytgc-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.chemrytgc-subtitle {
  max-width: 720px;
  color: rgba(233, 245, 255, 0.84);
  font-size: 0.98rem;
}

.chemrytgc-status {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid transparent;
  border-radius: 16px;
  font-weight: 600;
}

.chemrytgc-status--info {
  color: #124f75;
  background: var(--chemrytgc-primary-soft);
  border-color: #bddff0;
}

.chemrytgc-status--success {
  color: var(--chemrytgc-success);
  background: var(--chemrytgc-success-soft);
  border-color: #bde4c7;
}

.chemrytgc-status--error {
  color: var(--chemrytgc-danger);
  background: var(--chemrytgc-danger-soft);
  border-color: #f5c3bd;
}

.chemrytgc-progress {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #bddff0;
  border-radius: 12px;
  background: #f4fafc;
  color: #14344b;
}

.chemrytgc-progress[hidden] {
  display: none;
}

.chemrytgc-progress-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
}

.chemrytgc-progress-spinner {
  width: 1.15rem;
  height: 1.15rem;
  border: 3px solid #c7dfeb;
  border-top-color: #0d6e8a;
  border-radius: 50%;
  animation: chemrytgc-spin 0.8s linear infinite;
}

.chemrytgc-progress-title,
.chemrytgc-progress-detail,
.chemrytgc-progress-elapsed {
  display: block;
}

.chemrytgc-progress-title {
  font-size: 0.95rem;
  line-height: 1.25;
}

.chemrytgc-progress-detail {
  margin-top: 0.15rem;
  color: #587087;
  font-size: 0.86rem;
  line-height: 1.35;
}

.chemrytgc-progress-elapsed {
  min-width: 3.2rem;
  color: #587087;
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 800;
  text-align: right;
}

.chemrytgc-progress-track {
  position: relative;
  overflow: hidden;
  height: 6px;
  margin-top: 0.75rem;
  border-radius: 999px;
  background: #d9e9f1;
}

.chemrytgc-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d6e8a, #23a8bd);
  animation: chemrytgc-progress-sweep 1.35s ease-in-out infinite;
}

@keyframes chemrytgc-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes chemrytgc-progress-sweep {
  0% {
    transform: translateX(-105%);
  }
  50% {
    transform: translateX(75%);
  }
  100% {
    transform: translateX(245%);
  }
}

.chemrytgc-workspace {
  display: grid;
  gap: 1.15rem;
}

.chemrytgc-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--chemrytgc-card);
  border: 1px solid var(--chemrytgc-border);
  border-radius: var(--chemrytgc-radius);
  box-shadow: var(--chemrytgc-shadow);
  overflow: hidden;
}

.chemrytgc-card[hidden],
.chemrytgc-results-card[hidden],
.chemrytgc-method-card.is-collapsed .chemrytgc-card-body {
  display: none !important;
}

.chemrytgc-card-head,
.chemrytgc-card-body {
  padding: 1.25rem;
}

.chemrytgc-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #e5edf4;
}

.chemrytgc-analysis-mode {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  flex: 0 0 auto;
  gap: 0.65rem;
  margin: 0;
  min-height: 21px;
  padding: 0 0.45rem;
  border: 1px solid #cfdeeb;
  border-radius: 8px;
  background: #f7fbfe;
}

.chemrytgc-card-actions .chemrytgc-analysis-mode {
  align-self: center;
}

.chemrytgc-mode-option {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 19px;
  color: #27435a;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.chemrytgc-mode-option input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: #0d6e8a;
}

.chemrytgc-card-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chemrytgc-card-actions,
.chemrytgc-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.chemrytgc-card-actions {
  justify-content: space-between;
  width: 100%;
}

.chemrytgc-action-tools,
.chemrytgc-predict-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.chemrytgc-predict-group {
  margin-left: auto;
  justify-content: flex-end;
}

.chemrytgc-optimizer-control {
  display: inline-grid;
  grid-template-columns: auto 58px;
  align-items: center;
  gap: 0.35rem;
  min-height: 32px;
  padding: 0 0.5rem;
  border: 1px solid #cfdeeb;
  border-radius: 8px;
  background: #f7fbfe;
  color: #27435a;
  font-size: 0.74rem;
  font-weight: 800;
}

.chemrytgc-optimizer-control input {
  width: 58px;
  min-height: 22px;
  padding: 0 0.25rem;
  border: 1px solid #c7dceb;
  border-radius: 6px;
  background: #ffffff;
  color: #17364d;
  font: inherit;
  text-align: right;
}

.chemrytgc-optimizer-control--wide {
  grid-template-columns: auto 112px;
}

.chemrytgc-optimizer-control--slider {
  grid-template-columns: auto minmax(220px, 320px);
}

.chemrytgc-optimizer-control select {
  width: 112px;
  min-height: 24px;
  padding: 0 0.25rem;
  border: 1px solid #c7dceb;
  border-radius: 6px;
  background: #ffffff;
  color: #17364d;
  font: inherit;
}

.chemrytgc-optimizer-inline-slider {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
}

.chemrytgc-optimizer-inline-slider small {
  color: #526c82;
  font-size: 0.68rem;
  font-weight: 800;
}

.chemrytgc-optimizer-inline-slider input[type='range'] {
  width: 100%;
  accent-color: #0d6e8a;
}

.chemrytgc-optimizer-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d7e4ef;
  border-radius: 10px;
  background: #f8fbfd;
}

.chemrytgc-optimizer-strip__head {
  display: grid;
  gap: 0.1rem;
  min-width: 190px;
  color: #17364d;
}

.chemrytgc-optimizer-strip__head span {
  font-size: 0.82rem;
  font-weight: 900;
}

.chemrytgc-optimizer-strip__head small {
  color: #526c82;
  font-size: 0.72rem;
  font-weight: 700;
}

.chemrytgc-optimizer-strip__controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.chemrytgc-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.chemrytgc-modal[hidden] {
  display: none;
}

.chemrytgc-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 35, 52, 0.38);
}

.chemrytgc-modal__panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 2.5rem));
  padding: 1rem;
  overflow: auto;
  border: 1px solid #c9dce9;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(16, 42, 67, 0.28);
}

.chemrytgc-modal__head,
.chemrytgc-modal__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.chemrytgc-modal__body {
  display: grid;
  gap: 1rem;
}

.chemrytgc-icon-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #cddce8;
  border-radius: 8px;
  background: #f8fbfd;
  color: #27435a;
  cursor: pointer;
}

.chemrytgc-icon-btn:hover,
.chemrytgc-icon-btn:focus-visible {
  border-color: #0d6e8a;
  color: #0d6e8a;
}

.chemrytgc-optimizer-slider {
  display: grid;
  gap: 0.45rem;
}

.chemrytgc-optimizer-slider input[type='range'] {
  width: 100%;
  accent-color: #0d6e8a;
}

.chemrytgc-optimizer-slider__labels {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: #526c82;
  font-size: 0.76rem;
  font-weight: 800;
}

.chemrytgc-optimizer-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.chemrytgc-optimizer-output {
  min-height: 148px;
  padding: 0.85rem;
  border: 1px solid #d7e4ef;
  border-radius: 10px;
  background: #f8fbfd;
  color: #17364d;
  font-family: Consolas, Monaco, 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.chemrytgc-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 0;
  height: 21px;
  min-height: 21px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.chemrytgc-btn:hover,
.chemrytgc-btn:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.chemrytgc-btn:disabled,
.chemrytgc-btn[disabled] {
  cursor: wait;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.chemrytgc-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #0d6e8a 0%, #1793aa 100%);
  border-color: #0d6e8a;
  box-shadow: 0 14px 32px rgba(13, 110, 138, 0.22);
}

.chemrytgc-btn--secondary {
  color: #163347;
  background: #f4fafc;
  border-color: #d6e4ed;
}

.chemrytgc-btn--ghost {
  color: #5c7386;
  background: transparent;
  border-color: #d6e4ed;
}

.chemrytgc-collapse-toggle i {
  transition: transform 0.16s ease;
}

.chemrytgc-method-card.is-collapsed .chemrytgc-collapse-toggle i {
  transform: rotate(180deg);
}

.chemrytgc-structure-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  min-width: 0;
}

.chemrytgc-structure-layout > * {
  min-width: 0;
}

.chemrytgc-mixture-action {
  width: auto;
  justify-self: start;
  white-space: nowrap;
}

.chemrytgc-mixture-table {
  border: 1px solid #d9e4ee;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.chemrytgc-mixture-table--full {
  width: 100%;
}

.chemrytgc-mixture-table__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid #e5edf4;
  background: #f8fbfd;
  color: #17324a;
  font-size: 0.82rem;
  font-weight: 900;
}

.chemrytgc-mixture-table__head small {
  color: #587087;
  font-size: 0.78rem;
  font-weight: 800;
}

.chemrytgc-mixture-components {
  display: grid;
  max-height: 280px;
  overflow: auto;
}

.chemrytgc-mixture-empty {
  padding: 0.8rem;
  color: #587087;
  font-size: 0.84rem;
}

.chemrytgc-mixture-row {
  display: grid;
  grid-template-columns: 86px 28px minmax(0, 1fr) 78px 70px 34px;
  gap: 0.6rem;
  align-items: center;
  min-width: 0;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid #edf2f7;
}

.chemrytgc-mixture-row.is-disabled {
  opacity: 0.58;
}

.chemrytgc-mixture-row.is-active {
  border-left: 4px solid #0d6e8a;
  background: #edf9fc;
  box-shadow: inset 0 0 0 1px rgba(13, 110, 138, 0.24);
}

.chemrytgc-mixture-row.is-active .chemrytgc-mixture-meta strong {
  color: #0d6e8a;
}

.chemrytgc-mixture-row.is-coelution-risk {
  background: #fff4f3;
  box-shadow: inset 4px 0 0 #b42318;
}

.chemrytgc-mixture-row.is-coelution-risk .chemrytgc-mixture-meta strong {
  color: #8f1f17;
}

.chemrytgc-mixture-row:last-child {
  border-bottom: 0;
}

.chemrytgc-mixture-include {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #35506a;
  font-size: 0.78rem;
  font-weight: 800;
}

.chemrytgc-mixture-include input {
  width: 15px;
  height: 15px;
  accent-color: #0d6e8a;
}

.chemrytgc-mixture-color {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #cdd8e3;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.chemrytgc-mixture-meta {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.chemrytgc-mixture-meta strong,
.chemrytgc-mixture-meta code,
.chemrytgc-mixture-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chemrytgc-mixture-meta strong {
  color: #17324a;
  font-size: 0.82rem;
}

.chemrytgc-mixture-meta code {
  color: #21425b;
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 0.74rem;
}

.chemrytgc-mixture-meta span,
.chemrytgc-mixture-amount {
  color: #587087;
  font-size: 0.74rem;
  font-weight: 800;
}

.chemrytgc-mixture-amount {
  display: grid;
  gap: 0.12rem;
}

.chemrytgc-mixture-amount input {
  width: 100%;
  min-width: 0;
  padding: 0.32rem 0.36rem;
  border: 1px solid #cdd8e3;
  border-radius: 6px;
  color: #17324a;
  font-size: 0.78rem;
  font-weight: 800;
}

.chemrytgc-mixture-remove {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  color: #b42318;
}

.chemrytgc-jsme-shell {
  position: relative;
  min-height: 330px;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid #d7e0ea;
  border-radius: 20px;
  background: #ffffff;
  overflow: hidden;
}

.chemrytgc-jsme {
  width: 100%;
  min-height: 300px;
  height: 300px;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
}

.chemrytgc-jsme-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s;
}

.chemrytgc-jsme-overlay:hover {
  background: rgba(55, 80, 105, 0.06);
}

.chemrytgc-jsme-overlay__hint {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid #d7e0ea;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  color: #375069;
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.chemrytgc-jsme-overlay:hover .chemrytgc-jsme-overlay__hint {
  opacity: 1;
}

.chemrytgc-molecule-information {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.chemrytgc-form-grid,
.chemrytgc-summary-grid,
.chemrytgc-results-grid,
.chemrytgc-results-detail-grid {
  display: grid;
  gap: 0.75rem;
}

.chemrytgc-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

.chemrytgc-field {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}

.chemrytgc-toggle-field {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 39px;
  padding: 0.58rem 0.7rem;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #ffffff;
  color: #17364d;
  font-size: 0.82rem;
  font-weight: 800;
}

.chemrytgc-toggle-field input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #0d6e8a;
}

.chemrytgc-field--wide {
  grid-column: 1 / -1;
}

.chemrytgc-label {
  color: #375069;
  font-size: 0.85rem;
  font-weight: 700;
}

.chemrytgc-input,
.chemrytgc-select,
.chemrytgc-textarea {
  width: 100%;
  border: 1px solid #cdd8e3;
  background: #fbfdff;
  color: var(--chemrytgc-ink);
  font-family: var(--chemrytgc-font-family);
  font-size: 0.92rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.chemrytgc-input,
.chemrytgc-select {
  height: var(--chemrytgc-control-height);
  min-height: var(--chemrytgc-control-height);
  padding: 0 0.6rem;
  border-radius: 14px;
}

.chemrytgc-textarea {
  min-height: 84px;
  padding: 0.45rem 0.6rem;
  border-radius: 14px;
  resize: vertical;
}

.chemrytgc-textarea--smiles {
  min-height: 42px;
  resize: none;
}

.chemrytgc-calibration-textarea {
  min-height: 74px;
}

.chemrytgc-textarea--mono,
.chemrytgc-summary-data {
  font-family: "IBM Plex Mono", Consolas, monospace;
}

.chemrytgc-input:focus,
.chemrytgc-select:focus,
.chemrytgc-textarea:focus {
  border-color: #0d6e8a;
  box-shadow: 0 0 0 3px rgba(13, 110, 138, 0.14);
  outline: none;
}

.chemrytgc-input.chemrytgc-input--invalid,
.chemrytgc-select.chemrytgc-input--invalid,
.chemrytgc-textarea.chemrytgc-input--invalid {
  border-color: var(--chemrytgc-danger);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.1);
}

.chemrytgc-field-help {
  margin-top: 0;
  font-size: 0.82rem;
}

.chemrytgc-field-error {
  color: var(--chemrytgc-danger);
  font-size: 0.82rem;
}

.chemrytgc-field-error:empty {
  display: none;
}

.chemrytgc-flow-readout {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  margin-top: 0.45rem;
  color: #587087;
  font-size: 0.78rem;
  font-weight: 800;
}

.chemrytgc-flow-readout strong {
  color: #14344b;
  font-family: "IBM Plex Mono", Consolas, monospace;
}

.chemrytgc-phase-note {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #f4d6a6;
  border-radius: 10px;
  background: #fff8eb;
  color: #7a4b00;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.45;
}

.chemrytgc-phase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chemrytgc-phase-note[hidden] {
  display: none;
}

.chemrytgc-inline-validation {
  min-height: 20px;
  color: var(--chemrytgc-danger);
  font-size: 0.88rem;
  font-weight: 700;
}

.chemrytgc-inline-validation.chemrytgc-inline-validation--success {
  color: var(--chemrytgc-success);
}

.chemrytgc-inline-note {
  margin-top: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d9e4ee;
  border-radius: 12px;
  background: var(--chemrytgc-warm-soft);
  color: #6b4a00;
}

.chemrytgc-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chemrytgc-summary-grid--molecule {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chemrytgc-summary-item,
.chemrytgc-metric-card,
.chemrytgc-result-panel,
.chemrytgc-chart-card {
  min-width: 0;
  border: 1px solid #d9e4ee;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f7fbfe);
}

.chemrytgc-summary-item {
  padding: 0.85rem 1rem;
}

.chemrytgc-summary-item--wide {
  grid-column: 1 / -1;
}

.chemrytgc-summary-label,
.chemrytgc-metric-label {
  display: block;
  color: #587087;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chemrytgc-summary-value {
  display: block;
  margin-top: 0.35rem;
  color: #17324a;
  font-size: 0.92rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.chemrytgc-results-card {
  margin-top: 1.15rem;
}

.chemrytgc-results-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.chemrytgc-metric-card,
.chemrytgc-result-panel {
  padding: 1rem;
}

.chemrytgc-metric-value {
  display: block;
  margin-top: 0.35rem;
  color: #14344b;
  font-size: 1.55rem;
  font-weight: 800;
}

.chemrytgc-metric-value--compact {
  font-size: 1.1rem;
  line-height: 1.25;
}

.chemrytgc-green-metric-card {
  border-color: #cfe8d7;
}

.chemrytgc-green-metric-card.is-green-good {
  background: #f0fbf4;
}

.chemrytgc-green-metric-card.is-green-watch {
  background: #fff8e6;
  border-color: #f7d58b;
}

.chemrytgc-green-metric-card.is-green-risk {
  background: #fff4f3;
  border-color: #f2b8b5;
}

.chemrytgc-results-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chemrytgc-result-title {
  margin: 0;
  color: #17364f;
  font-size: 1rem;
}

.chemrytgc-chart-head {
  padding: 1rem 1rem 0;
}

.chemrytgc-chart-wrap {
  padding: 0.75rem 1rem 1rem;
}

.chemrytgc-chart-canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f1f7fb 100%);
}

.chemrytgc-method-summary-list,
.chemrytgc-molecule-summary-list {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chemrytgc-method-summary-list li,
.chemrytgc-molecule-summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #e7eef4;
}

.chemrytgc-method-summary-list li:last-child,
.chemrytgc-molecule-summary-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.chemrytgc-summary-term {
  color: #5b7287;
  font-weight: 600;
}

.chemrytgc-summary-data {
  color: #17364d;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.chemrytgc-prediction-note-card {
  display: grid;
  gap: 0.75rem;
}

.chemrytgc-prediction-note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.55rem;
  width: 100%;
}

.chemrytgc-prediction-note-cell {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  min-height: 36px;
  align-content: start;
  padding: 0.32rem 0.55rem;
  border: 1px solid #e1ebf3;
  border-radius: 7px;
  background: #ffffff;
}

.chemrytgc-prediction-note-cell strong {
  color: #5b7287;
  font-size: 0.72rem;
  line-height: 1.15;
  text-transform: uppercase;
}

.chemrytgc-prediction-note-cell span {
  color: #17364d;
  font-size: 0.84rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.chemrytgc-warning-card {
  display: grid;
  gap: 0.75rem;
}

.chemrytgc-warning-note {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.85rem;
  border: 1px solid #e1ebf3;
  border-radius: 7px;
  background: #ffffff;
  color: #17364d;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.45;
}

.chemrytgc-warning-note ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 1.1rem;
}

.chemrytgc-warning-note li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
}

.chemrytgc-warning-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.chemrytgc-warning-action {
  appearance: none;
  min-height: 21px;
  padding: 0 0.58rem;
  border: 1px solid #c7dceb;
  border-radius: 999px;
  background: #f4fafc;
  color: #0d5870;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.chemrytgc-warning-action:hover,
.chemrytgc-warning-action:focus-visible {
  border-color: #0d6e8a;
  background: #e7f4fb;
  outline: none;
}

.chemrytgc-warning-action--primary {
  border-color: #0d6e8a;
  background: #0d6e8a;
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(13, 110, 138, 0.12), 0 0 16px rgba(13, 110, 138, 0.28);
}

.chemrytgc-warning-action--primary:hover,
.chemrytgc-warning-action--primary:focus-visible {
  border-color: #0b5d75;
  background: #0b5d75;
  color: #ffffff;
}

.chemrytgc-warning-empty {
  color: #5b7287;
}

.chemrytgc-suitability-card {
  display: grid;
  gap: 0.75rem;
}

.chemrytgc-system-suitability {
  display: grid;
  gap: 0.35rem;
}

.chemrytgc-suitability-head,
.chemrytgc-suitability-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 84px 70px 76px minmax(180px, 1.4fr);
  gap: 0.55rem;
  align-items: center;
}

.chemrytgc-suitability-head {
  color: #5b7287;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.chemrytgc-suitability-row {
  padding: 0.48rem 0.6rem;
  border: 1px solid #e1ebf3;
  border-radius: 7px;
  background: #ffffff;
  color: #17364d;
  font-size: 0.84rem;
  font-weight: 700;
}

.chemrytgc-suitability-row.is-watch {
  border-color: #f7d58b;
  background: #fff8e6;
  color: #8a5a00;
}

.chemrytgc-suitability-row.is-risk {
  border-color: #f2b8b5;
  background: #fff4f3;
  color: #8f1f17;
}

.chemrytgc-ms-card {
  display: grid;
  gap: 0.75rem;
}

.chemrytgc-ms-spectrum {
  display: grid;
  gap: 0.38rem;
}

.chemrytgc-ms-head,
.chemrytgc-ms-row {
  display: grid;
  grid-template-columns: 70px minmax(150px, 1fr) minmax(180px, 1.1fr);
  gap: 0.6rem;
  align-items: center;
}

.chemrytgc-ms-head {
  color: #5b7287;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.chemrytgc-ms-row {
  min-height: 21px;
  padding: 0 0.58rem;
  border: 1px solid #e1ebf3;
  border-radius: 7px;
  background: #ffffff;
  color: #17364d;
  font-size: 0.84rem;
  font-weight: 700;
}

.chemrytgc-ms-row strong {
  color: #0d5870;
  font-size: 0.94rem;
}

.chemrytgc-ms-line {
  position: relative;
  display: block;
  min-height: 21px;
  height: 21px;
  overflow: hidden;
  border-radius: 5px;
  background: #edf4f8;
}

.chemrytgc-ms-line i {
  position: absolute;
  left: 0;
  top: 50%;
  height: 3px;
  min-width: 8px;
  border-radius: 999px;
  background: #0d6e8a;
  transform: translateY(-50%);
}

.chemrytgc-ms-line em {
  position: relative;
  z-index: 1;
  display: block;
  padding: 0.1rem 0.45rem;
  color: #17364d;
  font-style: normal;
  font-weight: 850;
  text-align: right;
}

.chemrytgc-reference-card {
  display: grid;
  gap: 0.75rem;
}

.chemrytgc-reference-ri-comparison {
  display: grid;
  gap: 0.65rem;
}

.chemrytgc-reference-bars {
  display: grid;
  gap: 0.45rem;
}

.chemrytgc-reference-bars div {
  display: grid;
  grid-template-columns: 170px 72px minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
  color: #17364d;
  font-size: 0.84rem;
  font-weight: 750;
}

.chemrytgc-reference-bars i {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: #0d6e8a;
}

.chemrytgc-reference-bars div:nth-child(2) i {
  background: #64748b;
}

.chemrytgc-reference-delta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: #17364d;
  font-size: 0.84rem;
  font-weight: 800;
}

.chemrytgc-reference-delta span {
  padding: 0.28rem 0.5rem;
  border-radius: 7px;
  background: #f3f8fb;
}

.chemrytgc-reference-delta.is-good span {
  color: #14532d;
  background: #e7f7ed;
}

.chemrytgc-reference-delta.is-watch span {
  color: #8a5a00;
  background: #fff8e6;
}

.chemrytgc-reference-delta.is-risk span {
  color: #8f1f17;
  background: #fff4f3;
}

.chemrytgc-resolution-card {
  display: grid;
  gap: 0.75rem;
}

.chemrytgc-resolution-matrix {
  display: grid;
  gap: 0.35rem;
}

.chemrytgc-coelution-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 7px;
  font-size: 0.86rem;
  font-weight: 850;
}

.chemrytgc-coelution-alert span {
  min-width: 0;
}

.chemrytgc-coelution-alert.is-critical {
  border: 1px solid #f2b8b5;
  background: #fff4f3;
  color: #8f1f17;
}

.chemrytgc-coelution-alert.is-watch {
  border: 1px solid #f7d58b;
  background: #fff8e6;
  color: #8a5a00;
}

.chemrytgc-resolution-head,
.chemrytgc-resolution-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(90px, 0.65fr) minmax(70px, 0.45fr) minmax(220px, 1.6fr);
  gap: 0.5rem;
  align-items: center;
}

.chemrytgc-resolution-head {
  color: #5b7287;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.chemrytgc-resolution-row {
  padding: 0.48rem 0.6rem;
  border: 1px solid #e1ebf3;
  border-radius: 7px;
  background: #ffffff;
  color: #17364d;
  font-size: 0.84rem;
  font-weight: 700;
}

.chemrytgc-resolution-row.is-critical,
.chemrytgc-resolution-row.is-risk {
  border-color: #f2b8b5;
  background: #fff4f3;
  color: #8f1f17;
}

.chemrytgc-resolution-row.is-watch {
  border-color: #f7d58b;
  background: #fff8e6;
  color: #8a5a00;
}

@media (max-width: 1100px) {
  .chemrytgc-structure-layout,
  .chemrytgc-results-detail-grid {
    grid-template-columns: 1fr;
  }

  .chemrytgc-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .chemrytgc-shell {
    margin: 1.5rem auto 2.5rem;
    padding-inline: 1rem;
  }

  .chemrytgc-hero-card,
  .chemrytgc-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .chemrytgc-card-head,
  .chemrytgc-card-body {
    padding: 1rem;
  }

  .chemrytgc-form-grid,
  .chemrytgc-summary-grid,
  .chemrytgc-results-grid {
    grid-template-columns: 1fr;
  }

  .chemrytgc-card-actions,
  .chemrytgc-action-bar {
    align-items: flex-start;
  }

  .chemrytgc-btn {
    width: auto;
    max-width: 100%;
    white-space: normal;
  }

  .chemrytgc-analysis-mode {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  .chemrytgc-optimizer-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .chemrytgc-optimizer-strip__controls {
    justify-content: flex-start;
  }

  .chemrytgc-optimizer-modal-grid {
    grid-template-columns: 1fr;
  }

  .chemrytgc-mixture-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .chemrytgc-jsme-shell {
    min-height: 290px;
  }

  .chemrytgc-jsme {
    min-height: 260px;
    height: 260px;
  }

  .chemrytgc-method-summary-list li,
  .chemrytgc-molecule-summary-list li {
    flex-direction: column;
  }

  .chemrytgc-summary-data {
    text-align: left;
  }

  .chemrytgc-prediction-note-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chemrytgc-resolution-head {
    display: none;
  }

  .chemrytgc-resolution-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .chemrytgc-reference-bars div {
    grid-template-columns: 1fr;
  }

  .chemrytgc-warning-note li {
    grid-template-columns: 1fr;
  }

  .chemrytgc-warning-actions {
    justify-content: flex-start;
  }

  .chemrytgc-coelution-alert {
    align-items: flex-start;
    flex-direction: column;
  }

  .chemrytgc-ms-head {
    display: none;
  }

  .chemrytgc-ms-row {
    grid-template-columns: 1fr;
  }

  .chemrytgc-suitability-head {
    display: none;
  }

  .chemrytgc-suitability-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .chemrytgc-prediction-note-grid {
    grid-template-columns: 1fr;
  }
}
