﻿:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: #f5f7fb;
  color: #142033;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, #eef4ff 0, #f8fafc 260px, #ffffff 100%);
}

.app-shell {
  width: min(980px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.site-footer {
  width: 100%;
  margin: 0;
  padding: 18px 0 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #64748b;
  font-size: 11px;
}

.site-footer a,
.site-footer a:link,
.site-footer a:visited {
  color: #94a3b8;
  font-weight: 400;
  text-decoration: none !important;
  line-height: 1.6;
}

.site-footer a:hover,
.site-footer a:focus,
.site-footer a:focus-visible,
.site-footer a:active {
  color: #60a5fa;
  text-decoration: none !important;
}

.spin-result-page {
  width: min(1040px, calc(100vw - 36px));
  padding-top: 30px;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.hero-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: start;
}

.hero-brand .description {
  grid-column: 2;
}

.site-logo {
  width: 54px;
  height: 54px;
  margin-top: 2px;
  border-radius: 8px;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 10px;
  color: #2f6f91;
  font-size: 14px;
  font-weight: 700;
}

h1 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 42px;
  line-height: 1.15;
  font-weight: 800;
}

.description {
  max-width: 680px;
  margin: 0;
  color: #50627c;
  font-size: 18px;
  line-height: 1.75;
}

.version {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid #cfdbea;
  border-radius: 6px;
  background: #ffffff;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.upload-card {
  padding: 22px;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(41, 56, 82, 0.08);
}

.analysis-card {
  margin-top: 18px;
  padding: 26px;
  border: 1px solid #d8e2ef;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 20px 46px rgba(38, 58, 92, 0.09);
  scroll-margin-top: 18px;
}

h2 {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0;
}

.analysis-message {
  margin: 0;
  color: #7c2d12;
  font-size: 16px;
  line-height: 1.7;
}

.error-hints {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #7c2d12;
}

.error-hints strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
}

.error-hints ul {
  margin: 0;
  padding-left: 20px;
}

.error-hints li {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.65;
}

.spin-result-card {
  position: relative;
}

.result-source {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin: 0 0 16px;
  padding: 0 14px;
  border-radius: 999px;
  background: #e8f2ff;
  color: #075db8;
  font-size: 15px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px #d2e6ff;
}

.fsg-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
  padding: 2px;
}

.fsg-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  border: 0;
  background: transparent;
  table-layout: fixed;
}

.fsg-table th,
.fsg-table td {
  padding: 15px 16px;
  border-top: 1px solid #d7e5f5;
  border-bottom: 1px solid #d7e5f5;
  text-align: left;
  vertical-align: middle;
  box-shadow: 0 8px 20px rgba(40, 58, 86, 0.05);
}

.fsg-table th {
  border-left: 1px solid #d7e5f5;
  border-radius: 8px 0 0 8px;
  background: #f4f8ff;
  color: #23466d;
  font-size: 15px;
  font-weight: 800;
  width: 230px;
}

.fsg-table td {
  border-right: 1px solid #d7e5f5;
  border-radius: 0 8px 8px 0;
  background: #ffffff;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.6;
}

.fsg-pair-table {
  min-width: 0;
}

.fsg-table tr:hover th {
  background: #eaf3ff;
}

.fsg-table tr:hover td {
  background: #fbfdff;
}

.fsg-block-table {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 4px 0 0;
}

.fsg-block-row {
  display: grid;
  grid-template-columns: minmax(250px, 36%) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.fsg-block-label,
.fsg-block-value {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 8px;
  color: #142033;
  font-size: 18px;
  line-height: 1.25;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56), 0 5px 12px rgba(45, 63, 92, 0.04);
}

.fsg-block-label {
  font-weight: 800;
  font-size: 15px;
}

.fsg-block-row:nth-child(odd) .fsg-block-label,
.fsg-block-row:nth-child(odd) .fsg-block-value {
  background: linear-gradient(180deg, #f0f5ff 0%, #eaf1ff 100%);
}

.fsg-block-row:nth-child(even) .fsg-block-label,
.fsg-block-row:nth-child(even) .fsg-block-value {
  background: linear-gradient(180deg, #fff2f2 0%, #ffecec 100%);
}

.fsg-block-value {
  font-weight: 500;
  overflow-wrap: anywhere;
}

.fsg-block-row:hover .fsg-block-label,
.fsg-block-row:hover .fsg-block-value {
  filter: brightness(1.025);
  transform: translateY(-1px);
  transition: filter 120ms ease, transform 120ms ease;
}

.formula-cell {
  font-family: "Times New Roman", "Cambria Math", serif;
  font-style: italic;
  word-break: break-word;
}

.math-formula {
  display: inline-block;
  margin-right: 6px;
  font-size: 21px;
}

.math-formula sup,
.math-formula sub {
  font-size: 0.68em;
  line-height: 0;
}

.math-formula sup {
  vertical-align: super;
}

.math-formula sub {
  vertical-align: sub;
}

.overline {
  text-decoration: overline;
  text-decoration-thickness: 1px;
}

.math-separator {
  display: inline-block;
  margin: 0 6px;
  font-style: normal;
}

.math-frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 1px;
  font-size: 0.78em;
  line-height: 1;
  vertical-align: middle;
}

.math-frac-num {
  display: block;
  padding: 0 2px 1px;
  border-bottom: 1px solid currentColor;
}

.math-frac-den {
  display: block;
  padding: 1px 2px 0;
}

.math-sqrt {
  display: inline-flex;
  align-items: flex-end;
}

.index-link {
  color: #0d6efd;
  font-family: "Times New Roman", serif;
  font-size: 18px;
  font-style: italic;
  font-weight: 700;
  text-decoration: none;
}

.index-link:hover {
  text-decoration: underline;
}

.index-text {
  color: #0f172a;
  font-family: "Times New Roman", serif;
  font-size: 18px;
  font-style: italic;
  font-weight: 500;
}

.math-like {
  font-family: "Times New Roman", "Cambria Math", serif;
  font-style: italic;
}

.math-like sub,
.math-like sup {
  font-size: 0.72em;
  line-height: 0;
}

.math-like sub {
  vertical-align: sub;
}

.math-like sup {
  vertical-align: super;
}

.math-like small {
  display: block;
  margin-top: 4px;
  color: #172033;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
  font-style: normal;
}

.operation-card {
  position: relative;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 0;
}

.operation-card::before {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #9cc7ff 0%, #ffd0df 100%);
  content: "";
}

.operation-card h3 {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.25;
}

.operation-card h4 {
  margin: 0 0 12px;
  color: #183253;
  font-size: 18px;
}

.oriented-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  margin-bottom: 16px;
  padding: 12px 18px;
  border: 1px solid #d8e6f8;
  border-radius: 10px;
  background: #f7fbff;
  color: #1f2f46;
  text-align: center;
}

.oriented-summary span {
  font-weight: 800;
}

.oriented-summary strong {
  font-size: 18px;
  font-weight: 600;
}

.operation-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.operation-guide-row {
  display: block;
  padding: 16px 18px;
  border: 1px solid #d9e7f7;
  border-radius: 10px;
  background: #fbfdff;
}

.operation-guide-row > div > strong,
.operation-guide-row > div > span {
  display: block;
}

.operation-guide-row > div > strong {
  margin-bottom: 6px;
  color: #15243a;
  font-size: 17px;
}

.operation-guide-row > div > span {
  color: #53657c;
  font-size: 15px;
  line-height: 1.55;
}

.matrix-detail summary span {
  display: inline;
}

