/* 服务支持 */
.support-page,
.support-sub-page,
.support-subtree-page {
  background: #f5f7fa;
}

/* 光学工具工作台：简易头，把空间留给操作区 */
.tool-workspace-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #fff;
  border-bottom: 1px solid #e8ecf0;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.tool-workspace-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  min-height: 52px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.tool-workspace-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.tool-workspace-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.tool-workspace-logo img {
  display: block;
  width: 180px;
  height: 24px;
  object-fit: contain;
}

.tool-workspace-divider {
  width: 1px;
  height: 22px;
  background: #e5e9ef;
  flex-shrink: 0;
}

.tool-workspace-title-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tool-workspace-crumb {
  font-size: 12px;
  line-height: 1.2;
  color: #8a94a6;
  text-decoration: none;
}

.tool-workspace-crumb:hover {
  color: #0066cc;
}

.tool-workspace-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1a3a5c;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-workspace-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.tool-workspace-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #dce3ec;
  border-radius: 4px;
  background: #f7f9fc;
  color: #3a4a5c;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.tool-workspace-back:hover {
  border-color: #1e9fff;
  color: #1e9fff;
  background: #f0f7ff;
}

.tool-workspace-back .layui-icon {
  font-size: 14px;
}

.tool-workspace-login.login-btn {
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

body.tool-workspace .tool-workspace-main.section-block {
  padding: 16px 0 24px;
}

body.tool-workspace .site-footer .footer-main {
  display: none;
}

body.tool-workspace .site-footer .footer-bottom {
  padding: 12px 0;
}

body.tool-workspace .site-footer .footer-bottom .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
}

body.tool-workspace .site-footer .footer-copy,
body.tool-workspace .site-footer .footer-beian {
  margin: 0;
  font-size: 12px;
}

@media (max-width: 768px) {
  .tool-workspace-bar {
    min-height: 48px;
    gap: 8px;
  }

  .tool-workspace-logo img {
    width: 132px;
    height: 18px;
  }

  .tool-workspace-divider {
    display: none;
  }

  .tool-workspace-title {
    font-size: 14px;
  }

  .tool-workspace-back span {
    display: none;
  }

  .tool-workspace-back {
    width: 32px;
    padding: 0;
    justify-content: center;
  }

  body.tool-workspace .tool-workspace-main.section-block {
    padding: 12px 0 20px;
  }
}

.support-page .section-header,
.support-sub-page .section-header {
  text-align: center;
  margin-bottom: 36px;
}

.support-page .section-desc {
  margin-top: 12px;
  font-size: 14px;
  color: #888;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.support-card {
  position: relative;
  display: block;
  padding: 28px 28px 24px;
  background: #fff;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  border: 1px solid #eef2f7;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.25s;
}

.support-card:hover {
  transform: translateY(-4px);
  border-color: #cce0f5;
  box-shadow: 0 10px 28px rgba(0, 102, 204, 0.12);
}

.support-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 2px 10px;
  font-size: 12px;
  color: #0066cc;
  background: #eef4fb;
  border-radius: 4px;
}

.support-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef4fb, #dce9f8);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.support-icon .layui-icon {
  font-size: 28px;
  color: #0066cc;
}

.support-card h3 {
  font-size: 18px;
  color: #1a3a5c;
  margin-bottom: 10px;
}

.support-card p {
  font-size: 14px;
  color: #888;
  line-height: 1.8;
  margin-bottom: 16px;
  min-height: 50px;
}

.support-link {
  font-size: 14px;
  color: #0066cc;
}

.support-contact-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 32px;
  padding: 20px 24px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #eef2f7;
}

.support-contact-text strong {
  display: block;
  color: #1a3a5c;
  margin-bottom: 4px;
}

.support-contact-text span {
  font-size: 14px;
  color: #888;
}

.support-back-bar {
  margin-top: 28px;
  text-align: center;
}

.support-back-bar-compact {
  margin-top: 18px;
}

.tool-section-title {
  font-size: 18px;
  color: #1a3a5c;
  margin: 0 0 16px;
  padding-left: 10px;
  border-left: 3px solid #0066cc;
}

.tool-section-title + .optical-tools-grid {
  margin-top: 0;
}

.support-tools-section .tool-section-title {
  margin-top: 0;
}

.tool-grid + .tool-section-title {
  margin-top: 36px;
}

/* 光学计算工具模块列表 */
.support-tools-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid #eef2f7;
}

.section-header-left {
  text-align: left;
  margin-bottom: 20px;
}

.section-header-left h3 {
  font-size: 20px;
  color: #1a3a5c;
  margin-bottom: 8px;
}

.support-tools-more {
  margin-top: 16px;
  text-align: right;
}

.optical-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.optical-tools-grid-compact .optical-tool-card h4 {
  font-size: 15px;
}

.optical-tool-card {
  display: block;
  padding: 22px 20px 18px;
  background: #fff;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  border: 1px solid #eef2f7;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: all 0.25s;
}

.optical-tool-card:hover {
  transform: translateY(-3px);
  border-color: #cce0f5;
  box-shadow: 0 8px 22px rgba(0, 102, 204, 0.1);
}

.optical-tool-card h3,
.optical-tool-card h4 {
  font-size: 16px;
  color: #1a3a5c;
  margin-bottom: 10px;
  line-height: 1.4;
}

.optical-tool-card p {
  font-size: 13px;
  color: #888;
  line-height: 1.7;
  margin-bottom: 12px;
  min-height: 44px;
}

.tool-panel-wide {
  max-width: 960px;
  margin: 0 auto;
}

.tool-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.tool-row-2 {
  grid-template-columns: repeat(2, 1fr);
}

.tool-row-3 {
  grid-template-columns: repeat(4, 1fr);
}

.tool-row-4 {
  grid-template-columns: repeat(4, 1fr);
}