.matrix-detail summary .fraction {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.operation-guide-row .operation-fold {
  margin-top: 14px;
}

/* Keep paired operation cards and their expand controls horizontally aligned. */
.operation-guide {
  align-items: stretch;
}

.operation-guide-row {
  display: flex;
  flex-direction: column;
}

.operation-guide-row > div:first-child {
  min-height: 70px;
}

.operation-guide-row .operation-fold {
  margin-top: auto;
}

.operation-guide-row .operation-list {
  border: 0;
  border-radius: 0;
  padding: 14px;
}

.operation-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.operation-fold {
  margin-top: 18px;
  border: 1px solid #d8e5f5;
  border-radius: 10px;
  background: #fbfdff;
  overflow: hidden;
}

.operation-fold > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  background: #eef6ff;
  color: #0b4f9c;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

.operation-fold > summary:hover {
  background: #e2f0ff;
}

.operation-fold[open] > summary {
  border-bottom: 1px solid #d8e5f5;
}

.operation-fold .operation-columns {
  padding: 16px;
}

.operation-list {
  padding: 16px;
  border: 1px solid #d8e5f5;
  border-radius: 10px;
  background: #ffffff;
}

.matrix-detail {
  margin-top: 10px;
  border: 1px solid #e0e8f2;
  border-radius: 8px;
  background: #f8fbff;
  overflow: hidden;
}

.matrix-detail summary {
  padding: 12px 14px;
  color: #17395f;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.matrix-detail summary em {
  margin-left: 8px;
  color: #64748b;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.matrix-detail[open] summary {
  border-bottom: 1px solid #e0e8f2;
  background: #eef6ff;
}

.matrix-grid {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.matrix-grid span {
  display: inline-block;
  margin-bottom: 4px;
  color: #41536b;
  font-size: 13px;
  font-weight: 800;
}

.matrix-grid pre,
.tensor-code-card pre {
  margin: 0;
  overflow-x: auto;
  border-radius: 7px;
  background: #0f172a;
  color: #e5eefc;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.55;
}

.matrix-grid pre {
  padding: 10px;
}

.matrix-box {
  position: relative;
  display: inline-grid;
  gap: 6px;
  margin: 4px 0 2px;
  padding: 8px 14px;
  color: #0f172a;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 18px;
  line-height: 1.2;
}

.matrix-box::before,
.matrix-box::after {
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: 8px;
  content: "";
}

.matrix-box::before {
  left: 0;
  border-top: 2px solid #273142;
  border-bottom: 2px solid #273142;
  border-left: 2px solid #273142;
}

.matrix-box::after {
  right: 0;
  border-top: 2px solid #273142;
  border-right: 2px solid #273142;
  border-bottom: 2px solid #273142;
}

.matrix-row {
  display: grid;
  gap: 14px;
  align-items: center;
  justify-items: center;
}

.matrix-square .matrix-row {
  grid-template-columns: repeat(3, minmax(34px, auto));
}

.matrix-vector .matrix-row {
  grid-template-columns: minmax(34px, auto);
}

.continuous-operation {
  margin: 12px;
  padding: 14px 16px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #ffffff;
}

.continuous-operation strong {
  display: block;
  margin-bottom: 8px;
  color: #17395f;
  font-size: 15px;
}

.continuous-operation p {
  margin: 6px 0 0;
  color: #4b5f78;
  font-size: 14px;
  line-height: 1.7;
}

.tensor-response-card {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #e4edf8;
}

.tensor-response-card h3 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 24px;
}

.response-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.response-section-title h3 {
  margin: 0;
}

.soc-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

.soc-badge.no-soc {
  background: #e8f2ff;
  color: #075db8;
  box-shadow: inset 0 0 0 1px #cfe4ff;
}

.soc-badge.with-soc {
  background: #fff0f5;
  color: #b4235a;
  box-shadow: inset 0 0 0 1px #ffd0e0;
}

.tensor-note {
  margin: 0 0 14px;
  color: #53657c;
  font-size: 15px;
  line-height: 1.7;
}

.tensor-note .paper-link {
  color: #2f80ed;
  font-weight: 800;
  text-decoration: none;
}

.tensor-note .paper-link:hover {
  color: #0b5ed7;
  text-decoration: none;
}

.tensor-fold {
  border: 1px solid #d8e5f5;
  border-radius: 10px;
  background: #fbfdff;
  overflow: hidden;
}

.tensor-fold > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  background: #eef6ff;
  color: #0b4f9c;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.tensor-fold[open] > summary {
  border-bottom: 1px solid #d8e5f5;
}

.tensor-section {
  padding: 18px;
  border-top: 1px solid #edf3fb;
}

.tensor-overview-card {
  margin-top: 26px;
  padding: 22px 14px 24px;
  border: 0;
  border-top: 1px solid #e5edf7;
  border-radius: 0;
  background: #ffffff;
}

.tensor-overview-card h3 {
  margin: 0 0 18px;
  color: #0f172a;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 950;
}

.tensor-overview-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 14px;
  align-items: stretch;
  max-width: 100%;
  min-width: 0;
}

.overview-head {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #bfd38f;
  border-radius: 8px;
  background: #eef6d7;
  color: #15233a;
  text-align: center;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.overview-nosoc {
  background: #eef6d7;
}

.overview-soc {
  background: #eef6d7;
}

.overview-type-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #10213a;
  text-align: center;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.overview-state-card {
  display: grid;
  align-content: center;
  gap: 9px;
  min-height: 70px;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 8px;
  color: #13243d;
  overflow: visible;
  overflow-wrap: anywhere;
}

.overview-row-blue {
  border-color: #d6e3ff;
  background: #edf4ff;
}

.overview-row-pink {
  border-color: #ffd8d8;
  background: #fff1f1;
}

.overview-cell-blue {
  border: 1px solid #d6e3ff;
  background: #edf4ff;
}

.overview-cell-pink {
  border: 1px solid #ffd8d8;
  background: #fff1f1;
}

.overview-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  column-gap: 10px;
  row-gap: 5px;
  align-items: baseline;
  min-width: 0;
  max-width: 100%;
}

.overview-line-label {
  color: #10213a;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 900;
  min-width: 0;
  overflow-wrap: anywhere;
}

.overview-line-count {
  justify-self: end;
  color: #345070;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.overview-line.no-items .overview-line-count {
  color: #8b5f63;
}

.overview-line .overview-symbol-list,
.overview-line .overview-empty {
  grid-column: 1 / -1;
}

.overview-symbol-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 4px 8px;
  min-width: 0;
  max-width: 100%;
}

.tensor-overview-card .tensor-symbol-chip {
  max-width: 100%;
  margin: 0 8px 4px 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}

.overview-split {
  display: grid;
  gap: 10px;
}

.overview-split strong {
  display: block;
  margin-bottom: 6px;
  color: #183253;
  font-size: 14px;
}

/* SHG classification belongs to the magnetic-point-group (with-SOC) branch. */
.overview-shg-classification {
  position: relative;
  display: grid;
  gap: 3px;
  margin-bottom: 5px;
  padding: 8px 10px;
  border: 1px solid rgba(60, 125, 117, 0.38);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: #173e59;
}

.overview-shg-classification-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #10213a;
  font-size: 14px;
  line-height: 1.25;
}

.overview-shg-classification-value {
  color: #13243d;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 17px;
  line-height: 1.3;
}

.overview-shg-classification-note {
  color: #436783;
  font-size: 12px;
  line-height: 1.35;
}

.overview-shg-help {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: #1296d4;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.overview-shg-help:hover,
.overview-shg-help:focus-visible {
  background: #087db9;
  outline: none;
  transform: translateY(-1px);
}

.overview-shg-info-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 10px);
  right: 0;
  width: min(470px, calc(100vw - 48px));
  max-height: min(540px, calc(100vh - 52px));
  padding: 15px 17px;
  border: 1px solid #b9d3f4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(40, 58, 86, 0.2);
  color: #234462;
  text-align: left;
  overflow-y: auto;
}

.overview-shg-info-popover > strong {
  display: block;
  color: #102c4b;
  font-size: 16px;
}

.overview-shg-info-popover p,
.overview-shg-info-popover small {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
}

.overview-shg-info-popover small {
  display: block;
  color: #66809a;
}

.overview-shg-info-popover small a {
  color: #256da1;
  font-weight: 700;
  text-decoration: none;
}

.overview-shg-info-popover small a:hover,
.overview-shg-info-popover small a:focus-visible {
  color: #0b5788;
  text-decoration: underline;
}

.overview-empty {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  min-height: 0;
  background: transparent;
  color: #111827;
  font-size: 22px;
  font-weight: 900;
}

.overview-muted {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  color: #7b8795 !important;
  font-size: 13px;
}

.muted-state {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #233f63;
  text-align: left;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.tensor-section:first-of-type {
  border-top: 0;
}

.tensor-section h4 {
  margin: 0 0 10px;
  color: #183253;
  font-size: 19px;
}

.tensor-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tensor-heading > span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 18px;
  border-radius: 10px;
  color: #10213a;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(50, 80, 120, 0.08);
}

.tensor-heading-ahe > span,
.tensor-heading-she > span {
  background: #d8e5fb;
}

.tensor-heading-shg > span,
.tensor-heading-spge > span {
  background: #fde0e0;
}

.tensor-theme-blue {
  --tensor-accent: #2f6fca;
  --tensor-accent-dark: #064f9e;
  --tensor-soft: #eef6ff;
  --tensor-soft-strong: #d8e8ff;
  --tensor-border: #bcd8fb;
}

.tensor-theme-pink {
  --tensor-accent: #d65f73;
  --tensor-accent-dark: #9f273c;
  --tensor-soft: #fff1f3;
  --tensor-soft-strong: #fde0e4;
  --tensor-border: #f4bbc4;
}

.tensor-theme-blue .tensor-heading > span,
.tensor-theme-pink .tensor-heading > span {
  background: var(--tensor-soft-strong);
  color: #10213a;
  box-shadow: inset 0 0 0 1px var(--tensor-border);
}