.tool-col h4 {
  font-size: 15px;
  color: #1a3a5c;
  margin-bottom: 12px;
}

.tool-subtitle {
  font-size: 14px;
  color: #555;
  margin: 20px 0 12px;
  padding-top: 8px;
  border-top: 1px dashed #eef2f7;
}

.tool-figure {
  margin-bottom: 20px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  text-align: center;
}

.tool-figure img {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
}

.focal-figure {
  padding: 10px 12px 8px;
}

.focal-svg-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #f1f5f9;
}

.focal-svg-wrap svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 380px;
}

.focal-figure-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.focal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 12px;
}

.tool-ref-table {
  margin-top: 16px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  padding: 0 12px;
  background: #fafbfc;
}

.tool-ref-table summary {
  cursor: pointer;
  padding: 12px 4px;
  font-size: 14px;
  color: #0066cc;
}

.tool-table-wrap {
  max-height: 280px;
  overflow: auto;
  margin-bottom: 12px;
}

.tool-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tool-table th,
.tool-table td {
  border: 1px solid #eef2f7;
  padding: 8px 10px;
  text-align: center;
}

.tool-table th {
  background: #f0f7ff;
  color: #1a3a5c;
}

.tool-detail-wrap .tool-field select {
  width: 100%;
  height: 38px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding: 0 10px;
  font-size: 14px;
}

/* 计算工具 */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.tool-panel {
  background: #fff;
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.tool-panel h3 {
  font-size: 16px;
  color: #1a3a5c;
  margin-bottom: 8px;
}

.tool-panel h3 .layui-icon {
  color: #0066cc;
  margin-right: 4px;
}

.tool-formula {
  font-size: 14px;
  color: #0066cc;
  background: #f0f7ff;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-family: Consolas, monospace;
}

.tool-field {
  margin-bottom: 12px;
}

.tool-field label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
}

.tool-field input {
  width: 100%;
  height: 38px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding: 0 12px;
  font-size: 14px;
}

.tool-field input:focus {
  border-color: #0066cc;
  outline: none;
}

.tool-result {
  margin-top: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  min-height: 48px;
}

/* 3D 预览 */
.viewer-panel {
  background: #fff;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.viewer-stage-wrap {
  margin-bottom: 14px;
}

.viewer-stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.viewer-stage-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a3a5c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-stage-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.viewer-stage-link {
  font-size: 12px;
  color: #0066cc;
  text-decoration: none;
}

.viewer-stage-link:hover {
  text-decoration: underline;
}

.viewer-stage-close {
  width: 28px;
  height: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.viewer-stage-close:hover {
  color: #1a3a5c;
  border-color: #cbd5e1;
}

.viewer-stage {
  position: relative;
  min-height: 200px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  overflow: hidden;
  background: #d9dfe6;
}

.viewer-stage.viewer-stage-empty {
  background: #f8fafc;
}

.viewer-stage.is-playing {
  height: min(62vh, 640px);
  min-height: 420px;
}

.viewer-placeholder {
  position: relative;
  inset: auto;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  padding: 28px 16px;
}

.viewer-placeholder[hidden] {
  display: none !important;
}

.viewer-placeholder-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 6px;
}

.viewer-placeholder .layui-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.viewer-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #d9dfe6;
}

.viewer-frame[hidden] {
  display: none !important;
}

.viewer-upload-col {
  min-width: 0;
}

.viewer-upload-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0 8px;
}

.viewer-file-info {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.viewer-file-info .file-name {
  font-size: 14px;
  color: #333;
  word-break: break-all;
}

.viewer-file-info .file-status {
  font-size: 12px;
  color: #999;
}

.viewer-file-info .file-status.is-success {
  color: #16a34a;
}

.viewer-file-info .file-status.is-error {
  color: #e53935;
}

.viewer-tip {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.6;
  margin: 0;
}

.viewer-upload-progress {
  margin: 0 0 10px;
}

.viewer-upload-progress[hidden] {
  display: none !important;
}

.viewer-upload-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #e8eef5;
  overflow: hidden;
}

.viewer-upload-progress-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #0066cc, #38bdf8);
  transition: width 0.15s ease;
}

.viewer-upload-progress-text {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

.viewer-recent {
  margin-top: 18px;
  background: #fff;
  border-radius: 10px;
  padding: 16px 18px 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.viewer-recent h3 {
  margin: 0 0 12px;
  font-size: 15px;
  color: #1a3a5c;
  font-weight: 600;
}

.viewer-recent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.viewer-recent-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: 1px solid #e8eef5;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.viewer-recent-card:hover,
.viewer-recent-card.is-active {
  border-color: #0066cc;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.12);
}

.viewer-recent-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  background: #f4f6f8;
  overflow: hidden;
}

.viewer-recent-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.viewer-recent-cover .layui-icon {
  font-size: 36px;
  color: #94a3b8;
}

.viewer-recent-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px 10px;
}

.viewer-recent-meta strong {
  font-size: 13px;
  font-weight: 600;
  color: #1a3a5c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-recent-meta em {
  flex-shrink: 0;
  font-style: normal;
  font-size: 11px;
  color: #64748b;
  background: #eef4fb;
  padding: 1px 6px;
  border-radius: 4px;
}

.viewer-recent-time {
  display: block;
  padding: 0 10px 10px;
  margin-top: -4px;
  font-size: 12px;
  color: #94a3b8;
}

.viewer-recent-empty {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
}

@media (max-width: 560px) {
  .viewer-stage.is-playing {
    min-height: 320px;
    height: 55vh;
  }

  .viewer-recent-grid {
    grid-template-columns: 1fr;
  }
}

/* 报价单 */
.quote-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