.tensor-section h4 small {
  margin-left: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.tensor-formula-card {
  display: grid;
  gap: 4px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--tensor-border, #dbe8f8);
  border-radius: 10px;
  background: var(--tensor-soft, #f8fbff);
  color: #29496d;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 15px;
  line-height: 1.55;
}

.tensor-formula-card strong {
  color: var(--tensor-accent-dark, #0f4f93);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
}

.tensor-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.tensor-mode {
  padding: 12px;
  border: 1px solid var(--tensor-border, #dbe7f5);
  border-radius: 10px;
  background: #ffffff;
  min-width: 0;
}

.tensor-theme-blue .tensor-mode,
.tensor-theme-pink .tensor-mode {
  background: linear-gradient(180deg, #ffffff 0%, var(--tensor-soft) 100%);
}

.tensor-mode.single {
  max-width: 520px;
}

.tensor-mode strong {
  display: block;
  margin-bottom: 8px;
  color: #10213a;
  font-size: 16px;
}

.tensor-mode > .tensor-formula-card {
  margin: 6px 0 12px;
  padding: 9px 10px;
  font-size: 14px;
}

.tensor-mode p {
  margin: 6px 0;
  color: #52657c;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.tensor-count-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tensor-count-line strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 30px;
  margin: 0;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--tensor-soft-strong, #cfe4ff);
  color: var(--tensor-accent-dark, #003f8f);
  font-size: 17px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px var(--tensor-border, #8fc2ff);
}

.tensor-count-line strong.is-zero {
  background: #f1f5f9;
  color: #64748b;
  box-shadow: inset 0 0 0 1px #d8e0ea;
}

.tensor-matrix-fold {
  margin-top: 12px;
  border: 1px solid var(--tensor-border, #d8e5f5);
  border-radius: 8px;
  background: #fbfdff;
  overflow: hidden;
}

.tensor-matrix-fold > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  background: var(--tensor-soft, #eef6ff);
  color: var(--tensor-accent-dark, #0b4f9c);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

.tensor-matrix-fold > summary:hover {
  background: var(--tensor-soft-strong, #e2f0ff);
}

.tensor-matrix-fold[open] > summary {
  border-bottom: 1px solid var(--tensor-border, #d8e5f5);
}

.tensor-matrix-block {
  margin-top: 12px;
}

.tensor-matrix-block > span {
  display: block;
  margin-bottom: 6px;
  color: #29496d;
  font-size: 13px;
  font-weight: 800;
}

.tensor-symbol-chip {
  display: inline-block;
  margin: 0 8px 6px 0;
  color: #1f3b5d;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 16px;
}

.tensor-symbol-chip sub,
.tensor-symbol-chip sup {
  font-size: 0.72em;
  line-height: 0;
}

.tensor-matrix-wrap {
  overflow-x: visible;
  padding: 8px 0;
}

.tensor-matrix {
  position: relative;
  display: inline-grid;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  color: #0f172a;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 15px;
  line-height: 1.2;
}

.tensor-matrix::before,
.tensor-matrix::after {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 9px;
  content: "";
}

.tensor-matrix::before {
  left: 0;
  border-top: 2px solid #273142;
  border-bottom: 2px solid #273142;
  border-left: 2px solid #273142;
}

.tensor-matrix::after {
  right: 0;
  border-top: 2px solid #273142;
  border-right: 2px solid #273142;
  border-bottom: 2px solid #273142;
}

.tensor-matrix-row {
  display: grid;
  grid-template-columns: repeat(var(--tensor-cols), minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  justify-items: center;
}

.tensor-matrix-row span {
  white-space: nowrap;
}

.tensor-matrix sub,
.tensor-matrix sup {
  font-size: 0.72em;
  line-height: 0;
}

.magnetic-tensor-card {
  position: relative;
  margin-top: 48px;
  padding: 30px 22px 22px;
  border: 1px solid #d6e4f4;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
  box-shadow: 0 16px 34px rgba(40, 58, 86, 0.06);
}

.magnetic-tensor-card::before {
  position: absolute;
  top: -28px;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #9cc7ff 0%, #ffd0df 100%);
  content: "";
}

.magnetic-tensor-card h3 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 24px;
}

.magnetic-point-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.magnetic-point-summary > div {
  min-height: 86px;
  padding: 14px 16px;
  border: 1px solid #d6e4f4;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f2f7ff 100%);
}

.magnetic-point-summary span {
  display: block;
  margin-bottom: 8px;
  color: #52657c;
  font-size: 14px;
  font-weight: 700;
}

.magnetic-point-summary strong,
.magnetic-point-summary code {
  display: block;
  color: #0f315f;
  font-size: 18px;
  font-weight: 900;
}

.magnetic-point-summary code {
  white-space: normal;
  font-family: Consolas, "Courier New", monospace;
}

.mpg-operation-fold {
  margin-top: 4px;
}

.mpg-operation-fold > summary {
  color: #0b4f9c;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
}

.mpg-operation-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  margin-top: 10px;
  overflow-y: auto;
  padding-right: 4px;
}

.compact-mpg-detail {
  margin-top: 0;
  background: #ffffff;
}

.compact-mpg-detail summary {
  padding: 10px 12px;
  font-size: 14px;
}

.mpg-simple-symbol {
  font-weight: 900;
}

.time-prime {
  color: #e11d48;
  font-size: 1.15em;
  font-weight: 900;
  line-height: 0;
}

.mpg-matrix-grid {
  grid-template-columns: 1fr;
}

.mpg-matrix-with-prime {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
}

.matrix-time-prime {
  margin-top: -4px;
}

.time-reversal-chip {
  align-self: start;
  padding: 8px 10px;
  border: 1px solid #d6e4f4;
  border-radius: 8px;
  background: #f8fbff;
}

.time-reversal-chip strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: #0b4f9c;
  font-size: 16px;
}

.magnetic-tensor-note {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed #b7cdec;
  border-radius: 10px;
  background: #fbfdff;
}

.magnetic-tensor-note strong {
  display: block;
  margin-bottom: 6px;
  color: #0f4f93;
}

.magnetic-tensor-note p {
  margin: 0;
  color: #52657c;
  font-size: 14px;
  line-height: 1.7;
}

.tensor-code-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #d8e5f5;
  border-radius: 10px;
  background: #fbfdff;
}

.tensor-code-card pre {
  padding: 14px;
}

.compact-warning {
  margin-top: 10px;
}

.oriented-ssg {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 10px 18px;
  align-items: center;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #b9d4ff;
  border-radius: 8px;
  background: #f5f9ff;
}

.oriented-ssg span {
  color: #264267;
  font-size: 16px;
  font-weight: 800;
}

.oriented-ssg strong {
  color: #0b5ed7;
  font-size: 20px;
}

.oriented-ssg small {
  grid-column: 2;
  color: #5f6f86;
  font-size: 14px;
}

.attention-flash {
  animation: attentionPulse 1.1s ease-out 1;
}

.warning-callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1px solid #f4b183;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
}

.warning-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f97316;
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.warning-callout strong {
  display: block;
  margin-bottom: 6px;
  color: #7c2d12;
  font-size: 16px;
}

.warning-callout p {
  margin: 0;
  color: #9a3412;
  font-size: 16px;
  line-height: 1.7;
}

@keyframes attentionPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.45);
    transform: translateY(-2px);
  }
  100% {
    box-shadow: 0 0 0 16px rgba(249, 115, 22, 0);
    transform: translateY(0);
  }
}

.save-message {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 5px;
  font-size: 15px;
}

.save-message.success {
  border: 1px solid #b7e4c7;
  background: #effaf3;
  color: #166534;
}

.save-message.failed {
  border: 1px solid #f5c2c7;
  background: #fff1f2;
  color: #991b1b;
}

.structure-card {
  margin-top: 18px;
}

.parameter-grid {
  display: grid;
  gap: 14px;
}

.parameter-grid label {
  display: grid;
  gap: 6px;
}

.structure-field-block {
  display: grid;
  gap: 6px;
}

.parameter-inline-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  align-items: end;
}

.parameter-inline-grid label {
  min-width: 0;
  position: relative;
}

.parameter-inline-grid small {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.parameter-grid span {
  color: #263244;
  font-size: 15px;
  font-weight: 700;
}

.parameter-label-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.parameter-help-button {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: #0d6efd;
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
}

.parameter-help-button:hover,
.parameter-help-button[aria-expanded="true"] {
  background: #075da8;
}

.parameter-help-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: min(320px, 82vw);
  padding: 12px 14px;
  border: 1px solid #9fc5f8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(31, 61, 100, 0.16);
  color: #263244;
  font-size: 13px;
  line-height: 1.55;
}

.parameter-help-panel strong {
  display: block;
  margin-bottom: 6px;
  color: #0f172a;
  font-size: 14px;
}

.parameter-help-panel p {
  margin: 0 0 8px;
}

.parameter-help-panel p:last-child {
  margin-bottom: 0;
}

.parameter-help-panel code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #eef6ff;
  color: #075da8;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.magnetism-mode-control {
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: fit-content;
  overflow: hidden;
  border: 1px solid #9fc5f8;
  border-radius: 6px;
  background: #ffffff;
}

.magnetism-mode-control label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 14px;
  border-right: 1px solid #9fc5f8;
  color: #075da8;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.magnetism-mode-control label:last-child {
  border-right: 0;
}

.magnetism-mode-control input {
  width: 10px;
  height: 10px;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.magnetism-mode-control label:has(input:checked) {
  background: #e8f2ff;
}

.parameter-grid input,
.parameter-grid select,
.parameter-grid textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #ffffff;
  color: #475569;
  font: inherit;
  font-size: 15px;
}

.parameter-grid input,
.parameter-grid select {
  min-height: 38px;
  padding: 0 12px;
}

.parameter-grid textarea {
  min-height: 220px;
  padding: 12px;
  line-height: 1.55;
  resize: vertical;
  white-space: pre;
}

.parameter-grid small {
  color: #6b7788;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .parameter-inline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 520px) {
  .parameter-inline-grid {
    grid-template-columns: 1fr;
  }
}

.structure-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.save-button {
  justify-self: start;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 5px;
  background: #0d6efd;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.save-button:hover {
  background: #0b5ed7;
}

.save-button:disabled {
  background: #7daeed;
  cursor: wait;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(241, 247, 255, 0.78);
  backdrop-filter: blur(4px);
}

.loading-overlay.is-visible {
  display: flex;
}

.loading-panel {
  width: min(420px, 100%);
  padding: 30px 28px;
  border: 1px solid #cfe0f5;
  border-radius: 12px;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 24px 70px rgba(24, 43, 75, 0.18);
}

.loading-panel h2 {
  margin: 14px 0 8px;
  color: #10213a;
  font-size: 25px;
}

.loading-panel p {
  margin: 0;
  color: #596b82;
  font-size: 15px;
  line-height: 1.7;
}

.loading-spinner {
  width: 46px;
  height: 46px;
  margin: 0 auto;
  border: 4px solid #dceaff;
  border-top-color: #0d6efd;
  border-radius: 50%;
  animation: loadingSpin 0.85s linear infinite;
}

@keyframes loadingSpin {
  to {
    transform: rotate(360deg);
  }
}

.upload-form {
  margin: 0;
}


/* 首页上传区：改为左侧上传、右侧流程卡片的布局 */
.home-upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 345px;
  gap: 58px;
  align-items: start;
  padding: 28px 48px;
  border: 1px dashed #5f88c8;
  background: #f4f8ff;
  box-shadow: none;
}

.upload-left {
  min-width: 0;
  padding: 22px 0 8px;
}

.home-upload-layout .file-box {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.home-upload-layout .file-title {
  margin-bottom: 36px;
}

.home-upload-layout .file-note {
  max-width: 460px;
  margin-bottom: 28px;
  line-height: 1.9;
}

.home-upload-layout .file-actions {
  display: grid;
  gap: 28px;
  justify-items: start;
}

.home-upload-layout .submit-button {
  margin-left: 0;
  min-width: 230px;
}

.home-upload-layout .workflow {
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 0;
}

.home-upload-layout .workflow div {
  min-height: 120px;
}

.current-file-form {
  margin: 0 0 16px;
}

.current-file-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #cbdcf2;
  border-radius: 8px;
  background: #f8fbff;
  color: #334155;
  font-size: 16px;
}

.current-file-box strong {
  color: #0f172a;
}

.file-box {
  display: block;
  min-height: 154px;
  padding: 30px;
  border: 1px dashed #5f88c8;
  border-radius: 8px;
  background: #fbfdff;
}

.file-title {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 23px;
  font-weight: 800;
}

.file-note {
  display: block;
  margin-bottom: 20px;
  color: #64748b;
  font-size: 15px;
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.file-input {
  flex: 0 1 520px;
  max-width: 520px;
  color: #1f2937;
  font-size: 19px;
}

.file-input::file-selector-button {
  margin-right: 10px;
  padding: 7px 12px;
  border: 1px solid #9aa7b6;
  border-radius: 4px;
  background: #f8fafc;
  color: #111827;
  font-size: 17px;
  cursor: pointer;
}

.file-input::file-selector-button:hover {
  background: #eef2f7;
}

.submit-button {
  flex: 0 0 auto;
  margin-left: auto;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: #2f6f91;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.submit-button:hover {
  background: #245b78;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.workflow div {
  min-height: 92px;
  padding: 18px;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #ffffff;
}

.workflow strong,
.workflow span {
  display: block;
}

.workflow strong {
  margin-bottom: 8px;
  color: #172033;
  font-size: 16px;
}

.workflow span {
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.tensor-preview {
  margin-top: 18px;
  padding: 26px;
  border: 1px solid #d8e2ef;
  border-radius: 10px;
  background: #ffffff;
}

.tensor-preview h2 {
  margin: 0 0 22px;
  font-size: 28px;
  font-weight: 900;
}

.tensor-explain {
  max-width: 760px;
  margin: 0 auto;
}

.tensor-explain section {
  padding: 24px 0;
  border-top: 1px solid #d7dce4;
}

.tensor-explain section:first-child {
  border-top: 0;
  padding-top: 4px;
}

.tensor-explain h3 {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin: 0 0 16px;
  padding: 0 18px;
  border: 1px solid #bdd8fb;
  border-radius: 10px;
  background: #eaf3ff;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.25;
}

.tensor-explain section:nth-child(even) h3 {
  border-color: #f3c2ca;
  background: #fff0f2;
}

.tensor-explain p {
  margin: 10px 0;
  color: #172033;
  font-size: 16px;
  line-height: 1.85;
}

.tensor-explain strong {
  font-weight: 900;
}

.home-formula {
  margin: 16px 0;
  color: #0f172a;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 21px;
  font-style: italic;
  line-height: 1.5;
  text-align: center;
}

.home-formula sub,
.home-formula sup {
  font-size: 0.68em;
  line-height: 0;
}

.home-formula sup sub {
  font-size: 0.86em;
}

.material-search-entry {
  margin-top: 18px;
  padding: 28px 44px;
  border: 1px dashed #5f88c8;
  border-radius: 8px;
  background: #f4f8ff;
}

.material-search-entry .file-title {
  margin-bottom: 36px;
}

.material-search-entry .file-note {
  max-width: 620px;
  margin-bottom: 28px;
  line-height: 1.9;
}

.material-search-actions {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.material-search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 230px;
  min-height: 42px;
  border-radius: 6px;
  background: #2f7898;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
}

.material-search-button:hover {
  background: #25637e;
}

.material-search-actions span {
  color: #2563eb;
  font-size: 17px;
}

.material-search-shell {
  width: min(1160px, calc(100vw - 36px));
}

/* Grouped material search layout */
.material-search-redesign {
  width: min(980px, calc(100vw - 36px));
  padding-bottom: 48px;
}

.material-search-redesign .search-hero-card,
.material-search-redesign .search-panel,
.material-search-redesign .material-results {
  box-shadow: none;
}

.search-hero-minimal {
  margin-top: 8px;
  padding: 28px 30px;
  border: 0;
  background: transparent;
}

.search-hero-minimal h1 {
  margin: 0;
  color: #14213a;
  font-size: 34px;
  font-weight: 750;
}

.search-hero-minimal .description {
  max-width: none;
  margin: 13px 0 0;
  color: #52637d;
  font-size: 16px;
}

.search-hero-minimal .search-count {
  min-width: 130px;
  padding: 13px 18px;
  border-radius: 9px;
  background: #e1f6f2;
  color: #08756d;
}

.search-hero-minimal .search-count strong {
  font-size: 31px;
}

.grouped-search-panel {
  margin-top: 0;
  padding: 20px 26px 24px;
  border: 1px dashed #58a2ff;
  border-radius: 0;
  background: #ffffff;
}

.grouped-filter-form {
  display: grid;
  gap: 22px;
}

.grouped-filter-form .filter-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.grouped-filter-form .filter-row-label {
  color: #111827;
  font-size: 20px;
  font-weight: 650;
  white-space: nowrap;
}

.grouped-filter-form input,
.grouped-filter-form select {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #a9c5ff;
  border-radius: 0;
  background: #fbfdff;
  color: #17233b;
  font-size: 14px;
}

.grouped-filter-form input:focus,
.grouped-filter-form select:focus {
  outline: 2px solid #9fc5ff;
  outline-offset: 1px;
  border-color: #5d95ed;
}

.filter-hint {
  color: #667085;
  font-size: 13px;
}

.tensor-filter-row {
  align-items: start !important;
}

.tensor-filter-row .filter-row-label {
  padding-top: 9px;
}

.tensor-filter-details {
  grid-column: span 2;
  border: 1px dashed #6da6ff;
  background: #fbfdff;
}

.tensor-filter-details summary {
  padding: 9px 12px;
  color: #4d5567;
  font-size: 14px;
  cursor: pointer;
  list-style-position: inside;
}

.tensor-filter-details summary::marker {
  color: #163f73;
}

.tensor-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 42px;
  padding: 8px 24px 18px;
}

.tensor-checkbox-grid > div {
  display: grid;
  gap: 7px;
}

.tensor-checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #17233b;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}

.tensor-checkbox-grid input {
  width: 20px;
  min-width: 20px;
  min-height: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  accent-color: #2e7c98;
}

.tensor-exclude-details {
  margin-top: -10px;
}

.tensor-exclude-details p {
  margin: 0 16px 8px;
  color: #667085;
  font-size: 13px;
}

.grouped-filter-actions {
  justify-content: flex-end;
  margin-top: 2px;
}

.grouped-filter-actions a,
.grouped-filter-actions button {
  min-width: 92px;
  min-height: 42px;
  border-radius: 8px;
  font-size: 16px;
}

.grouped-filter-actions a {
  border: 2px solid #2f7898;
  color: #173e5b;
}

.grouped-filter-actions button {
  background: #2f7898;
}

.grouped-filter-actions button:hover {
  background: #25637e;
}

@media (max-width: 760px) {
  .material-search-redesign {
    width: min(100% - 24px, 980px);
  }

  .search-hero-minimal {
    padding: 18px 4px;
  }

  .search-hero-minimal h1 {
    font-size: 29px;
  }

  .grouped-search-panel {
    padding: 18px;
  }

  .grouped-filter-form .filter-row {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .tensor-filter-row .filter-row-label {
    padding-top: 0;
  }

  .tensor-filter-details {
    grid-column: auto;
  }

  .tensor-checkbox-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 8px 14px 18px;
  }

  .tensor-checkbox-grid label {
    white-space: normal;
  }
}

.search-back-link {
  margin: 0 0 18px;
}

.search-hero-card,
.search-panel,
.material-results {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid #d8e2ef;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(41, 56, 82, 0.06);
}

.search-hero-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.search-hero-card h1 {
  font-size: 38px;
}

.search-count {
  min-width: 170px;
  padding: 16px 18px;
  border-radius: 10px;
  background: #e6f7f4;
  color: #0f766e;
  text-align: center;
}

.search-count strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.search-count span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
}

.material-filter-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(150px, 1fr)) auto;
  gap: 16px;
  align-items: end;
}