.quote-intro {
  background: linear-gradient(135deg, #1a3a5c 0%, #0066cc 100%);
  color: #fff;
  border-radius: 10px;
  padding: 28px 24px;
}

.quote-intro h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.quote-intro p {
  font-size: 14px;
  line-height: 1.8;
  opacity: 0.92;
  margin-bottom: 20px;
}

.quote-tips {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.quote-tips li {
  font-size: 13px;
  margin-bottom: 10px;
  opacity: 0.95;
}

.quote-tips .layui-icon {
  margin-right: 6px;
}

.quote-hotline {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.quote-hotline span {
  display: block;
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 4px;
}

.quote-hotline strong {
  font-size: 22px;
}

.quote-form {
  background: #fff;
  border-radius: 10px;
  padding: 28px 28px 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.quote-form .layui-form-label {
  width: 96px;
}

.quote-form .layui-input-block {
  margin-left: 126px;
}

@media (max-width: 992px) {
  .support-grid {
    grid-template-columns: 1fr;
  }

  .optical-tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tool-row-4,
  .tool-row-3 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .quote-layout {
    grid-template-columns: 1fr;
  }

  .support-contact-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .viewer-toolbar {
    flex-wrap: wrap;
  }
}

@media (max-width: 576px) {
  .optical-tools-grid {
    grid-template-columns: 1fr;
  }

  .tool-row-2,
  .tool-row-4,
  .tool-row-3 {
    grid-template-columns: 1fr;
  }

  .quote-form .layui-form-label {
    width: 100%;
    text-align: left;
    padding-bottom: 4px;
  }

  .quote-form .layui-input-block {
    margin-left: 0;
  }
}

/* 光谱特性曲线 */
.light-index-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.light-index-card {
  display: block;
  padding: 28px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #eef2f7;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
}

.light-index-card:hover {
  transform: translateY(-4px);
  border-color: #cce0f5;
  box-shadow: 0 10px 28px rgba(0, 102, 204, 0.12);
}

.light-index-card h3 {
  margin: 0 0 12px;
  font-size: 20px;
  color: #1a3a5c;
}

.light-index-card p {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.8;
  color: #666;
  min-height: 96px;
}

.light-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.light-list-section {
  padding-top: 24px;
  padding-bottom: 40px;
}

/* 光谱曲线列表/详情 — PC 通屏自适应（取代 1200px container 限宽） */
.light-page-full.section-block {
  padding: 24px 0 40px;
}

.light-page-full.light-list-section,
.light-page-full.light-detail-section {
  padding-top: 24px;
  padding-bottom: 40px;
}

.light-page-inner {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 clamp(16px, 2.5vw, 40px);
  box-sizing: border-box;
}

.light-list-page .light-layout.product-layout {
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 24px);
  width: 100%;
}

.light-list-page .light-list-panel {
  min-width: 0;
}

.light-list-page .light-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.light-detail-page .light-detail-wrap.light-page-inner {
  max-width: none;
}

.light-detail-page .light-chart {
  height: clamp(400px, 48vh, 560px);
}

.light-detail-page .light-data-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 1400px) {
  .light-list-page .light-layout.product-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .light-detail-page .light-chart {
    height: clamp(440px, 52vh, 600px);
  }
}

@media (max-width: 992px) {
  .light-page-inner {
    padding: 0 15px;
  }
}

.light-layout.product-layout {
  align-items: start;
}

.light-main.product-main {
  min-width: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: none;
}

.light-sidebar.product-sidebar {
  top: 120px;
}

.light-sidebar-body {
  max-height: calc(100vh - 220px);
  overflow: auto;
}

.light-sidebar-loading {
  margin: 0;
  padding: 18px 16px;
  font-size: 13px;
  color: #999;
  text-align: center;
}

.light-cat-tree {
  list-style: none;
  margin: 0;
  padding: 6px 0 10px;
}

.light-cat-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.light-cat-row {
  display: flex;
  align-items: stretch;
  min-height: 40px;
}

.light-cat-tree .light-cat-item > a,
.light-cat-tree .light-cat-node {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 8px 8px 8px 16px;
  color: #555;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  box-sizing: border-box;
}

.light-cat-arrow-btn {
  flex-shrink: 0;
  width: 36px;
  border: none;
  background: transparent;
  color: #bbb;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.light-cat-arrow-btn:hover {
  background: #f8fafc;
  color: #0066cc;
}

.light-cat-group.is-open > .light-cat-row .light-cat-arrow-btn {
  color: #0066cc;
}

.light-cat-tree .light-cat-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.light-cat-tree .light-side-count {
  flex-shrink: 0;
  min-width: 28px;
  padding: 0 6px;
  border-radius: 10px;
  background: #f0f2f5;
  color: #888;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}

.light-cat-tree .light-cat-arrow {
  font-size: 12px;
  transition: transform 0.2s;
}

.light-cat-group.is-open > .light-cat-row .light-cat-arrow {
  transform: rotate(180deg);
}

.light-cat-tree .light-cat-item > a:hover,
.light-cat-tree .light-cat-group > .light-cat-row .light-cat-node:hover {
  background: #f8fafc;
  color: #0066cc;
}

.light-cat-tree .light-cat-item.is-active > a,
.light-cat-tree .light-cat-group.is-active > .light-cat-row .light-cat-node {
  background: #eef5ff;
  color: #0066cc;
  font-weight: 600;
}

.light-cat-tree .light-cat-item.is-active .light-side-count,
.light-cat-tree .light-cat-group.is-active > .light-cat-row .light-cat-node .light-side-count {
  background: #dbeafe;
  color: #0066cc;
}

.light-cat-tree .light-cat-children {
  display: none;
}

.light-cat-tree .light-cat-group.is-open > .light-cat-children {
  display: block;
}

.light-cat-tree [data-depth="1"] > a,
.light-cat-tree [data-depth="1"] > .light-cat-row .light-cat-node {
  padding-left: 28px;
}

.light-cat-tree [data-depth="2"] > a,
.light-cat-tree [data-depth="2"] > .light-cat-row .light-cat-node {
  padding-left: 40px;
}

.light-cat-tree [data-depth="3"] > a,
.light-cat-tree [data-depth="3"] > .light-cat-row .light-cat-node {
  padding-left: 52px;
}

.light-cat-tree [data-depth="4"] > a,
.light-cat-tree [data-depth="4"] > .light-cat-row .light-cat-node {
  padding-left: 64px;
}

.light-cat-tree [data-depth="5"] > a,
.light-cat-tree [data-depth="5"] > .light-cat-row .light-cat-node {
  padding-left: 76px;
}

.light-cat-tree .light-cat-children .light-cat-item > a {
  font-size: 13px;
  min-height: 36px;
}

.light-list-panel {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #eef2f7;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  padding: 16px 18px 20px;
}

.light-type-panel,
.light-detail-wrap .light-chart-panel,
.light-detail-wrap .light-data-panel,
.light-detail-head {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #eef2f7;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.light-type-panel {
  overflow: hidden;
}

.light-type-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border: none;
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  color: #1a3a5c;
  cursor: pointer;
}

.light-type-toggle .layui-icon {
  transition: transform 0.2s;
}

.light-type-panel.is-open .light-type-toggle .layui-icon {
  transform: rotate(90deg);
}

.light-type-body {
  display: none;
  padding: 0 18px 18px;
}

.light-type-panel.is-open .light-type-body {
  display: block;
}

.light-type-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 24px;
}

.light-type-col h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #1a3a5c;
}

.light-type-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.light-type-col li + li {
  margin-top: 4px;
}

.light-type-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
  border: none;
  background: none;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.light-type-link:hover,
.light-type-link.is-active {
  color: #0066cc;
}

.light-type-link .layui-icon {
  font-size: 12px;
  color: #bbb;
}

.light-list-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 14px;
}

.light-list-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.light-filter-basic-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) minmax(120px, 0.9fr) minmax(220px, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
}

.light-filter-keyword,
.light-filter-model,
.light-filter-basic-row .light-thickness-range {
  width: 100%;
  min-width: 0;
}

.light-filter-band-block {
  padding: 12px 14px;
  border: 1px solid #e4eaf0;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.light-filter-band-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 10px;
}

.light-filter-band-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a3a5c;
}

.light-filter-band-sub {
  font-size: 12px;
  color: #888;
}

.light-list-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.light-mobile-cat-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #fff;
  color: #1a3a5c;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
}

.light-mobile-cat-toggle .layui-icon-app {
  color: #0066cc;
  font-size: 18px;
}

.light-mobile-cat-toggle-arrow {
  font-size: 12px;
  color: #999;
  transition: transform 0.2s;
}

.light-mobile-cat-toggle.is-open .light-mobile-cat-toggle-arrow {
  transform: rotate(180deg);
}

.light-filter-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  justify-self: end;
}

.light-filter-actions .layui-btn {
  margin: 0;
  white-space: nowrap;
}

.light-chart-btn-text {
  display: none;
}

.light-filter-input,
.light-filter-select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  font-size: 13px;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.light-filter-input:focus,
.light-filter-select:focus {
  border-color: #0066cc;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.12);
}

.light-filter-input {
  min-width: 0;
}

.light-filter-type {
  min-width: 220px;
  max-width: 320px;
}

.light-thickness-range {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.light-band-filter {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.light-band-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.light-band-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e4eaf0;
  border-radius: 6px;
  background: #fff;
}

.light-band-range {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  flex: 1 1 260px;
  max-width: 340px;
}

.light-band-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.light-band-value-op {
  height: 34px;
  min-width: 56px;
  padding: 0 8px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  box-sizing: border-box;
}

.light-band-remove-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #999;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.light-band-remove-btn:hover {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.08);
}

.light-band-add-btn {
  align-self: flex-start;
  height: 32px;
  padding: 0 14px;
  border: 1px dashed #0066cc;
  border-radius: 6px;
  background: #fff;
  color: #0066cc;
  font-size: 12px;
  cursor: pointer;
}

.light-band-add-btn:hover {
  background: rgba(0, 102, 204, 0.06);
}

.light-band-add-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.light-filter-span-full {
  grid-column: 1 / -1;
  width: 100%;
}

.light-band-tip {
  margin-top: 8px;
  font-size: 12px;
  color: #888;
  line-height: 1.5;
}

.light-feedback-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}

.light-section-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.light-filter-number {
  width: 100%;
  min-width: 0;
}

.light-band-group .light-filter-number {
  width: 110px;
  min-width: 88px;
}

.light-range-sep {
  color: #999;
  font-size: 13px;
  user-select: none;
}

.light-type-cell {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  cursor: help;
}

.light-list-tip {
  font-size: 13px;
  color: #888;
}

.light-table-wrap,
.light-data-table-wrap {
  overflow-x: auto;
}

.light-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.light-table th,
.light-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  vertical-align: middle;
}

.light-table th {
  background: #f8fafc;
  color: #666;
  font-weight: 600;
  white-space: nowrap;
}

.light-table tbody tr:hover {
  background: #fafcff;
}

.light-table-empty {
  text-align: center;
  color: #999;
  padding: 28px 12px !important;
}

.light-chart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #eef4fb;
  color: #0066cc;
  text-decoration: none;
}

.light-chart-btn:hover {
  background: #0066cc;
  color: #fff;
}

.light-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.light-page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background: #fff;
  color: #666;
  cursor: pointer;
}

.light-page-btn:hover,
.light-page-btn.is-active {
  border-color: #0066cc;
  color: #0066cc;
}

.light-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.light-detail-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.light-detail-head {
  padding: 18px 20px;
}