.material-filter-form label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.material-filter-form input,
.material-filter-form select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font-size: 15px;
}

.filter-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.filter-actions a,
.filter-actions button {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.filter-actions a {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d5dde8;
  color: #334155;
  background: #ffffff;
}

.filter-actions button {
  border: 0;
  color: #ffffff;
  background: #00796b;
}

.result-headline {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.result-headline h2 {
  margin: 0;
  font-size: 24px;
}

.result-headline p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.material-result-list {
  display: grid;
  gap: 16px;
}

.material-result-card {
  padding: 18px;
  border: 1px solid #d8e2ef;
  border-radius: 10px;
  background: #fbfdff;
}

.material-result-main {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.material-result-main h3 {
  margin: 0 0 6px;
  color: #006d75;
  font-size: 20px;
}

.material-result-main p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.download-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  min-height: 34px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.download-chip.disabled {
  background: #f1f5f9;
  color: #94a3b8;
}

.material-symmetry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.material-symmetry-grid div {
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  background: #f1f6ff;
}

.material-symmetry-grid strong,
.material-symmetry-grid span {
  display: block;
}

.material-symmetry-grid strong {
  margin-bottom: 6px;
  color: #23466d;
  font-size: 13px;
}

.material-symmetry-grid span {
  color: #0f172a;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.tensor-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.tensor-mini-grid > div {
  padding: 12px;
  border: 1px solid #d5e5ff;
  border-radius: 8px;
  background: #ffffff;
}

.tensor-mini-grid > div > strong {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 16px;
}

.tensor-mini-grid p {
  display: grid;
  grid-template-columns: 86px 48px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin: 8px 0 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
}

.tensor-mini-grid b {
  color: #0f172a;
}

.tensor-mini-grid em {
  color: #0d6efd;
  font-style: normal;
  font-weight: 800;
}

.tensor-mini-grid span {
  overflow-wrap: anywhere;
}

.empty-search {
  padding: 28px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
}

@media (max-width: 980px) {
  .material-filter-form,
  .material-symmetry-grid,
  .tensor-mini-grid {
    grid-template-columns: 1fr;
  }

  .search-hero-card,
  .material-result-main,
  .result-headline {
    flex-direction: column;
    align-items: stretch;
  }

  .tensor-mini-grid p {
    grid-template-columns: 82px 48px minmax(0, 1fr);
  }
}


.result-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.result-list div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e0e7f0;
  border-radius: 6px;
  background: #fbfdff;
}

dt {
  color: #50627c;
  font-weight: 700;
}

dd {
  margin: 0;
  word-break: break-all;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 18px;
  padding: 0 18px;
  border-radius: 6px;
  background: #2f6f91;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover {
  background: #245b78;
}

.top-back {
  margin: 0 0 12px;
  background: #0d6efd;
}

.top-back:hover {
  background: #0b5ed7;
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 28px, 980px);
    padding-top: 32px;
  }

  .hero {
    display: block;
  }

  h1 {
    font-size: 34px;
  }

  .version {
    display: inline-block;
    margin-top: 18px;
  }

  .workflow {
    grid-template-columns: 1fr;
  }


  .home-upload-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px;
  }

  .upload-left {
    padding: 0;
  }

  .home-upload-layout .workflow {
    grid-template-columns: 1fr;
  }

  .tensor-preview {
    padding: 20px;
  }

  .tensor-explain h3 {
    font-size: 20px;
  }

  .tensor-explain p {
    font-size: 15px;
  }

  .home-formula {
    font-size: 19px;
  }

  .file-box {
    padding: 22px;
  }

  .file-actions {
    display: grid;
    gap: 12px;
  }

  .current-file-box {
    display: grid;
  }

  .result-list div {
    grid-template-columns: 1fr;
  }

  .fsg-block-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .fsg-block-label,
  .fsg-block-value {
    min-height: 38px;
    font-size: 17px;
  }

  .oriented-summary,
  .operation-guide-row {
    display: grid;
    justify-items: start;
    text-align: left;
  }

  .operation-columns {
    grid-template-columns: 1fr;
  }

  .operation-guide {
    grid-template-columns: 1fr;
  }

  .tensor-mode-grid {
    grid-template-columns: 1fr;
  }

  .magnetic-point-summary {
    grid-template-columns: 1fr;
  }

  .fsg-table,
  .fsg-table tbody,
  .fsg-table tr,
  .fsg-table th,
  .fsg-table td {
    display: block;
    width: 100%;
  }

  .fsg-table {
    border-spacing: 0;
  }

  .fsg-table tr {
    margin-bottom: 12px;
  }

  .fsg-table th {
    border-right: 1px solid #d7e5f5;
    border-radius: 8px 8px 0 0;
  }

  .fsg-table td {
    border-left: 1px solid #d7e5f5;
    border-top: 0;
    border-radius: 0 0 8px 8px;
  }
}