.light-detail-head h3 {
  margin: 0 0 10px;
  font-size: 20px;
  color: #1a3a5c;
}

.light-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 13px;
  color: #666;
}

.light-file-link {
  color: #0066cc;
}

.light-chart-panel {
  padding: 12px 12px 4px;
}

.light-chart {
  width: 100%;
  height: 420px;
  overflow: visible;
}

.light-data-panel {
  padding: 16px 18px 20px;
}

.light-data-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  color: #666;
}

.light-page-size select {
  height: 30px;
  margin: 0 4px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
}

@media (min-width: 993px) and (max-width: 1280px) {
  .light-list-page .light-filter-basic-row {
    grid-template-columns: minmax(160px, 1.2fr) minmax(110px, 0.8fr) minmax(200px, 1fr);
  }

  .light-list-page .light-filter-actions {
    grid-column: 1 / -1;
    justify-self: flex-start;
  }
}

@media (max-width: 992px) {
  .light-layout.product-layout {
    grid-template-columns: 1fr;
  }

  .light-sidebar.product-sidebar {
    position: static;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .light-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .light-list-page .light-layout.product-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    min-width: 0;
  }

  .light-list-page .light-mobile-cat-toggle {
    display: flex;
    order: 1;
    width: 100%;
  }

  .light-list-page .light-sidebar.product-sidebar {
    display: none;
    order: 2;
    width: 100%;
    max-width: none;
  }

  .light-list-page .light-sidebar.product-sidebar.is-mobile-open {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  }

  .light-list-page .light-sidebar .sidebar-title {
    padding: 14px 16px;
    font-size: 15px;
  }

  .light-list-page .light-sidebar-body {
    max-height: min(58vh, 400px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .light-list-page .light-cat-tree .light-cat-row {
    min-height: 44px;
  }

  .light-list-page .light-cat-tree .light-cat-item > a,
  .light-list-page .light-cat-tree .light-cat-group > .light-cat-row .light-cat-node {
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 14px;
  }

  .light-list-page .light-cat-tree .light-cat-label {
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .light-list-page .light-cat-tree .light-side-count {
    min-width: 24px;
    padding: 0 5px;
    font-size: 11px;
  }

  .light-list-page .light-cat-arrow-btn {
    width: 44px;
    min-height: 44px;
  }

  .light-list-page .light-cat-tree [data-depth="1"] > a,
  .light-list-page .light-cat-tree [data-depth="1"] > .light-cat-row .light-cat-node {
    padding-left: 20px;
  }

  .light-list-page .light-cat-tree [data-depth="2"] > a,
  .light-list-page .light-cat-tree [data-depth="2"] > .light-cat-row .light-cat-node {
    padding-left: 28px;
  }

  .light-list-page .light-cat-tree [data-depth="3"] > a,
  .light-list-page .light-cat-tree [data-depth="3"] > .light-cat-row .light-cat-node {
    padding-left: 36px;
  }

  .light-list-page .light-cat-tree [data-depth="4"] > a,
  .light-list-page .light-cat-tree [data-depth="4"] > .light-cat-row .light-cat-node {
    padding-left: 44px;
  }

  .light-list-page .light-cat-tree [data-depth="5"] > a,
  .light-list-page .light-cat-tree [data-depth="5"] > .light-cat-row .light-cat-node {
    padding-left: 52px;
  }

  .light-list-page .light-main.product-main {
    order: 3;
    width: 100%;
    min-width: 0;
  }

  .light-list-page #lightActiveType {
    display: none;
  }

  .light-list-page .light-filter-basic-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .light-list-page .light-filter-actions {
    width: 100%;
    justify-content: stretch;
  }
}

@media (max-width: 768px) {
  .light-index-grid {
    grid-template-columns: 1fr;
  }

  .light-index-card p {
    min-height: 0;
  }

  .light-type-grid {
    grid-template-columns: 1fr;
  }

  .light-filter-input {
    min-width: 140px;
  }

  .light-chart {
    height: 320px;
  }

  .light-table {
    font-size: 12px;
  }

  .light-table th,
  .light-table td {
    padding: 8px 10px;
  }

  /* —— 光谱曲线列表页移动端 —— */
  .light-list-page .light-page-inner {
    padding: 0 12px;
  }

  .light-list-page .light-list-section {
    padding-top: 16px;
    padding-bottom: 28px;
  }

  .light-list-page .light-list-panel {
    padding: 14px 12px 16px;
  }

  .light-list-page .light-list-filters {
    gap: 12px;
  }

  .light-list-page .light-filter-basic-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .light-list-page .light-filter-keyword {
    grid-column: 1 / -1;
  }

  .light-list-page .light-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .light-list-page .light-filter-input,
  .light-list-page .light-filter-select,
  .light-list-page .light-filter-number {
    width: 100%;
    min-width: 0;
    height: 40px;
    font-size: 14px;
    box-sizing: border-box;
  }

  .light-list-page .light-thickness-range {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
  }

  .light-list-page .light-filter-band-block {
    padding: 12px;
  }

  .light-list-page .light-filter-band-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .light-list-page .light-band-group {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .light-list-page .light-band-range {
    max-width: none;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

  .light-list-page .light-band-value {
    display: grid;
    grid-template-columns: 72px 1fr;
    width: 100%;
  }

  .light-list-page .light-band-group .light-filter-number {
    width: 100%;
    min-width: 0;
  }

  .light-list-page .light-band-remove-btn {
    align-self: flex-end;
    width: 36px;
    height: 36px;
  }

  .light-list-page .light-band-add-btn {
    width: 100%;
    height: 40px;
    align-self: stretch;
  }

  .light-list-page .light-filter-actions .layui-btn {
    flex: 1 1 calc(33.333% - 6px);
    min-width: 88px;
    min-height: 40px;
    margin: 0;
    padding: 0 10px;
    line-height: 38px;
  }

  .light-list-page .light-band-tip {
    font-size: 11px;
    line-height: 1.55;
  }

  .light-list-page .light-table-wrap-list {
    overflow: visible;
  }

  .light-list-page .light-table-list thead {
    display: none;
  }

  .light-list-page .light-table-list tbody tr {
    display: block;
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid #e8edf3;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  }

  .light-list-page .light-table-list tbody td.light-table-empty {
    display: block;
    border: none;
    box-shadow: none;
    padding: 24px 12px;
    text-align: center;
    color: #999;
  }

  .light-list-page .light-table-list tbody tr:has(.light-table-empty) {
    display: block;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .light-list-page .light-table-list tbody tr:has(.light-table-empty) td {
    display: block;
    border: none;
    padding: 24px 12px;
    text-align: center;
  }

  .light-list-page .light-table-list tbody tr:has(.light-table-empty) td::before {
    display: none;
  }

  .light-list-page .light-table-list tbody td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px dashed #eef2f7;
    text-align: right;
  }

  .light-list-page .light-table-list tbody td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .light-list-page .light-table-list tbody td::before {
    content: attr(data-label);
    flex-shrink: 0;
    color: #888;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
  }

  .light-list-page .light-table-list tbody td.light-table-empty::before {
    display: none;
  }

  .light-list-page .light-table-list .light-col-check {
    justify-content: flex-start;
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 10px;
    margin-bottom: 4px;
  }

  .light-list-page .light-table-list .light-col-check::before {
    content: '选择对比';
  }

  .light-list-page .light-table-list .light-col-name {
    font-weight: 600;
    color: #1a3a5c;
    text-align: left;
    word-break: break-word;
  }

  .light-list-page .light-table-list .light-type-cell {
    max-width: none;
    white-space: normal;
    text-align: right;
  }

  .light-list-page .light-table-list .light-col-action {
    align-items: center;
  }

  .light-list-page .light-chart-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 6px;
    background: #eef5ff;
    color: #0066cc;
    text-decoration: none;
  }

  .light-list-page .light-chart-btn-text {
    display: inline;
    font-size: 13px;
  }

  .light-list-page .light-pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 8px 0 4px;
  }

  .light-list-page .light-page-btn {
    min-width: 40px;
    min-height: 40px;
    padding: 0 12px;
    font-size: 14px;
  }

  .light-list-page .support-back-bar .layui-btn {
    width: 100%;
    box-sizing: border-box;
  }

  .light-compare-drawer {
    width: 100vw;
    max-width: 100vw;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
  }

  .light-compare-drawer-actions .layui-btn {
    flex: 1 1 auto;
    min-height: 40px;
  }
}

@media (max-width: 400px) {
  .light-list-page .light-filter-basic-row {
    grid-template-columns: 1fr;
  }

  .light-list-page .light-filter-actions .layui-btn {
    flex: 1 1 100%;
  }
}

/* Light curve compare */
.light-col-check {
  width: 42px;
  text-align: center;
}

.light-col-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.light-compare-drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 998;
}

.light-compare-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 92vw);
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  padding: 18px 16px 24px;
}