/* Symmetry recognition summary cards */
.symmetry-hero {
  margin-top: 16px;
}

.symmetry-file-line {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 26px;
  padding: 8px 14px;
  background: #bde8ff;
  color: #009ee3;
  font-size: 21px;
  line-height: 1.2;
  font-weight: 800;
  border-radius: 12px;
}

.symmetry-file-value {
  font-weight: 500;
  color: #009ee3;
}

.symmetry-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 34px;
}

.symmetry-info-card {
  min-height: 108px;
  padding: 18px 18px 16px;
  border-radius: 16px;
  border: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(40, 58, 86, 0.08);
  overflow: hidden;
}

.symmetry-info-card h3 {
  margin: 0 0 20px;
  color: #162033;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 900;
}

.symmetry-card-value {
  color: #000;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 20px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.symmetry-card-value sub,
.symmetry-card-value sup {
  font-size: 0.68em;
  line-height: 0;
}

.symmetry-card-value sub {
  margin-left: 1px;
  vertical-align: -0.34em;
}

.symmetry-card-value sup {
  margin-left: 1px;
  vertical-align: 0.46em;
}

.symmetry-card-value .math-formula {
  font-size: 20px;
  margin-right: 4px;
}

.symmetry-card-pink {
  background: #f7a7a9;
}

.symmetry-card-yellow {
  background: #fff0b7;
}

.symmetry-card-green {
  background: #b8eadf;
}

.nonmagnetic-tensor-card {
  margin-top: 28px;
}

.nonmagnetic-tensor-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) repeat(2, minmax(0, 1.2fr));
  gap: 12px;
}

.nonmagnetic-tensor-grid .overview-head {
  min-height: 46px;
  background: linear-gradient(135deg, #b8eadf 0%, #e6f8f4 100%) !important;
  border-color: #62c7b8 !important;
  color: #07172d !important;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 8px 20px rgba(42, 132, 122, 0.10) !important;
}

.nonmagnetic-tensor-grid .overview-row-blue,
.nonmagnetic-tensor-grid .overview-cell-blue {
  background: linear-gradient(135deg, #eaf3ff 0%, #f8fbff 100%) !important;
  border-color: #8ab8ff !important;
  color: #07172d !important;
}

.nonmagnetic-tensor-grid .overview-row-pink,
.nonmagnetic-tensor-grid .overview-cell-pink {
  background: linear-gradient(135deg, #e8faf6 0%, #f8fffd 100%) !important;
  border-color: #69d0c2 !important;
  color: #07172d !important;
}

.nonmagnetic-tensor-grid .overview-type-card,
.nonmagnetic-tensor-grid .overview-state-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 8px 18px rgba(28, 68, 109, 0.05) !important;
}

.nonmagnetic-derivation-card {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 3px solid #7fd6c8;
}

.nonmagnetic-derivation-card .tensor-section-title {
  display: inline-flex;
  align-items: center;
  margin: 22px 0 12px;
  padding: 6px 12px;
  border-radius: 12px;
  background: #e8f4ff;
  color: #063a7a;
  font-size: 18px;
  font-weight: 900;
}

.nonmagnetic-derivation-card .tensor-subsection {
  margin: 16px 0;
}

.nonmagnetic-derivation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  margin-bottom: 24px;
}

.nonmagnetic-derivation-grid .tensor-subsection {
  margin: 0;
}

.tensor-section-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0;
  align-items: start;
}

.tensor-section-pair .tensor-section {
  margin: 0;
}

@media (max-width: 900px) {
  .tensor-section-pair {
    grid-template-columns: 1fr;
  }

  .nonmagnetic-derivation-grid {
    grid-template-columns: 1fr;
  }
}

.symmetry-card-shg {
  min-height: 108px;
  padding: 18px;
  background: #e7f0ff;
}

.symmetry-card-shg h3 {
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: 18px;
  font-weight: 850;
}

.shg-card-label {
  color: #000;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.45;
}

.shg-card-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.symmetry-card-shg {
  position: relative;
  overflow: visible;
}

.symmetry-card-shg h3 {
  margin: 0 0 10px;
}