.light-compare-drawer.is-open {
  transform: translateX(0);
}

.light-compare-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.light-compare-drawer-head h4 {
  margin: 0;
  font-size: 18px;
  color: #1a3a5c;
}

.light-compare-drawer-close {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #666;
}

.light-compare-drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.light-compare-drawer-tip {
  margin: 0 0 12px;
  font-size: 13px;
  color: #666;
}

.light-compare-drawer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

.light-compare-drawer-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e8edf3;
  border-radius: 8px;
  margin-bottom: 10px;
}

.light-compare-drawer-item-name {
  font-weight: 600;
  color: #1a3a5c;
  margin-bottom: 6px;
  word-break: break-word;
}

.light-compare-drawer-item-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #666;
}

.light-compare-drawer-item-main {
  flex: 1;
  min-width: 0;
}

.light-compare-remove-btn {
  border: none;
  background: transparent;
  color: #f5222d;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.light-compare-drawer-empty {
  padding: 24px 12px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

.light-compare-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.light-compare-chart-panel {
  border: 1px solid #e8edf3;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfdff 0%, #fff 100%);
  box-shadow: 0 2px 10px rgba(26, 58, 92, 0.04);
}

.light-compare-tool-panel,
.light-compare-section-card,
.light-compare-table-panel {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(26, 58, 92, 0.04);
}

.light-compare-tool-panel {
  padding: 14px 16px;
}

.light-compare-section-card {
  overflow: hidden;
}

.light-compare-tool-head,
.light-compare-section-head {
  font-size: 14px;
  font-weight: 600;
  color: #1a3a5c;
  margin-bottom: 10px;
}

.light-compare-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 14px 16px;
  margin-bottom: 0;
  background: #f7faff;
  border-bottom: 1px solid #e8edf3;
}

.light-compare-section-tip,
.light-compare-table-sub {
  font-size: 12px;
  font-weight: 400;
  color: #8a96a3;
}

.light-compare-toggle-group,
.light-compare-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.light-toggle-btn,
.light-action-btn {
  appearance: none;
  border: 1px solid #cfd8e3;
  background: #fff;
  color: #4a6075;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  transition: all 0.2s ease;
}

.light-toggle-btn:hover:not(:disabled),
.light-action-btn:hover:not(:disabled) {
  border-color: #0066cc;
  color: #0066cc;
  background: #f3f9ff;
}

.light-toggle-btn.is-active,
.light-action-btn.is-active {
  border-color: #0066cc;
  background: linear-gradient(180deg, #0074e8 0%, #0066cc 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.22);
}

.light-toggle-btn:disabled,
.light-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.light-action-btn-muted {
  background: #f5f7fa;
}

.light-action-btn-muted.is-active {
  background: linear-gradient(180deg, #0074e8 0%, #0066cc 100%);
}

.light-compare-calc-panel {
  padding: 8px 16px 12px;
}

.light-compare-calc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 12px;
  padding: 12px 10px;
  margin: 0 -10px;
  border-bottom: 1px solid #f0f2f5;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.light-compare-calc-row:hover {
  background: #fafcff;
}

.light-compare-calc-row.is-calculated {
  background: #f6fffb;
  border: 1px solid #d9f7e8;
  margin-bottom: 8px;
}

.light-compare-calc-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.light-compare-calc-row.is-calculated:last-child {
  border-bottom: 1px solid #d9f7e8;
}

.light-compare-name-block {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 0 1 auto;
  max-width: min(320px, 100%);
}

.light-compare-check {
  flex: 0 0 auto;
  margin-top: 2px;
}

.light-compare-check input {
  width: 16px;
  height: 16px;
  accent-color: #0066cc;
}

.light-compare-name {
  flex: 0 1 auto;
  white-space: normal;
  word-break: break-word;
  overflow: visible;
  line-height: 1.45;
  font-weight: 600;
  color: #1a3a5c;
}

.light-compare-badge {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e6fffb;
  color: #08979c;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
}

.light-compare-thickness,
.light-compare-input-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  flex: 0 0 auto;
}

.light-compare-label,
.light-compare-unit {
  font-size: 13px;
  color: #666;
}

.light-compare-base-input,
.light-compare-target-input {
  width: 88px;
  height: 34px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 13px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.light-compare-base-input {
  background: #f5f7fa;
  color: #666;
}

.light-compare-target-input:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
}

.light-compare-target-input {
  width: 160px;
}

.light-compare-model {
  padding: 5px 10px;
  background: #eef4fb;
  border-radius: 6px;
  font-size: 13px;
  color: #3d5a73;
  font-weight: 500;
}

.light-calc-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 6px;
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.light-calc-btn-primary {
  background: #0066cc;
  color: #fff;
}

.light-calc-btn-primary:hover {
  background: #005bb5;
}

.light-calc-btn-ghost {
  background: #fff;
  border-color: #d9e2ec;
  color: #5c6b7a;
}

.light-calc-btn-ghost:hover {
  border-color: #0066cc;
  color: #0066cc;
  background: #f3f9ff;
}

.light-compare-empty {
  margin: 0;
  padding: 24px 8px;
  text-align: center;
  color: #999;
}

.light-compare-table-panel .light-data-toolbar {
  padding: 14px 16px 0;
}

.light-compare-table-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #1a3a5c;
}

.light-compare-table-wrap {
  max-height: 520px;
  overflow: auto;
  margin: 12px 16px 16px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
}

.light-compare-page .light-chart {
  height: 420px;
}

.light-compare-overlay-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.light-compare-overlay-panel .light-compare-tool-head {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .light-compare-name-block {
    flex-basis: 100%;
    max-width: 100%;
  }

  .light-compare-thickness,
  .light-compare-input-group {
    flex-basis: 100%;
  }

  .light-compare-overlay-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .light-compare-page .light-chart {
    height: 320px;
  }
}

/* 三次样条插值工具 */
.spline-tool-panel {
  max-width: 1080px;
}

.spline-tool-intro {
  font-size: 13px;
  color: #666;
  line-height: 1.7;
  margin: 0 0 20px;
}

.spline-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.spline-section {
  padding: 16px 0 0;
  border-top: 1px dashed #eef2f7;
}

.spline-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.spline-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.spline-file-btn {
  margin: 0;
  cursor: pointer;
}

.spline-paste {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  min-height: 120px;
}

.spline-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 8px;
}

.spline-table-wrap {
  max-height: 220px;
  overflow: auto;
  border: 1px solid #eef2f7;
  border-radius: 6px;
}

.spline-table-wrap-tall {
  max-height: 320px;
}

.spline-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.spline-table th,
.spline-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f0f0f0;
  text-align: right;
}

.spline-table th:first-child,
.spline-table td:first-child {
  text-align: center;
  width: 48px;
  color: #999;
}

.spline-table thead th {
  background: #f5f7fa;
  color: #333;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

.spline-empty,
.spline-more {
  text-align: center !important;
  color: #999;
  padding: 16px !important;
}

.spline-param-row {
  margin-bottom: 12px;
}

.spline-chart {
  width: 100%;
  height: 380px;
  background: #fafbfc;
  border: 1px solid #eef2f7;
  border-radius: 8px;
}

.tool-result.is-error,
#splineParamHint.is-error {
  color: #c0392b;
}

@media (max-width: 768px) {
  .spline-chart {
    height: 280px;
  }

  .spline-toolbar .layui-btn {
    margin-bottom: 4px;
  }
}

/* 曲线数字化（图转数据） */
.digitize-tool-panel {
  max-width: 1080px;
}

.digitize-tool-intro {
  font-size: 13px;
  color: #666;
  line-height: 1.7;
  margin: 0 0 20px;
}

.digitize-layout {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.digitize-work {
  display: contents;
}

.digitize-section {
  padding: 16px 0 0;
  border-top: 1px dashed #eef2f7;
}

.digitize-controls > .digitize-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.digitize-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.digitize-file-btn {
  margin: 0;
  cursor: pointer;
}

.digitize-note {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
  margin: 0 0 10px;
}

.digitize-meta {
  font-size: 12px;
  color: #888;
}

.digitize-param-row {
  margin-bottom: 4px;
}

.digitize-calib-btn.is-set {
  border-color: #1e9fff;
  color: #1e9fff;
}

.digitize-canvas-wrap {
  position: relative;
  margin: 8px 0 12px;
  background: #edf1f5;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  overflow: auto;
  max-height: 70vh;
}

.digitize-canvas-wrap:focus {
  outline: 1px solid #9ec9f5;
}

.digitize-canvas-stack {
  position: relative;
  display: block;
}

.digitize-canvas-wrap > .digitize-canvas-stack > #digitizeCanvas,
.digitize-canvas-wrap > #digitizeCanvas {
  display: block;
  max-width: 100%;
  height: auto;
  cursor: crosshair;
  touch-action: none;
  vertical-align: top;
}