.shg-help {
  position: absolute;
  top: 16px;
  right: 17px;
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: #1296d4;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.shg-help:hover,
.shg-help:focus-visible {
  background: #087db9;
  outline: none;
  transform: translateY(-1px);
}

.shg-info-popover {
  position: absolute;
  z-index: 20;
  top: calc(100% + 12px);
  right: 16px;
  width: min(470px, calc(100vw - 48px));
  max-height: min(540px, calc(100vh - 52px));
  padding: 15px 17px;
  border: 1px solid #b9d3f4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(40, 58, 86, 0.2);
  color: #234462;
  text-align: left;
  overflow-y: auto;
}

.shg-info-popover strong {
  display: block;
  color: #102c4b;
  font-size: 16px;
}

.shg-info-popover p,
.shg-info-popover small {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
}

.shg-info-popover small {
  display: block;
  color: #66809a;
}

.shg-info-popover small a {
  color: #256da1;
  font-weight: 700;
  text-decoration: none;
}

.shg-info-popover small a:hover,
.shg-info-popover small a:focus-visible {
  color: #0b5788;
  text-decoration: underline;
}

.shg-formula {
  margin-top: 9px;
  padding: 8px 10px;
  border: 1px solid #d8e8f8;
  border-radius: 8px;
  background: #f5faff;
  color: #143e61;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-style: italic;
  text-align: center;
}

.shg-classification-table {
  width: 100%;
  margin-top: 9px;
  border-collapse: collapse;
  color: #294761;
  font-size: 12px;
}

.shg-classification-table th,
.shg-classification-table td {
  padding: 6px 7px;
  border-bottom: 1px solid #dbe8f7;
  text-align: left;
  vertical-align: top;
  line-height: 1.42;
}

.shg-classification-table th {
  color: #123554;
  font-weight: 800;
}

.shg-classification-table td:first-child {
  width: 108px;
  color: #102c4b;
  font-weight: 800;
}

.shg-popover-note {
  color: #21446c;
  font-weight: 700;
}

@media (max-width: 760px) {
  .symmetry-file-line {
    display: flex;
    flex-wrap: wrap;
    font-size: 18px;
  }

  .symmetry-card-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .symmetry-info-card {
    min-height: 96px;
  }

  .symmetry-info-card h3 {
    font-size: 20px;
    margin-bottom: 14px;
  }

  .symmetry-card-shg {
    min-height: 96px;
    padding: 17px 18px;
  }

  .shg-info-popover {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}

/* CIF to mCIF editing flow */
.structure-note {
  margin: 14px 0 16px;
  padding: 12px 14px;
  border: 1px dashed #8bbcf6;
  border-radius: 10px;
  background: #f4f9ff;
  color: #21446c;
  line-height: 1.7;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  background: #e8f2ff;
  border: 1px solid #9fc5f8;
  color: #075da8;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.download-button:hover {
  background: #d8eaff;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.top-actions .top-back {
  margin-bottom: 0;
}

.top-download {
  background: #fff;
}


/* Async calculation loader */
.async-detail-loader {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0;
  padding: 18px 20px;
  border: 1px solid #cfe0f5;
  border-radius: 12px;
  background: #f4f9ff;
  color: #12345a;
}

.async-detail-loader p {
  margin: 6px 0 0;
  color: #526b89;
  line-height: 1.6;
}

.small-spinner {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.async-detail-loader.failed {
  border-color: #ffb088;
  background: #fff4eb;
  color: #9b2f00;
}


/* Three-color tensor result styling */
.operation-card {
  border-color: #f7a7a9;
  background: linear-gradient(180deg, #fffafa 0%, #fff4f4 100%);
}

.operation-card::before {
  background: #f7a7a9;
}

.operation-guide-row,
.operation-fold > summary {
  border-color: #f7a7a9;
  background: #fff1f2;
}

.tensor-theme-yellow {
  --tensor-accent: #b88a00;
  --tensor-accent-dark: #6d4f00;
  --tensor-soft: #fff9df;
  --tensor-soft-strong: #fff0b7;
  --tensor-border: #ecd88c;
}

.tensor-theme-green {
  --tensor-accent: #15957f;
  --tensor-accent-dark: #0b6253;
  --tensor-soft: #eefbf8;
  --tensor-soft-strong: #b8eadf;
  --tensor-border: #8dd7ca;
}

.tensor-theme-yellow .tensor-heading > span,
.tensor-theme-green .tensor-heading > span {
  background: var(--tensor-soft-strong);
  color: #10213a;
  box-shadow: inset 0 0 0 1px var(--tensor-border);
}

.tensor-theme-yellow .tensor-mode,
.tensor-theme-green .tensor-mode {
  background: linear-gradient(180deg, #ffffff 0%, var(--tensor-soft) 100%);
}

.tensor-mode-half {
  width: min(100%, 520px);
}

.formula-box {
  display: grid;
  gap: 4px;
  margin: 8px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--tensor-border, #dbe8f8);
  border-radius: 10px;
  background: var(--tensor-soft, #f8fbff);
  color: #29496d;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 15px;
  line-height: 1.55;
}

.formula-box p {
  margin: 0;
  color: #29496d;
  font-size: 15px;
}

/* Tensor overview table colors: red header, yellow/cyan alternating rows */
.tensor-overview-grid .overview-head {
  border-color: #ef8f94;
  background: #f7a7a9;
  color: #10213a;
}

.tensor-overview-grid .overview-row-blue,
.tensor-overview-grid .overview-cell-blue {
  border-color: #ecd88c;
  background: #fff0b7;
}

.tensor-overview-grid .overview-row-pink,
.tensor-overview-grid .overview-cell-pink {
  border-color: #8dd7ca;
  background: #b8eadf;
}

/* Softer tensor overview table colors */
.tensor-overview-grid .overview-head {
  border-color: #f3a8ad;
  background: #fff2f3;
  color: #10213a;
}

.tensor-overview-grid .overview-row-blue,
.tensor-overview-grid .overview-cell-blue {
  border-color: #e6cc72;
  background: #fff9df;
}

.tensor-overview-grid .overview-row-pink,
.tensor-overview-grid .overview-cell-pink {
  border-color: #84cfc2;
  background: #eefbf8;
}


/* =========================================================
   Final color/layout overrides
   直接放在 style.css 最后面，覆盖前面重复定义的颜色。
   目标：
   1) File Name 字体改成黑色；
   2) 所有黄色主题改成浅蓝色；
   3) 所有粉红/浅红主题改成淡青色。
   ========================================================= */

/* ---------- File Name 标签字体改成黑色 ---------- */
.result-source,
.result-source a,
.result-source span,
.result-source strong,
.symmetry-file-line,
.symmetry-file-line span,
.symmetry-file-value {
  color: #000000 !important;
}

/* ---------- 统一浅蓝色主题：替换原黄色 ---------- */
.symmetry-card-yellow {
  background: #e8f2ff !important;
}

.tensor-theme-yellow {
  --tensor-accent: #2f6fca !important;
  --tensor-accent-dark: #075db8 !important;
  --tensor-soft: #f4f9ff !important;
  --tensor-soft-strong: #d8eaff !important;
  --tensor-border: #9fc5f8 !important;
}

.tensor-theme-yellow .tensor-heading > span {
  background: #d8eaff !important;
  color: #10213a !important;
  box-shadow: inset 0 0 0 1px #9fc5f8 !important;
}

.tensor-theme-yellow .tensor-mode {
  border-color: #9fc5f8 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%) !important;
}

.tensor-theme-yellow .formula-box,
.tensor-theme-yellow .tensor-formula-card,
.tensor-theme-yellow .tensor-matrix-fold,
.tensor-theme-yellow .tensor-matrix-fold > summary {
  border-color: #9fc5f8 !important;
  background: #f4f9ff !important;
  color: #075db8 !important;
}

.tensor-theme-yellow .formula-box p {
  color: #29496d !important;
}

.tensor-theme-yellow .tensor-count-line strong {
  background: #d8eaff !important;
  color: #075db8 !important;
  box-shadow: inset 0 0 0 1px #9fc5f8 !important;
}

/* 汇总表中原黄色行：电导率、SHG/BPVE、SPGE */
.tensor-overview-grid .overview-row-blue,
.tensor-overview-grid .overview-cell-blue {
  border-color: #9fc5f8 !important;
  background: #e8f2ff !important;
}

/* 其他可能使用黄色/浅黄色的卡片 */
.warning-callout,
.error-hints,
.save-message.failed,
.async-detail-loader.failed {
  border-color: #9fc5f8 !important;
  background: #f4f9ff !important;
  color: #21446c !important;
}

.warning-callout strong,
.warning-callout p,
.error-hints,
.error-hints strong,
.error-hints li,
.save-message.failed,
.async-detail-loader.failed {
  color: #21446c !important;
}

/* ---------- 统一淡青色主题：替换原粉红/浅红 ---------- */
.symmetry-card-pink {
  background: #d9f5f0 !important;
}

.tensor-theme-pink {
  --tensor-accent: #15957f !important;
  --tensor-accent-dark: #0b6253 !important;
  --tensor-soft: #eefbf8 !important;
  --tensor-soft-strong: #b8eadf !important;
  --tensor-border: #7fd6c8 !important;
}

.tensor-theme-pink .tensor-heading > span,
.tensor-heading-shg > span,
.tensor-heading-spge > span {
  background: #b8eadf !important;
  color: #10213a !important;
  box-shadow: inset 0 0 0 1px #7fd6c8 !important;
}

.tensor-theme-pink .tensor-mode {
  border-color: #7fd6c8 !important;
  background: linear-gradient(180deg, #ffffff 0%, #eefbf8 100%) !important;
}

.tensor-theme-pink .formula-box,
.tensor-theme-pink .tensor-formula-card,
.tensor-theme-pink .tensor-matrix-fold,
.tensor-theme-pink .tensor-matrix-fold > summary {
  border-color: #7fd6c8 !important;
  background: #eefbf8 !important;
  color: #0b6253 !important;
}

.tensor-theme-pink .formula-box p {
  color: #0b6253 !important;
}

.tensor-theme-pink .tensor-count-line strong {
  background: #b8eadf !important;
  color: #0b6253 !important;
  box-shadow: inset 0 0 0 1px #7fd6c8 !important;
}

/* 汇总表表头、原粉红行：AHE、SHE */
.tensor-overview-grid .overview-head,
.tensor-overview-grid .overview-row-pink,
.tensor-overview-grid .overview-cell-pink {
  border-color: #7fd6c8 !important;
  background: #eafbf8 !important;
  color: #10213a !important;
}

/* 顶部/分割装饰线中原粉红色 */
.operation-card {
  border-color: #7fd6c8 !important;
  background: linear-gradient(180deg, #f7fffd 0%, #eefbf8 100%) !important;
}

.operation-card::before,
.magnetic-tensor-card::before {
  background: #7fd6c8 !important;
}

.operation-guide-row,
.operation-fold > summary {
  border-color: #7fd6c8 !important;
  background: #eefbf8 !important;
}

/* 首页或说明区中原粉红色标签 */
.fsg-block-row:nth-child(even) .fsg-block-label,
.fsg-block-row:nth-child(even) .fsg-block-value,
.tensor-explain section:nth-child(even) h3,
.soc-badge.with-soc,
.soc-badge.has-soc {
  border-color: #7fd6c8 !important;
  background: #eafbf8 !important;
  color: #0b6253 !important;
  box-shadow: inset 0 0 0 1px #7fd6c8 !important;
}

.time-prime {
  color: #0b6253 !important;
}

/* 按钮文字保持清晰 */
.submit-button,
.save-button,
.material-search-button,
.top-back {
  color: #ffffff !important;
}

/* Make tensor overview header row more prominent */
.tensor-overview-grid .overview-head {
  min-height: 46px;
  background: #9edbd3;
  border-color: #4ab5a8;
  color: #07172d;
  font-size: 18px;
  font-weight: 950;
}

/* Tensor overview table gradient styling */
.tensor-overview-grid .overview-head {
  background: linear-gradient(135deg, #b8eadf 0%, #e6f8f4 100%) !important;
  border-color: #62c7b8 !important;
  color: #07172d !important;
  box-shadow: 0 8px 20px rgba(42, 132, 122, 0.10) !important;
}

.tensor-overview-grid .overview-row-blue,
.tensor-overview-grid .overview-cell-blue {
  background: linear-gradient(135deg, #eaf3ff 0%, #f8fbff 100%) !important;
  border-color: #8ab8ff !important;
  color: #07172d !important;
}

.tensor-overview-grid .overview-row-pink,
.tensor-overview-grid .overview-cell-pink {
  background: linear-gradient(135deg, #e8faf6 0%, #f8fffd 100%) !important;
  border-color: #69d0c2 !important;
  color: #07172d !important;
}

.tensor-overview-grid .overview-type-card,
.tensor-overview-grid .overview-state-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 8px 18px rgba(28, 68, 109, 0.05) !important;
}

/* Magnetic tensor summary: match the soft cyan gradient used by tensor cards */
.magnetic-tensor-card {
  border-color: #9bded5 !important;
  background: linear-gradient(180deg, #f4fffd 0%, #fbfffe 58%, #ffffff 100%) !important;
  box-shadow: 0 16px 34px rgba(32, 132, 121, 0.07) !important;
}

.magnetic-tensor-card::before {
  background: linear-gradient(90deg, #f5a3a8 0%, #fff0b8 48%, #aee8df 100%) !important;
}

.magnetic-point-summary > div {
  border-color: #9bded5 !important;
  background: linear-gradient(135deg, #effcf9 0%, #fbfffe 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 8px 18px rgba(32, 132, 121, 0.05) !important;
}

.magnetic-point-summary span {
  color: #1a6d66 !important;
}

.magnetic-point-summary strong,
.magnetic-point-summary code {
  color: #083b47 !important;
}

.soc-badge.has-soc,
.soc-badge.with-soc {
  border-color: #76d2c7 !important;
  background: linear-gradient(135deg, #ddfbf6 0%, #f5fffd 100%) !important;
  color: #00796b !important;
}

/* Symmetry recognition cards: use the lighter mint tone */
.symmetry-card-green,
.symmetry-card-pink {
  background: #dcf8f2 !important;
}

/* Keep the grouped material-search controls crisp despite legacy search styles. */
.material-search-redesign .grouped-filter-form input,
.material-search-redesign .grouped-filter-form select {
  border: 1px solid #a9c5ff !important;
  border-radius: 0 !important;
  background: #fbfdff !important;
}

.material-search-redesign .grouped-filter-form .tensor-filter-details {
  border: 1px dashed #6da6ff !important;
  background: #fbfdff !important;
}

.material-search-redesign .grouped-filter-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 22px !important;
  align-items: stretch !important;
}

.material-search-redesign .grouped-filter-form .filter-row {
  display: grid !important;
  grid-column: 1 !important;
  grid-template-columns: max-content minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: center !important;
}

.material-search-redesign .grouped-filter-form .tensor-filter-row {
  align-items: start !important;
}

.material-search-redesign .grouped-filter-form .tensor-filter-details {
  grid-column: span 2 !important;
}

.material-search-redesign .grouped-filter-form .tensor-exclude-details {
  grid-column: 2 / span 2 !important;
  margin-top: -10px !important;
}

.material-search-redesign .grouped-filter-form .grouped-filter-actions {
  grid-column: 1 !important;
}

.material-search-redesign .grouped-filter-form .tensor-checkbox-grid input {
  width: 20px !important;
  min-width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.material-search-redesign .grouped-filter-form .tensor-checkbox-grid label {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center !important;
  gap: 9px !important;
  color: #17233b !important;
  font-size: 14px !important;
  font-weight: 650 !important;
}

/* Material list: compact database-style search results */
.material-search-redesign .material-results {
  padding: 26px;
  border-radius: 12px;
}

.material-list-table-wrap {
  overflow-x: auto;
  border: 1px solid #dce7f5;
  border-radius: 10px;
  background: #ffffff;
}

.material-list-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  color: #20324a;
}

.material-list-table th {
  padding: 15px 16px;
  border-bottom: 1px solid #dbe6f4;
  background: #f5f8fc;
  color: #334155;
  text-align: left;
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

.material-list-table td {
  padding: 16px;
  border-bottom: 1px solid #e8eef6;
  vertical-align: middle;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 15px;
  line-height: 1.4;
}

.material-list-table tbody tr {
  transition: background 150ms ease;
}

.material-list-table tbody tr:hover {
  background: #f7fbff;
}

.material-list-table tbody tr:last-child td {
  border-bottom: 0;
}

.material-list-table .material-name-cell {
  min-width: 185px;
  font-family: inherit;
}

.material-name-cell a {
  color: #007a76;
  font-size: 16px;
  font-weight: 850;
  text-decoration: none;
}

.material-name-cell a:hover {
  color: #075d73;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.material-tensor-brief {
  display: grid;
  gap: 4px;
  min-width: 115px;
  color: #516277;
  font-family: inherit !important;
  font-size: 13px !important;
}

.material-tensor-brief span:first-child {
  color: #317484;
}

.material-tensor-brief span:last-child {
  color: #9b5d67;
}

.table-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e3f4ff;
  color: #0c6c9c;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.table-download:hover {
  background: #d2ecfb;
}

.table-download.disabled {
  background: #f0f3f7;
  color: #94a3b8;
}

/* Material search pagination */
.material-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e5edf6;
}

.page-size-control,
.page-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-size-control {
  color: #52647a;
  font-size: 14px;
  font-weight: 700;
}

.page-size-control select {
  min-height: 36px;
  padding: 0 30px 0 11px;
  border: 1px solid #cbd9e8;
  border-radius: 7px;
  background: #ffffff;
  color: #24405e;
  font: inherit;
  cursor: pointer;
}

.page-button,
.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #d3deeb;
  border-radius: 7px;
  background: #ffffff;
  color: #38516d;
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
}

.page-button:hover {
  border-color: #75a8e7;
  background: #f2f8ff;
  color: #0b6da4;
}

.page-current {
  border-color: #287db6;
  background: #287db6;
  color: #ffffff;
}

.page-current:hover {
  background: #287db6;
  color: #ffffff;
}

.page-previous,
.page-next {
  min-width: 66px;
}

.page-disabled {
  border-color: #e5eaf0;
  background: #f5f7fa;
  color: #a1adba;
  cursor: default;
}

.page-ellipsis {
  min-width: 20px;
  padding: 0 2px;
  border-color: transparent;
  background: transparent;
}

@media (max-width: 700px) {
  .material-pagination,
  .page-navigation {
    flex-wrap: wrap;
  }

  .material-pagination {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Single material page */
.material-detail-shell {
  width: min(1060px, calc(100vw - 36px));
  padding-bottom: 52px;
}

.material-detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.material-detail-actions .search-back-link {
  margin: 0;
}

.material-detail-actions .download-button {
  margin: 0;
}

.material-detail-hero,
.material-detail-section {
  padding: 26px 30px;
  border: 1px solid #dce7f5;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(30, 62, 100, 0.05);
}

.material-detail-hero {
  margin-bottom: 18px;
  background: linear-gradient(135deg, #f5fbff 0%, #ffffff 72%);
}

.material-detail-hero p {
  margin: 0 0 6px;
  color: #26828b;
  font-size: 14px;
  font-weight: 850;
}

.material-detail-hero h1 {
  margin: 0;
  color: #14213a;
  font-size: 32px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.material-detail-hero span {
  display: block;
  margin-top: 10px;
  color: #64748b;
  font-size: 14px;
}

.material-detail-section {
  margin-top: 18px;
}

.material-detail-section h2 {
  margin: 0 0 20px;
  color: #14213a;
  font-size: 24px;
}

.material-detail-symmetry-grid {
  gap: 18px 22px;
}

.material-detail-symmetry-grid .symmetry-info-card {
  min-height: 112px;
  border-radius: 12px;
}

.material-detail-symmetry-grid .symmetry-info-card h3 {
  font-size: 18px;
}

.material-detail-symmetry-grid .symmetry-card-pink {
  background: #dcf8f2 !important;
}

.material-detail-symmetry-grid .symmetry-card-yellow {
  background: #e8f2ff !important;
}

.material-detail-symmetry-grid .symmetry-card-green {
  background: #dcf8f2 !important;
}

/* Match the mathematical spin-space-group typography used in recognition results. */
.material-detail-symmetry-grid .spin-space-formula {
  margin: 0;
  color: #101b2d;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 19px;
  font-style: italic;
  letter-spacing: 0;
  line-height: 1.35;
  white-space: nowrap;
}

.material-detail-symmetry-grid .spin-space-formula sup,
.material-detail-symmetry-grid .spin-space-formula sub {
  font-size: 0.64em;
  line-height: 0;
}

.material-detail-symmetry-grid .spin-space-formula sub {
  margin-left: 1px;
  vertical-align: -0.38em;
}

.material-detail-symmetry-grid .spin-space-formula sup {
  vertical-align: 0.46em;
}

.material-detail-symmetry-grid .spin-space-formula .overline {
  display: inline-block;
  padding-top: 1px;
  line-height: 0.95;
  text-decoration-thickness: 1px;
}

.material-detail-symmetry-grid .spin-group-index {
  margin-left: 5px;
  color: #101b2d;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 0.88em;
  font-style: italic;
  white-space: nowrap;
}

.detail-tensor-grid {
  display: grid;
  grid-template-columns: minmax(130px, 0.65fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.detail-tensor-head,
.detail-tensor-type,
.detail-tensor-cell {
  border: 1px solid #b8d9d5;
  border-radius: 10px;
}

.detail-tensor-head {
  padding: 12px;
  background: #d7f3ed;
  color: #10213a;
  text-align: center;
  font-size: 15px;
  font-weight: 850;
}

.detail-tensor-type {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 74px;
  padding: 12px;
  background: #f6fbff;
  color: #17334f;
  text-align: center;
  font-size: 16px;
  font-weight: 850;
}

.detail-tensor-cell {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 74px;
  padding: 12px 14px;
  background: #fbffff;
}

.detail-tensor-cell strong {
  color: #0b6b73;
  font-size: 14px;
}

.detail-tensor-cell span {
  color: #24374e;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.tensor-parity-row {
  display: grid;
  gap: 5px;
  padding: 2px 0 8px;
}

.tensor-parity-row + .tensor-parity-row {
  padding-top: 8px;
  border-top: 1px dashed #cfe0e7;
}

.tensor-parity-row strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #183653;
  font-family: inherit;
  font-size: 14px;
  text-transform: lowercase;
}

.tensor-parity-row strong b {
  color: #0b786f;
  font-weight: 850;
}

.tensor-parity-row span {
  color: #172b42;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.tensor-parity-row span sup,
.tensor-parity-row span sub {
  font-size: 0.72em;
  line-height: 0;
}

@media (max-width: 760px) {
  .material-search-redesign .material-results,
  .material-detail-hero,
  .material-detail-section {
    padding: 20px 16px;
  }

  .material-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .material-detail-actions .download-button {
    justify-content: center;
  }

  .detail-tensor-grid {
    grid-template-columns: 1fr;
  }

  .detail-tensor-head {
    display: none;
  }

  .detail-tensor-type {
    margin-top: 8px;
  }

  .detail-tensor-type + .detail-tensor-cell::before {
    content: "无 SOC";
    color: #567086;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
  }

  .detail-tensor-cell + .detail-tensor-cell::before {
    content: "有 SOC";
    color: #567086;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
  }
}

@media (max-width: 760px) {
  .material-search-redesign .grouped-filter-form .filter-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .material-search-redesign .grouped-filter-form .tensor-filter-details {
    grid-column: 1 !important;
  }

  .material-search-redesign .grouped-filter-form .tensor-exclude-details {
    grid-column: 1 !important;
  }
}

@media (min-width: 761px) and (max-width: 1080px) {
  .material-search-redesign .grouped-filter-form .filter-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }

  .material-search-redesign .grouped-filter-form .filter-row-label {
    grid-column: 1 / -1 !important;
  }

  .material-search-redesign .grouped-filter-form .tensor-filter-details,
  .material-search-redesign .grouped-filter-form .tensor-exclude-details {
    grid-column: 1 / -1 !important;
  }
}

/* Keep the search-result pager visually separate from the table. */
.material-search-redesign .material-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: #f4f6f8;
}

.material-search-redesign .page-size-control select {
  height: 38px;
  min-height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid #ced8e4;
  border-radius: 4px;
  background: #ffffff;
  color: #20344f;
  font-size: 14px;
  font-weight: 750;
}

.material-search-redesign .page-navigation {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.material-search-redesign .page-button {
  min-width: 38px;
  height: 36px;
  border: 1px solid #d4dce6;
  border-radius: 5px;
  background: #ffffff;
  color: #314861;
  font-size: 14px;
  font-weight: 650;
}

.material-search-redesign .page-previous,
.material-search-redesign .page-next {
  min-width: 78px;
}

.material-search-redesign .page-current {
  border-color: #3d70dc;
  background: #3d70dc;
  color: #ffffff;
}

.material-search-redesign .page-disabled {
  border-color: transparent;
  background: #e7e9ed;
  color: #abb4bd;
}

.material-search-redesign .page-ellipsis {
  color: #8b98a7;
  font-weight: 800;
}

/* Keep the home-page file selector in English instead of using the browser-localized native control. */
.home-file-native-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.home-file-picker-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.home-file-picker {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid #8ea0b7;
  border-radius: 4px;
  background: #ffffff;
  color: #10253f;
  cursor: pointer;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.2;
}

.home-file-picker:hover {
  background: #eef4fb;
}

.home-file-name {
  min-width: 170px;
  overflow: hidden;
  color: #1f2937;
  font-size: 17px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-authors {
  margin: 18px 0 0;
  padding: 24px 30px;
  border: 1px solid #d8e2ef;
  border-radius: 10px;
  background: #f8fbff;
  color: #33445e;
  box-shadow: 0 8px 22px rgba(31, 61, 100, 0.05);
}

.home-authors strong {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 17px;
  font-weight: 800;
}

.home-authors p {
  margin: 4px 0;
  font-size: 14px;
  line-height: 1.65;
}

.home-authors-contact {
  margin-top: 12px !important;
  color: #183f69;
  font-weight: 650;
}

.related-resources {
  max-width: 1080px;
  margin: 18px auto;
  padding: 10px 30px 26px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #33445e;
}

.related-resources h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 800;
}

.related-resources-intro {
  margin: 0 0 12px;
  color: #516682;
  font-size: 14px;
  line-height: 1.65;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .related-resources-intro {
    white-space: normal;
  }
}

.related-resource-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-resource-list li {
  padding: 11px 0;
  border-top: 1px solid #dbe5f0;
  color: #33445e;
  font-size: 14px;
  line-height: 1.65;
}

.related-resource-list li:first-child {
  border-top: 0;
}

.related-resource-list a {
  color: #126fb1;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.related-resource-list a:hover {
  color: #0b568d;
}

.material-search-entry .file-note {
  max-width: none;
  font-size: 14px;
  white-space: nowrap;
}

.structure-reference-note {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  background: #f7fbff;
  color: #294767;
  font-size: 13px;
  line-height: 1.65;
}

.structure-reference-note a {
  color: #075da8;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Edelstein result presentation follows the article-style matrix layout. */
.edelstein-article-result {
  margin-top: 14px;
}

.edelstein-article-lead {
  color: #1b3859 !important;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 15px !important;
  line-height: 1.55 !important;
}

.edelstein-equation-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 128px;
  margin: 8px 0 10px;
  padding: 8px 12px;
  border: 1px solid var(--tensor-border, #8dd7ca);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
}

.edelstein-equation-symbol {
  flex: 0 0 auto;
  color: #10213a;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 21px;
  font-style: italic;
  white-space: nowrap;
}

.edelstein-visible-matrix {
  flex: 0 1 280px;
  width: auto;
  margin: 0;
}

.edelstein-visible-matrix .tensor-matrix-wrap {
  display: flex;
  justify-content: center;
  padding: 4px 0;
}

.edelstein-visible-matrix .tensor-matrix {
  width: min(100%, 255px);
  padding: 12px 14px;
}

.edelstein-axis-note {
  color: #52657c !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

@media (max-width: 760px) {
  .home-file-picker-row {
    max-width: 100%;
  }

  .home-file-name {
    min-width: 0;
    max-width: calc(100vw - 185px);
  }

  .material-search-entry .file-note {
    white-space: normal;
  }

  .edelstein-equation-row {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }

  .edelstein-visible-matrix {
    align-self: center;
    width: min(100%, 280px);
  }
}