.digitize-overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
  max-width: none;
}

.digitize-loupe {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  border: 2px solid #1e9fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
  background: #111;
}

.digitize-loupe canvas {
  display: block;
  width: 130px;
  height: 130px;
  max-width: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.digitize-calib-btn.is-active,
#digitizePickBtn.is-active,
#digitizeWarpStartBtn.is-active,
#digitizeManualBtn.is-active {
  background: #1e9fff;
  color: #fff;
  border-color: #1e9fff;
}

.digitize-swatch {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid #d0d7de;
  background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 8px 8px;
  vertical-align: middle;
}

.digitize-swatch.is-set {
  background: var(--digitize-swatch, #ccc);
  background-image: none;
}

.digitize-threshold-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #555;
}

.digitize-threshold-label input[type="range"] {
  width: 120px;
  vertical-align: middle;
}

.digitize-extract-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.digitize-extract-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
}

#digitizeHint.is-error {
  color: #c0392b;
}

.digitize-result {
  margin-top: 8px;
  min-width: 0;
}

.digitize-result .digitize-toolbar {
  margin-bottom: 6px;
}

.digitize-result-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.digitize-result-table {
  max-height: 180px;
}

.digitize-result .spline-table {
  font-size: 12px;
}

.digitize-result .spline-table th,
.digitize-result .spline-table td {
  padding: 4px 8px;
}

.digitize-result .spline-empty,
.digitize-result .spline-more {
  padding: 10px !important;
}

.digitize-compare-chart {
  width: 100%;
  height: 180px;
  background: #fafbfc;
  border: 1px solid #eef2f7;
  border-radius: 6px;
}

@media (max-width: 768px) {
  .digitize-toolbar .layui-btn {
    margin-bottom: 4px;
  }

  .digitize-canvas-wrap {
    max-height: 55vh;
  }
}

@media (min-width: 769px) {
  body.tool-workspace[data-tool-slug="digitize"] .tool-workspace-main.section-block {
    padding: 12px 0 20px;
  }

  body.tool-workspace[data-tool-slug="digitize"] .digitize-controls {
    max-height: calc(100vh - 88px);
  }

  .digitize-tool-panel {
    max-width: none;
    padding: 16px 20px 18px;
  }

  .digitize-tool-panel > h3 {
    margin-bottom: 4px;
  }

  .digitize-tool-intro {
    margin: 0 0 10px;
    line-height: 1.55;
  }

  .digitize-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .digitize-work {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 10px 14px;
    align-items: start;
  }

  .digitize-controls {
    max-height: calc(100vh - 148px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    min-width: 0;
  }

  .digitize-stage {
    position: static;
    top: auto;
    min-width: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
  }

  .digitize-section {
    padding: 6px 0 0;
  }

  .digitize-tool-panel .tool-subtitle {
    font-size: 13px;
    margin: 0 0 6px;
    padding-top: 0;
    border-top: none;
  }

  .digitize-controls > .digitize-section:first-of-type .tool-subtitle {
    border-top: none;
    padding-top: 0;
  }

  .digitize-toolbar {
    gap: 6px;
    margin-bottom: 6px;
  }

  .digitize-toolbar .layui-btn {
    margin: 0;
  }

  .digitize-note {
    font-size: 12px;
    line-height: 1.5;
    margin: 0 0 6px;
  }

  .digitize-param-row {
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
    margin-bottom: 0;
  }

  .digitize-param-row .tool-field {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
  }

  .digitize-param-row .tool-field label {
    flex: 0 0 40px;
    margin-bottom: 0;
    font-size: 12px;
    line-height: 1.2;
  }

  .digitize-param-row .tool-field input,
  .tool-detail-wrap .digitize-param-row .tool-field select {
    flex: 1;
    min-width: 0;
    height: 28px;
    font-size: 13px;
    padding: 0 8px;
  }

  .digitize-controls .digitize-warp-grid,
  .digitize-controls .digitize-extract-grid,
  .digitize-controls .digitize-calib-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 6px;
  }

  .digitize-controls .digitize-warp-grid .layui-btn,
  .digitize-controls .digitize-extract-grid .layui-btn,
  .digitize-controls .digitize-calib-grid .layui-btn {
    width: 100%;
    margin: 0;
  }

  .digitize-extract-seed {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
  }

  .digitize-extract-seed .digitize-threshold-label {
    flex: 1;
    min-width: 0;
    font-size: 12px;
  }

  .digitize-extract-seed .digitize-threshold-label input[type="range"] {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .digitize-extract-panel .digitize-meta {
    display: block;
    margin: 0;
  }

  .digitize-canvas-wrap {
    margin: 0;
    flex: 0 0 auto;
    min-height: 200px;
    max-height: none;
  }

  #digitizeHint.tool-result {
    margin-top: 8px;
    margin-bottom: 0;
    padding: 8px 10px;
    min-height: 0;
    font-size: 13px;
    line-height: 1.5;
  }

  .digitize-result-body {
    display: grid;
    grid-template-columns: minmax(168px, 0.85fr) minmax(240px, 1.15fr);
    gap: 8px;
    align-items: stretch;
  }

  .digitize-result-table {
    max-height: 200px;
  }

  .digitize-compare-chart {
    height: 200px;
  }
}
