:root {
  --bg: #f4f0e7;
  --paper: #fffaf0;
  --ink: #18202a;
  --muted: #657080;
  --line: #d8cfbf;
  --accent: #0f8b8d;
  --accent-2: #f08a24;
  --danger: #a7432f;
  --shadow: 0 22px 70px rgba(39, 35, 26, 0.12);
  --report-width: min(1680px, calc(100% - clamp(40px, 6vw, 88px)));
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, rgba(15, 139, 141, 0.14), transparent 32rem),
    radial-gradient(circle at 92% 2%, rgba(240, 138, 36, 0.18), transparent 34rem),
    linear-gradient(180deg, #fbf6ea 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: "Segoe UI Variable Display", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.report-loading-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 25% 18%, rgba(15, 139, 141, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(247, 244, 236, 0.98), rgba(234, 242, 239, 0.96));
  backdrop-filter: blur(7px);
}

.report-loading-gate.is-hidden {
  display: none;
}

.report-loading-card {
  width: min(680px, calc(100vw - 48px));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 34px;
  background: rgba(255, 250, 240, 0.96);
  box-shadow: 0 24px 80px rgba(36, 28, 18, 0.16);
}

.report-loading-card h1 {
  margin: 8px 0 10px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 0.98;
}

.report-loading-card p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 17px;
}

.report-loading-bar {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #eadfcd;
}

.report-loading-bar span {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 260ms ease;
}

.report-loading-card button {
  margin-top: 24px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 15px 22px;
  background: var(--ink);
  color: #fffaf0;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.report-site-nav {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 60px;
  padding: 8px max(20px, calc((100% - min(1680px, calc(100% - clamp(40px, 6vw, 88px)))) / 2));
  border-bottom: 1px solid rgba(87, 75, 52, 0.16);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 8px 24px rgba(39, 35, 26, 0.08);
  backdrop-filter: blur(18px);
}

.report-site-nav-collapsed .report-site-nav {
  display: none;
}

.report-site-nav__brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.report-site-nav__brand > span:last-child {
  display: grid;
  gap: 1px;
}

.report-site-nav__brand strong {
  font-size: 15px;
  line-height: 1.1;
}

.report-site-nav__brand small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.report-site-nav__mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fffaf0;
  font-size: 19px;
  font-weight: 900;
}

.report-site-nav__links {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.report-site-nav__links a {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 8px;
  color: #334150;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.report-site-nav__links a:hover,
.report-site-nav__links a:focus-visible {
  background: rgba(15, 139, 141, 0.1);
  color: #075f61;
  outline: none;
}

.report-site-nav__collapse,
.report-top-nav__site-toggle {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid rgba(87, 75, 52, 0.2);
  border-radius: 999px;
  padding: 7px 12px;
  background: #fffdf8;
  color: #334150;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

.report-top-nav {
  position: sticky;
  top: 10px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 12px;
  width: var(--report-width);
  margin: 10px auto 0;
  padding: 10px 12px 10px 16px;
  border: 1px solid rgba(87, 75, 52, 0.18);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.92);
  box-shadow: 0 12px 34px rgba(39, 35, 26, 0.13);
  backdrop-filter: blur(18px);
}

.report-top-nav__portal {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 5px 12px 5px 6px;
  border: 1px solid rgba(15, 139, 141, 0.24);
  border-radius: 999px;
  background: rgba(223, 243, 236, 0.82);
  color: #075f61;
  text-decoration: none;
}

.report-top-nav__portal > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #075f61;
  color: #fff;
  font-size: 14px;
}

.report-top-nav__portal strong {
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.report-top-nav__site-toggle:hover,
.report-top-nav__site-toggle:focus-visible,
.report-site-nav__collapse:hover,
.report-site-nav__collapse:focus-visible {
  border-color: rgba(15, 139, 141, 0.36);
  background: rgba(15, 139, 141, 0.1);
  color: #075f61;
  outline: none;
}

.report-top-nav__title {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.report-top-nav__links {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.report-top-nav a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #243144;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.report-top-nav__context {
  flex: 0 1 360px;
  min-width: 190px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.report-top-nav__context-label {
  display: inline-flex;
  align-items: center;
  max-width: 180px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(15, 139, 141, 0.22);
  border-radius: 999px;
  background: rgba(223, 243, 236, 0.72);
  color: #173144;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-top-nav__context-label.muted {
  max-width: 150px;
  border-color: rgba(240, 138, 36, 0.22);
  background: rgba(240, 138, 36, 0.12);
  color: #744116;
}

.report-top-nav a:hover,
.report-top-nav a:focus-visible,
.report-top-nav a.is-active {
  border-color: rgba(15, 139, 141, 0.28);
  background: rgba(15, 139, 141, 0.1);
  color: #075f61;
  outline: none;
  transform: translateY(-1px);
}

@media (max-width: 1100px) {
  .report-top-nav {
    align-items: center;
    border-radius: 18px;
    flex-wrap: nowrap;
  }
  .report-top-nav__links {
    order: initial;
    width: auto;
  }
}

#projectOverview,
#quantOverviewModule,
#analysisModules,
#searchParametersModule,
#rawChromatogramSection,
#libraryPanel,
#proteinBrowser,
#sequenceCoverageSection,
#spectrumViewerSection,
#exportQueuePanel,
#dataNotes {
  scroll-margin-top: var(--report-scroll-offset, 96px);
}

.hero {
  padding: 38px 0 22px;
  width: var(--report-width);
  margin: 0 auto;
}

.hero__copy, .panel {
  border: 1px solid rgba(87, 75, 52, 0.16);
  background: rgba(255, 250, 240, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero__copy {
  padding: 34px;
  border-radius: 30px;
  position: relative;
  overflow: hidden;
}

.hero__copy::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(15, 139, 141, 0.22);
  border-radius: 50%;
}

.eyebrow, .panel__kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

h1 {
  max-width: 980px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.96;
}

h2 {
  font-size: 24px;
}

.lead {
  max-width: 840px;
  color: #344050;
  font-size: 17px;
  line-height: 1.8;
}

.notice {
  width: fit-content;
  max-width: 980px;
  margin-top: 22px;
  padding: 12px 16px;
  border-left: 4px solid var(--danger);
  background: rgba(167, 67, 47, 0.08);
  color: #6e2b1f;
  border-radius: 14px;
  font-weight: 700;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.stat-card {
  min-height: 92px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(87, 75, 52, 0.16);
  background: linear-gradient(145deg, rgba(255,255,255,0.88), rgba(255,250,240,0.78));
  box-shadow: var(--shadow);
}

.stat-card strong {
  display: block;
  font-size: 26px;
  line-height: 1.1;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding: 0 0 24px;
  align-items: start;
  width: var(--report-width);
  margin: 0 auto;
}

.embedded-panel {
  margin-top: 18px;
  border: 1px solid rgba(87, 75, 52, 0.16);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.72);
  overflow: hidden;
}

.embedded-panel > .panel__header {
  padding: 16px 18px;
}

.project-overview,
.run-overview-panel,
.analysis-overview-panel,
.search-parameters-panel,
.raw-chrom-panel,
.library-panel {
  width: var(--report-width);
  margin: 0 auto 24px;
}

.raw-chrom-panel .panel__header h2,
.run-overview-panel .panel__header h2,
.analysis-overview-panel .panel__header h2,
.search-parameters-panel .panel__header h2 {
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.raw-chrom-panel .panel__kicker,
.run-overview-panel .panel__kicker,
.analysis-overview-panel .panel__kicker,
.search-parameters-panel .panel__kicker {
  font-size: 12px;
}

.raw-chrom-panel .meta-line,
.run-overview-panel .meta-line,
.analysis-overview-panel .meta-line,
.search-parameters-panel .meta-line {
  font-size: 15px;
  line-height: 1.6;
}

.source-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.collapsible-summary {
  cursor: pointer;
  list-style: none;
}

.collapsible-summary::-webkit-details-marker {
  display: none;
}

.summary-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.collapse-hint {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  color: #536170;
  font-size: 12px;
  font-weight: 900;
}

details[open] .collapse-hint {
  color: #0c686a;
  font-size: 0;
}

details[open] .collapse-hint::after {
  content: "收起";
  font-size: 12px;
}

.collapsible-panel-body {
  padding-top: 2px;
}

.module-collapse-toggle {
  min-height: 34px;
  padding: 6px 11px;
  border-radius: 999px;
  border-color: var(--line);
  background: #fffdf8;
  color: #17202b;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.module-collapse-toggle:hover {
  border-color: rgba(15, 139, 141, 0.42);
  color: #0c686a;
}

.panel__header.module-collapse-ready,
.submodule__header.module-collapse-ready {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel__header.module-collapse-ready:not(.split),
.submodule__header.module-collapse-ready:not(.split) {
  flex-wrap: wrap;
}

.module-collapsible-body {
  display: block;
}

.panel.is-collapsed > .module-collapsible-body,
.report-submodule.is-collapsed > .module-collapsible-body {
  display: none;
}

.panel.is-collapsed,
.report-submodule.is-collapsed {
  padding-bottom: 22px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.overview-narrative {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(360px, 1.35fr) minmax(260px, 0.9fr);
  gap: 14px;
  margin-bottom: 14px;
}

.overview-story,
.overview-flow,
.overview-status {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: 0 18px 45px rgba(40, 36, 28, 0.07);
}

.overview-story {
  position: relative;
  overflow: hidden;
  padding: 18px;
  background:
    radial-gradient(circle at 10% 0%, rgba(15, 139, 141, 0.18), transparent 34%),
    linear-gradient(145deg, #fffdf8 0%, #f2efe3 100%);
}

.overview-story::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -58px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(15, 139, 141, 0.24);
  border-radius: 999px;
}

.overview-story h4,
.overview-flow h4,
.overview-status h4 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.overview-story p,
.overview-flow p,
.overview-status p {
  margin: 10px 0 0;
  color: #3b4652;
  font-size: 13px;
  line-height: 1.6;
}

.overview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.overview-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(15, 139, 141, 0.28);
  border-radius: 999px;
  background: rgba(219, 244, 239, 0.74);
  color: #16363a;
  font-size: 12px;
  font-weight: 900;
}

.overview-story-route {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(15, 139, 141, 0.18);
  border-radius: 18px;
  background: rgba(232, 246, 240, 0.58);
}

.overview-story-route div {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: center;
  color: #27313d;
  font-size: 12px;
  font-weight: 850;
}

.overview-story-note {
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed rgba(34, 44, 54, 0.18);
  border-radius: 18px;
  background: rgba(255,255,255,0.48);
  color: #526173;
  font-size: 12px;
  line-height: 1.55;
}

.overview-story-route i {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #0f8b8d;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  align-items: center;
  justify-content: center;
}

.overview-flow {
  padding: 16px;
}

.overview-donut-stage {
  display: grid;
  grid-template-columns: minmax(190px, 0.78fr) minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

.overview-donut {
  width: 100%;
  max-width: 250px;
  margin: 0 auto;
  overflow: visible;
}

.overview-donut-ring {
  fill: none;
  stroke: rgba(20, 28, 36, 0.08);
  stroke-width: 16;
}

.overview-donut-segment {
  fill: none;
  stroke: var(--segment-color, #0f8b8d);
  stroke-width: 16;
  stroke-linecap: round;
  opacity: 0.42;
  cursor: pointer;
  transition: opacity 220ms ease, stroke-width 220ms ease, filter 220ms ease;
}

.overview-donut-segment.is-active {
  opacity: 1;
  stroke-width: 21;
  filter: drop-shadow(0 8px 12px rgba(15, 139, 141, 0.22));
  animation: donutPulse 780ms ease;
}

@keyframes donutPulse {
  0% { stroke-dashoffset: var(--segment-offset); }
  35% { stroke-dashoffset: calc(var(--segment-offset) + 18); }
  100% { stroke-dashoffset: var(--segment-offset); }
}

.overview-donut-center {
  text-anchor: middle;
  dominant-baseline: central;
  fill: #17202a;
}

.overview-donut-center .count {
  font-size: 22px;
  font-weight: 900;
}

.overview-donut-center .label {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  fill: #667385;
}

.overview-donut-detail {
  min-height: 174px;
  padding: 14px;
  border: 1px solid rgba(34, 44, 54, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.74), rgba(245,238,225,0.76)),
    radial-gradient(circle at 100% 0%, rgba(240,138,36,0.13), transparent 34%);
}

.overview-donut-detail strong {
  display: block;
  font-size: 26px;
  line-height: 1;
}

.overview-donut-detail span {
  display: block;
  margin-top: 7px;
  color: #17202a;
  font-size: 13px;
  font-weight: 900;
}

.overview-donut-detail p {
  margin-top: 10px;
  font-size: 12px;
}

.overview-donut-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.overview-donut-actions button {
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(34, 44, 54, 0.16);
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  color: #27313d;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.overview-donut-actions button.is-active {
  border-color: rgba(15, 139, 141, 0.48);
  background: rgba(219, 244, 239, 0.92);
  color: #0b6268;
}

.overview-status {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.overview-status-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(34, 44, 54, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
}

.overview-status-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #0f8b8d;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.65);
}

.overview-status-row.warn .overview-status-icon {
  background: #f08a24;
}

.overview-status-row strong {
  display: block;
  font-size: 13px;
  line-height: 1.2;
}

.overview-status-row span {
  display: block;
  margin-top: 4px;
  color: #526173;
  font-size: 12px;
  line-height: 1.45;
}

.report-submodule {
  width: 100%;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(247, 240, 228, 0.9)),
    repeating-linear-gradient(90deg, rgba(15, 139, 141, 0.035) 0 1px, transparent 1px 18px);
}

.submodule__header {
  margin-bottom: 14px;
}

.submodule__header h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.overview-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, var(--card-glow, rgba(15,139,141,0.12)), transparent 38%),
    #fffdf8;
}

.overview-card strong {
  display: block;
  font-size: 26px;
  line-height: 1.1;
}

.overview-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.overview-card p {
  margin: 8px 0 0;
  color: #344050;
  font-size: 13px;
  line-height: 1.55;
}

.overview-card-meter {
  position: relative;
  height: 9px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(34, 44, 54, 0.08);
}

.overview-card-meter i {
  display: block;
  height: 100%;
  width: var(--meter-width, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--meter-color, #0f8b8d), rgba(240,138,36,0.86));
}

.overview-card-spark {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  align-items: end;
  height: 34px;
  margin-top: 12px;
}

.overview-card-spark i {
  display: block;
  min-height: 4px;
  border-radius: 999px 999px 3px 3px;
  background: var(--meter-color, #0f8b8d);
  opacity: 0.28;
}

.overview-card-spark i:nth-child(4),
.overview-card-spark i:nth-child(5) {
  opacity: 0.78;
}

.quant-panel {
  margin: 14px 0 16px;
  padding: 16px;
  border: 1px dashed #c8bda9;
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.78);
}

.run-bars {
  display: grid;
  gap: 10px;
}

.run-overview-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.run-overview-controls button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--ink);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.run-overview-controls button.is-active {
  border-color: rgba(15, 139, 141, 0.45);
  background: rgba(15, 139, 141, 0.12);
  color: var(--accent);
}

.run-bar {
  display: grid;
  grid-template-columns: minmax(90px, 140px) 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: #eadfce;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.analysis-block {
  display: grid;
  gap: 16px;
  margin: 16px 0;
}

.analysis-note {
  padding: 14px 16px;
  border: 1px solid rgba(15, 139, 141, 0.22);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(15, 139, 141, 0.08), rgba(240, 138, 36, 0.07));
  color: #314052;
  line-height: 1.65;
}

.search-parameter-panel {
  display: grid;
  gap: 16px;
}

.search-parameter-meta {
  padding: 14px 16px;
  border: 1px solid rgba(15, 139, 141, 0.22);
  border-radius: 20px;
  background: rgba(15, 139, 141, 0.07);
  color: #314052;
  line-height: 1.65;
}

.parameter-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.fasta-switcher {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(15, 139, 141, 0.18);
  border-radius: 18px;
  background: #f7fbf6;
}

.fasta-switcher span {
  color: #314052;
  font-size: 12px;
  font-weight: 900;
}

.fasta-switcher select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
  color: var(--ink);
  font-weight: 800;
  padding: 6px 10px;
}

.parameter-summary-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #fffdf8;
}

.parameter-summary-card strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
  color: var(--ink);
}

.parameter-summary-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.parameter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.parameter-section,
.methods-section,
.parameter-log-section {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fffdf8;
  overflow: hidden;
}

.parameter-section.has-tooltips {
  overflow: visible;
}

.parameter-section h4,
.methods-section h4,
.parameter-log-section h4 {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

.parameter-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.parameter-table th,
.parameter-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(211, 198, 176, 0.72);
  text-align: left;
  vertical-align: top;
}

.parameter-table th {
  color: #3a4c62;
  background: #f5eddd;
}

.parameter-table td:first-child {
  width: 42%;
  font-weight: 800;
  color: #233348;
}

.probe-mod-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 16px 16px;
}

.probe-mod-list span {
  position: relative;
  padding: 5px 8px;
  border: 1px solid rgba(15, 139, 141, 0.22);
  border-radius: 999px;
  background: rgba(15, 139, 141, 0.08);
  color: #1e5260;
  font-size: 12px;
  font-weight: 800;
}

.probe-mod-list span[data-tooltip],
.mod-chip[data-tooltip] {
  cursor: help;
}

.probe-mod-list span[data-tooltip]::after,
.mod-chip[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 30;
  display: none;
  width: max-content;
  max-width: min(340px, 82vw);
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(24, 32, 42, 0.96);
  color: #fffdf8;
  box-shadow: 0 16px 34px rgba(24, 32, 42, 0.22);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-line;
  text-align: left;
}

.probe-mod-list span[data-tooltip]:hover::after,
.probe-mod-list span[data-tooltip]:focus::after,
.mod-chip[data-tooltip]:hover::after,
.mod-chip[data-tooltip]:focus::after {
  display: none;
}

.floating-tooltip {
  position: fixed;
  z-index: 2600;
  display: none;
  max-width: min(360px, 82vw);
  max-height: min(260px, 70vh);
  overflow: auto;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(24, 32, 42, 0.96);
  color: #fffdf8;
  box-shadow: 0 16px 34px rgba(24, 32, 42, 0.24);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-line;
  pointer-events: none;
}

.methods-section {
  padding-bottom: 16px;
}

.method-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px 0;
}

.method-toolbar button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffaf1;
  padding: 9px 13px;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.method-toolbar button.is-active {
  border-color: rgba(15, 139, 141, 0.55);
  background: linear-gradient(135deg, rgba(15, 139, 141, 0.14), rgba(240, 138, 36, 0.12));
  color: #0b6b70;
}

.method-text {
  margin: 14px 16px 0;
  padding: 16px;
  border: 1px solid rgba(15, 139, 141, 0.18);
  border-radius: 18px;
  background: #fffaf1;
  color: #223047;
  line-height: 1.75;
}

.method-text[hidden] {
  display: none;
}

.method-editor-pane[hidden] {
  display: none;
}

.method-editor-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(320px, 1.18fr);
  gap: 12px;
  margin: 14px 16px 0;
}

.method-editor-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(216, 207, 191, 0.82);
  border-radius: 18px;
  background: #fffaf1;
}

.method-editor-block.parameter {
  border-color: rgba(15, 139, 141, 0.22);
  background: linear-gradient(180deg, rgba(15, 139, 141, 0.07), #fffaf1 56%);
}

.method-editor-block.description {
  border-color: rgba(240, 138, 36, 0.24);
  background: linear-gradient(180deg, rgba(240, 138, 36, 0.08), #fffaf1 58%);
}

.method-editor-block h5 {
  margin: 0;
  font-size: 13px;
}

.method-editor-block p {
  margin: 0;
  color: #657180;
  font-size: 12px;
  line-height: 1.45;
}

.method-editor-textarea {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  border: 1px solid #d8cfbf;
  border-radius: 14px;
  background: #fffdf8;
  color: #223047;
  padding: 12px;
  line-height: 1.65;
  font: 14px/1.65 "Aptos", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}

.method-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 16px 0;
}

.method-action-row button,
.focus-cart-actions button,
.focus-inline-button {
  border: 1px solid #cbbfae;
  border-radius: 999px;
  background: #fffaf1;
  color: #243244;
  font-weight: 900;
  cursor: pointer;
}

.method-action-row button,
.focus-cart-actions button {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
}

.method-template-note {
  margin: 8px 16px 0;
  color: #657180;
  font-size: 12px;
  font-weight: 700;
}

.method-reference-list {
  margin: 14px 16px 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.method-reference-list a {
  color: #0b6b70;
  font-weight: 900;
}

.parameter-log-section {
  overflow-x: auto;
}

.analysis-highlights,
.analysis-chart-grid,
.analysis-table-grid {
  display: grid;
  gap: 14px;
}

.analysis-highlights {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.analysis-metric,
.analysis-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fffdf8;
}

.condition-difference-card {
  overflow: hidden;
}

.condition-context-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.condition-context-grid.is-text-only {
  grid-template-columns: 1fr;
}

.bio-context-panel {
  min-width: 0;
}

.bio-context-svg {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 auto;
}

.condition-table-block {
  margin-top: 14px;
  overflow-x: auto;
}

.condition-table-block h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 14px;
}

.analysis-metric {
  padding: 16px;
}

.analysis-metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.analysis-metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1.1;
}

.analysis-metric p {
  margin: 9px 0 0;
  color: #3d4855;
  font-size: 13px;
  line-height: 1.55;
}

.analysis-chart-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.analysis-card {
  overflow: hidden;
}

.analysis-chart-grid > .analysis-card {
  display: flex;
  flex-direction: column;
  min-height: 430px;
}

.analysis-chart-grid > .analysis-card.qc-compact-card {
  min-height: auto;
}

.analysis-card--full,
.analysis-card--wide {
  grid-column: 1 / -1;
}

.analysis-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  padding: 12px 16px 0;
}

.analysis-mini-grid span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(15, 139, 141, 0.06);
}

.analysis-mini-grid strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.mscohort-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 14px 16px 4px;
}

.mscohort-metric {
  border: 1px solid rgba(15, 139, 141, 0.2);
  border-radius: 18px;
  background: #eef8f4;
  padding: 12px;
}

.mscohort-metric span {
  display: block;
  color: #4c6170;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.mscohort-metric strong {
  display: block;
  margin-top: 6px;
  color: #13202b;
  font-size: 22px;
  line-height: 1.1;
}

.mscohort-metric p {
  margin: 7px 0 0;
  font-size: 12px;
}

.mscohort-subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 16px 16px;
}

.mscohort-subgrid .analysis-card {
  background: #fffdf8;
}

.mscohort-column-note {
  margin: 0 16px 16px;
  color: #536170;
  font-size: 12px;
  line-height: 1.6;
}

.analysis-card h3 {
  margin: 0;
  padding: 15px 16px 0;
  font-size: 18px;
  line-height: 1.22;
  font-weight: 900;
}

.analysis-card p {
  margin: 6px 16px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.analysis-card-head {
  display: flex;
  gap: 14px;
  align-items: start;
  justify-content: space-between;
  padding: 15px 16px 0;
}

.analysis-card-head h3 {
  padding: 0;
}

.analysis-card-head p {
  margin-left: 0;
  margin-right: 0;
}

.analysis-view-control {
  min-width: 150px;
}

.analysis-view-control span,
.analysis-check span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.analysis-view-control select,
.analysis-view-control input {
  width: 100%;
  min-height: 38px;
}

.abundance-rank-card {
  grid-column: 1 / -1;
}

.abundance-rank-card .analysis-card-head {
  flex-direction: column;
  align-items: stretch;
}

.abundance-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.abundance-control-grid .full-row {
  grid-column: 1 / -1;
}

.abundance-control-grid .button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analysis-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.72);
}

.analysis-check span {
  margin: 0;
}

.abundance-rank-svg .abundance-label text {
  paint-order: stroke;
  stroke: #fffdf8;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.abundance-rank-svg .abundance-point,
.abundance-rank-svg .abundance-label {
  cursor: pointer;
}

.abundance-rank-svg .abundance-label-delete {
  cursor: pointer;
  user-select: none;
}

.abundance-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 0 16px 16px;
}

.abundance-detail,
.abundance-boxplot {
  border: 1px solid rgba(216, 207, 191, 0.78);
  border-radius: 18px;
  background: #fffaf1;
  min-height: 250px;
}

.abundance-detail {
  padding: 14px;
}

.abundance-detail h4 {
  margin: 0;
  font-size: 20px;
}

.abundance-detail p {
  margin: 6px 0 12px;
}

.abundance-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.abundance-detail-list div {
  padding: 8px;
  border-radius: 12px;
  background: rgba(15, 139, 141, 0.07);
}

.abundance-detail-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.abundance-detail-list dd {
  margin: 4px 0 0;
  font-weight: 800;
  word-break: break-word;
}

.selection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.selection-row .mini {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.selection-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.selection-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(15, 139, 141, 0.34);
  border-radius: 999px;
  background: rgba(15, 139, 141, 0.1);
  color: #174d52;
  font-weight: 900;
}

.selection-chip span {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(24, 32, 42, 0.12);
}

.focus-inline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  margin: 0 8px 4px 0;
  font-size: 11px;
  color: #0b6b70;
  background: #eef7f4;
  border-color: #b9d5ce;
}

.focus-inline-button.is-active {
  color: #fffdf8;
  background: #0f8b8d;
  border-color: #0f8b8d;
}

.entity-cell {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.entity-cell__text {
  min-width: 0;
}

.focus-cart-panel {
  margin: 0 16px 14px;
  padding: 14px;
  border: 1px solid rgba(15, 139, 141, 0.2);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15, 139, 141, 0.09), rgba(240, 138, 36, 0.06));
}

.focus-cart-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.focus-cart-head h4 {
  margin: 0;
  font-size: 16px;
}

.focus-cart-head p {
  margin: 4px 0 0;
  color: #536170;
  font-size: 12px;
}

.focus-cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.focus-cart-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.focus-cart-group {
  min-width: 0;
}

.focus-cart-group strong {
  display: block;
  margin-bottom: 8px;
  color: #263548;
}

.focus-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  margin: 0 6px 6px 0;
  padding: 7px 10px;
  border: 1px solid rgba(15, 139, 141, 0.28);
  border-radius: 999px;
  background: #fffdf8;
  color: #174d52;
  font-size: 12px;
  font-weight: 900;
}

.focus-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus-chip button {
  border: 0;
  border-radius: 999px;
  background: rgba(24, 32, 42, 0.12);
  cursor: pointer;
  width: 18px;
  height: 18px;
  line-height: 18px;
  padding: 0;
  font-weight: 900;
}

.abundance-boxplot {
  padding: 10px 14px 12px;
  overflow-x: hidden;
  overflow-y: hidden;
}

.chart-scroll {
  overflow-x: auto;
  padding: 8px 12px 14px;
}

.analysis-chart-grid > .analysis-card > .chart-scroll {
  flex: 1;
  display: flex;
  align-items: stretch;
  min-height: 330px;
}

.chart-scroll.fit-chart {
  overflow-x: hidden;
}

.analysis-svg {
  display: block;
  width: 100%;
  min-height: 210px;
  color: var(--ink);
}

.analysis-chart-grid > .analysis-card > .chart-scroll > .analysis-svg {
  height: 100%;
  min-height: 330px;
}

.abundance-boxplot-svg {
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  height: auto;
}

.wide-protein-run-chart {
  width: 100%;
  min-width: 100%;
}

.wide-protein-run-chart .abundance-boxplot-svg {
  width: 100%;
  max-width: 100%;
}

.run-list-details {
  max-width: 280px;
}

.run-list-details summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
  list-style-position: outside;
}

.run-list-details summary span {
  color: var(--muted);
  font-weight: 700;
}

.run-list-full {
  margin-top: 6px;
  max-height: 120px;
  overflow: auto;
  white-space: normal;
  word-break: break-word;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.analysis-svg text {
  font-family: "Segoe UI Variable Display", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.chart-hover-target {
  cursor: crosshair;
  transition: opacity 0.14s ease, filter 0.14s ease, stroke-width 0.14s ease;
}

.chart-hover-target:hover,
.chart-hover-target:focus,
.chart-hover-target.is-active {
  outline: none;
  filter: drop-shadow(0 5px 10px rgba(24, 32, 42, 0.18));
}

.chart-hover-target:hover rect,
.chart-hover-target:focus rect,
.chart-hover-target.is-active rect,
.chart-hover-target:hover circle,
.chart-hover-target:focus circle,
.chart-hover-target.is-active circle,
.chart-hover-target:hover line,
.chart-hover-target:focus line,
.chart-hover-target.is-active line {
  opacity: 1;
  stroke: #18202a;
  stroke-width: 1.8px;
}

rect.chart-hover-target:hover,
rect.chart-hover-target:focus,
rect.chart-hover-target.is-active,
circle.chart-hover-target:hover,
circle.chart-hover-target:focus,
circle.chart-hover-target.is-active,
line.chart-hover-target:hover,
line.chart-hover-target:focus,
line.chart-hover-target.is-active {
  opacity: 1;
  stroke: #18202a;
  stroke-width: 1.8px;
}

.chart-tooltip {
  position: fixed;
  z-index: 240;
  display: none;
  max-width: 320px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(24, 32, 42, 0.94);
  color: #fffaf0;
  box-shadow: 0 16px 36px rgba(24, 32, 42, 0.22);
  font-size: 12px;
  line-height: 1.45;
  pointer-events: none;
  white-space: pre-line;
}

.analysis-table-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analysis-table-card {
  padding: 0;
  max-height: 420px;
  overflow: auto;
}

.analysis-table-card h3 {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fffdf8;
  font-size: 16px;
}

.analysis-table-card-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 320px);
  gap: 12px;
  align-items: end;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fffdf8;
}

.analysis-table-card-head h3 {
  position: static;
  padding: 0;
  border-bottom: 0;
  background: transparent;
}

.table-view-control {
  min-width: 220px;
}

.analysis-table-card.has-table-controls .analysis-table th {
  top: 84px;
}

.analysis-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: 12px;
  table-layout: fixed;
}

.analysis-table th,
.analysis-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #efe5d6;
  text-align: left;
  vertical-align: top;
  max-width: 280px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.analysis-table th {
  position: sticky;
  top: 48px;
  z-index: 1;
  background: #f7efe1;
  color: #344050;
  font-weight: 900;
}

.table-cell-wrap,
.cell-expander,
.cell-expander__full {
  max-width: min(34ch, 300px);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cell-expander summary {
  cursor: pointer;
  color: #1f2a36;
  font-weight: 800;
  list-style-position: outside;
}

.cell-expander__full {
  margin-top: 6px;
  max-height: 160px;
  overflow: auto;
  color: #1f2a36;
  font-weight: 500;
}

.analysis-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(15, 139, 141, 0.12);
  color: #0c686a;
  font-size: 12px;
  font-weight: 900;
}

.analysis-status.warn {
  background: rgba(167, 67, 47, 0.12);
  color: #8a3427;
}

.qc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.qc-compact-card .analysis-table-card-head {
  padding: 10px 14px;
  grid-template-columns: 1fr;
}

.qc-compact-card .analysis-table-card-head h3 {
  font-size: 16px;
}

.qc-compact-card .analysis-table-card-head p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
}

.qc-compact-card.single-qc-card .qc-grid {
  grid-template-columns: minmax(260px, 520px);
  padding: 12px 14px 14px;
}

.qc-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fffdf8;
}

.quality-card {
  padding: 18px;
  min-height: 132px;
}

.qc-compact-card .quality-card {
  padding: 12px 14px;
  min-height: 0;
}

.quality-card.with-chart {
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(300px, 1fr);
  gap: 8px 16px;
  align-items: start;
}

.quality-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.quality-card strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.1;
}

.qc-compact-card .quality-card strong {
  margin-top: 6px;
  font-size: 22px;
}

.quality-card p {
  margin: 10px 0 0;
  color: #35404c;
  font-size: 13px;
  line-height: 1.55;
}

.qc-compact-card .quality-card p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.quality-card.with-chart span,
.quality-card.with-chart strong,
.quality-card.with-chart p {
  grid-column: 1;
}

.quality-chart {
  grid-column: 2;
  grid-row: 1 / span 3;
  min-width: 0;
  border: 1px solid #efe5d6;
  border-radius: 16px;
  background: #fffdf8;
  overflow: hidden;
}

.quality-chart svg {
  display: block;
  width: 100%;
  min-height: 118px;
}

.qc-card img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: white;
  border-bottom: 1px solid #eee5d6;
}

.qc-card figcaption {
  padding: 12px 14px 14px;
  color: #35404c;
  font-size: 13px;
  line-height: 1.5;
}

.source-table-wrap {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.source-table-wrap details {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdf8;
  overflow: hidden;
}

.source-table-wrap summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 900;
}

.source-table-wrap .peptide-table-wrap {
  margin-top: 0;
  border: 0;
  border-radius: 0;
}

.panel {
  border-radius: 28px;
  padding: 28px;
}

.panel__header {
  margin-bottom: 16px;
}

.split {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.meta-line {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.field {
  display: grid;
  gap: 7px;
  color: #44505e;
  font-size: 13px;
  font-weight: 700;
}

input, select, button {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf7;
  color: var(--ink);
  font: inherit;
}

input, select {
  min-height: 42px;
  padding: 8px 12px;
}

button {
  min-height: 42px;
  padding: 9px 14px;
  background: #17202b;
  color: white;
  border-color: #17202b;
  cursor: pointer;
  font-weight: 800;
}

button.secondary {
  background: #fffdf7;
  color: var(--ink);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.protein-list {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdf8;
  overflow: hidden;
}

.protein-view-field {
  margin-top: 12px;
}

.protein-table {
  min-width: 1900px;
}

.protein-row {
  cursor: pointer;
}

.protein-row:hover,
.protein-row.active {
  background: rgba(15, 139, 141, 0.11);
}

.protein-row small {
  color: var(--muted);
  line-height: 1.4;
}

.coverage-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 12px;
}

.coverage-panel .panel__header .coverage-legend {
  display: none;
}

.legend-chip {
  display: inline-block;
  width: 14px;
  height: 10px;
  margin-right: 5px;
  border-radius: 999px;
  vertical-align: -1px;
}

.legend-chip.covered { background: rgba(15, 139, 141, 0.24); }
.legend-chip.selected { background: rgba(240, 138, 36, 0.72); }
.legend-chip.unmapped { background: #ddd2c1; }

.coverage-status-legend,
.coverage-mod-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-bottom: 10px;
  color: #18202a;
  font-size: 12px;
}

.coverage-status-legend {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(216, 207, 191, 0.78);
}

.coverage-legend-item,
.mod-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.coverage-swatch,
.mod-swatch {
  display: inline-block;
  width: 28px;
  height: 12px;
  border: 1px solid #18202a;
  box-sizing: border-box;
}

.coverage-swatch.identified { background: #4d762e; }
.coverage-swatch.not-identified { background: #f8f4ea; }
.coverage-swatch.selected { background: #f08a24; }
.coverage-swatch.ambiguous {
  background:
    repeating-linear-gradient(135deg, #f8f4ea 0 3px, #18202a 3px 4px, #f8f4ea 4px 7px);
}

.mod-chip {
  color: #364356;
  font-size: 11px;
}

.mod-swatch {
  width: 12px;
  height: 12px;
}

.coverage-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.coverage-pill {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(15, 139, 141, 0.09);
  color: #255459;
  font-size: 12px;
  font-weight: 800;
}

.protein-background-panel {
  margin: 0 0 14px;
}

.protein-background-card {
  border: 1px solid rgba(216, 207, 191, 0.78);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(236, 246, 236, 0.78));
  padding: 14px;
}

.protein-background-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.protein-background-head h3 {
  margin: 2px 0 4px;
  font-size: clamp(18px, 2vw, 24px);
}

.protein-background-link {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid rgba(15, 139, 141, 0.34);
  border-radius: 999px;
  color: #0f5f63;
  background: rgba(223, 243, 238, 0.78);
  text-decoration: none;
  font-weight: 900;
}

.protein-background-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.protein-background-grid div {
  min-width: 0;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(216, 207, 191, 0.52);
}

.protein-background-grid span {
  display: block;
  margin-bottom: 4px;
  color: #5c6878;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.protein-background-grid strong {
  display: block;
  overflow-wrap: anywhere;
}

.protein-background-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.protein-background-notes p {
  max-height: 132px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border-radius: 14px;
  color: #364356;
  background: rgba(255, 255, 255, 0.62);
  border: 1px dashed rgba(15, 139, 141, 0.24);
}

.protein-background-notes strong {
  display: block;
  margin-bottom: 4px;
  color: #12302f;
}

.coverage-controls {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(260px, 360px) minmax(180px, 220px) 1fr;
  gap: 12px;
  align-items: end;
  margin: 0 0 14px;
}

.coverage-top-controls {
  grid-template-columns: minmax(180px, 260px) minmax(280px, 420px) minmax(180px, 240px) 1fr;
  margin-top: 4px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(216, 207, 191, 0.72);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.64);
}

.coverage-controls .field {
  margin: 0;
}

.coverage-layout-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  padding-bottom: 10px;
}

.multi-select-dropdown {
  position: relative;
}

.multi-select-dropdown summary {
  min-height: 46px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.multi-select-dropdown summary::-webkit-details-marker {
  display: none;
}

.multi-select-dropdown summary::after {
  content: "⌄";
  float: right;
  color: var(--muted);
}

.multi-select-options {
  position: absolute;
  z-index: 25;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: var(--shadow);
}

.multi-select-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.multi-select-option:hover {
  background: rgba(15, 139, 141, 0.08);
}

.multi-select-option input {
  width: auto;
  min-height: auto;
}

.coverage-comparison-map {
  margin: 0 0 14px;
  padding: 12px 14px 16px;
  border: 1px solid rgba(15, 139, 141, 0.22);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(15, 139, 141, 0.045), #fffdf8 68%);
}

.coverage-comparison-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.coverage-comparison-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.coverage-comparison-scroll {
  max-height: 360px;
  overflow: auto;
  border: 1px solid rgba(216, 207, 191, 0.72);
  border-radius: 14px;
  background: #fffdf8;
}

.coverage-comparison-scroll svg {
  display: block;
}

.coverage-compare-peptide-bar.is-row-max {
  filter: drop-shadow(0 1px 2px rgba(24, 32, 42, 0.24));
}

.protein-coverage-map {
  margin-bottom: 14px;
  padding: 12px 14px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fffdf8;
  overflow: visible;
}

.coverage-scroll-frame {
  max-height: 400px;
  overflow: auto;
  border: 1px solid rgba(216, 207, 191, 0.72);
  border-radius: 14px;
  background: #fffdf8;
}

.coverage-scroll-frame svg {
  display: block;
  min-width: 1080px;
}

.coverage-map-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.sequence-wrap {
  max-height: 440px;
  overflow: auto;
  padding: 16px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.sequence-wrap:empty {
  display: none;
}

.seq-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 6px;
}

.seq-pos {
  color: var(--muted);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 24px;
  text-align: right;
}

.seq-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
}

.aa {
  width: 18px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 5px;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  transition: background 0.12s, color 0.12s, transform 0.12s;
}

.aa.covered { background: rgba(15, 139, 141, 0.16); }
.aa.hovered { background: rgba(15, 139, 141, 0.35); }
.aa.selected {
  background: var(--accent-2);
  color: #2b1704;
  font-weight: 800;
  transform: translateY(-1px);
}

.aa.modified {
  box-shadow: inset 0 -3px 0 #a7432f;
}

.peptide-table-wrap {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdf8;
  overflow: hidden;
}

.peptide-filter {
  margin-top: 16px;
}

.peptide-table {
  min-width: 1780px;
}

.column-chooser {
  padding: 10px 12px;
  border-bottom: 1px solid #eee5d6;
  background: #fffdf8;
}

.column-chooser summary {
  cursor: pointer;
  color: #344050;
  font-size: 12px;
  font-weight: 900;
}

.column-toggle-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  max-height: min(320px, 42vh);
  overflow: auto;
  padding-right: 4px;
}

.column-toggle {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid #ded4c2;
  border-radius: 999px;
  background: #fffaf1;
  color: #344050;
  font-size: 12px;
  font-weight: 800;
}

.column-toggle.locked {
  opacity: 0.78;
}

.column-action-row,
.column-category-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.column-action-button {
  min-height: 30px;
  border: 1px solid #cbbfae;
  border-radius: 999px;
  background: #f7efe1;
  color: #243244;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  padding: 5px 12px;
}

.column-action-button.category {
  background: #eef7f4;
  border-color: #b9d5ce;
  color: #0f5f64;
}

.column-action-button.clear {
  background: #fff8f2;
  border-color: #e3c9ab;
  color: #8a4a1d;
}

.column-action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(32, 45, 58, 0.08);
}

.column-habit-note {
  margin-top: 8px;
  color: #657180;
  font-size: 11px;
  font-weight: 700;
}

.table-pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #eee5d6;
  background: #f7efe1;
  color: #536170;
  font-size: 12px;
  font-weight: 800;
}

.table-scroll {
  max-height: 320px;
  overflow: auto;
}

.protein-list .table-scroll {
  max-height: 300px;
}

.peptide-table-wrap .table-scroll {
  max-height: 320px;
}

.library-table-wrap .table-scroll {
  max-height: 460px;
}

.pagination-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.page-button,
.page-size-select {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 10px;
  font-size: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee5d6;
  text-align: left;
  max-width: 320px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

th {
  position: sticky;
  top: 0;
  background: #fff8ea;
  z-index: 1;
}

.column-title-row th {
  top: 0;
  vertical-align: bottom;
}

.column-filter-row th {
  top: 42px;
  padding: 7px 8px;
  background: #f6fbfc;
  z-index: 2;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.sort-indicator {
  color: var(--accent);
  font-size: 11px;
}

.filter-stack {
  display: grid;
  grid-template-columns: minmax(90px, 0.95fr) minmax(88px, 1fr) auto;
  gap: 5px;
  align-items: center;
  min-width: 210px;
}

.filter-stack input,
.filter-stack select {
  min-height: 30px;
  padding: 4px 7px;
  border-radius: 9px;
  font-size: 12px;
}

.filter-stack input.filter-value2 {
  grid-column: 2 / 3;
}

.filter-clear {
  min-height: 30px;
  width: 30px;
  padding: 0;
  border-radius: 9px;
  background: #fffdf8;
  color: var(--muted);
  border-color: var(--line);
}

.table-status {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #eee5d6;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(90deg, rgba(15,139,141,.08), rgba(240,138,36,.08));
}

tr.peptide-row {
  cursor: pointer;
}

tr.peptide-row:hover, tr.peptide-row.active {
  background: rgba(15, 139, 141, 0.11);
}

.library-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.library-summary-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdf8;
}

.library-summary-card strong {
  display: block;
  font-size: 23px;
  line-height: 1.1;
}

.library-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.library-filter {
  margin: 0 0 12px;
}

.library-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.library-table-wrap {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdf8;
  overflow: hidden;
}

.library-table {
  min-width: 1760px;
}

tr.library-row {
  cursor: pointer;
}

tr.library-row:hover,
tr.library-row.active {
  background: rgba(240, 138, 36, 0.13);
}

.library-detail {
  min-height: 460px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fffdf8;
}

.library-detail h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

#librarySvg {
  display: block;
  width: 100%;
  height: 420px;
  margin-top: 12px;
  border: 1px solid rgba(216, 207, 191, 0.78);
  border-radius: 16px;
  background: #fffdf8;
}

.spectrum-toolbar {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) repeat(4, minmax(130px, auto));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

[hidden] {
  display: none !important;
}

.spectrum-workbench {
  display: grid;
  grid-template-columns: minmax(250px, 286px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  overflow-x: visible;
  padding-bottom: 4px;
}

.spectrum-side-controls {
  position: sticky;
  top: 12px;
  align-self: start;
  height: auto;
  max-height: min(var(--spectrum-control-height, 860px), calc(100dvh - 118px));
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px;
  border: 1px solid rgba(216, 207, 191, 0.9);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(248, 243, 233, 0.94)),
    repeating-linear-gradient(90deg, rgba(15, 139, 141, 0.05) 0 1px, transparent 1px 18px);
  box-shadow: 0 14px 34px rgba(45, 38, 25, 0.08);
}

.spectrum-side-controls .spectrum-toolbar {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.spectrum-side-controls .spectrum-toolbar .field,
.spectrum-side-controls .spectrum-toolbar button:first-of-type {
  grid-column: 1 / -1;
}

.spectrum-side-controls .spectrum-toolbar button {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 13px;
  font-size: 12px;
}

.spectrum-visual-stack {
  min-width: 0;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
  margin-bottom: 12px;
}

.style-grid label {
  display: grid;
  gap: 6px;
  padding: 9px;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.source-toggle-card,
.spectrum-y-axis-field,
.style-grid label.check {
  grid-column: 1 / -1;
}

.source-toggle-card {
  display: grid;
  gap: 7px;
  padding: 9px;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.95), rgba(239, 232, 220, 0.68)),
    repeating-linear-gradient(90deg, rgba(15, 139, 141, 0.04) 0 1px, transparent 1px 14px);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.source-toggle-card > span {
  color: #44505e;
  font-weight: 900;
}

.source-toggle-card .check {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #283442;
}

.style-grid .check {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.style-grid input[type="color"] {
  width: 48px;
  height: 40px;
  min-height: 40px;
  padding: 3px;
}

.style-grid select,
.style-grid input[type="range"] {
  width: 100%;
  min-width: 0;
}

.style-grid input[type="checkbox"] {
  min-height: auto;
}

.spectrum-source-legend {
  margin: 0 0 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #536170;
  font-size: 12px;
  font-weight: 800;
}

.spectrum-source-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.spectrum-source-legend i {
  width: 18px;
  height: 0;
  border-top: 3px solid currentColor;
}

.annotation-options {
  margin: 0 0 12px;
  padding: 11px 12px;
  border: 1px solid rgba(216, 207, 191, 0.86);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.78);
}

.annotation-options summary {
  cursor: pointer;
  color: #18202a;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.annotation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

.annotation-grid .field,
.annotation-grid .check {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid rgba(216, 207, 191, 0.84);
  border-radius: 14px;
  background: #fffdf8;
  color: #44505e;
  font-size: 12px;
  font-weight: 800;
}

.annotation-grid input[type="number"],
.annotation-grid select {
  min-height: 38px;
  width: 100%;
}

.annotation-checks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

.annotation-checks fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 11px;
  margin: 0;
  padding: 9px 10px 11px;
  border: 1px solid rgba(216, 207, 191, 0.84);
  border-radius: 14px;
  background: #fffdf8;
}

.annotation-checks legend {
  padding: 0 6px;
  color: #44505e;
  font-size: 12px;
  font-weight: 900;
}

.annotation-checks label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #18202a;
  font-size: 12px;
  font-weight: 700;
}

.annotation-checks input[type="checkbox"] {
  min-height: auto;
}

.raw-chrom-label {
  cursor: grab;
  user-select: none;
}

.raw-chrom-auto-label {
  cursor: grab;
  user-select: none;
}

.raw-chrom-label.is-dragging {
  cursor: grabbing;
}

.raw-chrom-auto-label.is-dragging {
  cursor: grabbing;
}

.raw-chrom-label-delete {
  cursor: pointer;
}

.zoom-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  align-items: end;
  margin: 0;
}

.zoom-hint {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.spectrum-canvas {
  position: relative;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(#fffdf8, #fffdf8) padding-box,
    repeating-linear-gradient(90deg, rgba(24, 32, 42, 0.04) 0 1px, transparent 1px 80px);
  overflow: auto;
}

#spectrumSvg {
  display: block;
  width: 100%;
  min-height: 0;
  height: auto;
}

.tooltip {
  position: fixed;
  pointer-events: none;
  display: none;
  max-width: min(320px, 82vw);
  max-height: min(260px, 70vh);
  overflow: auto;
  padding: 9px 11px;
  background: rgba(24, 32, 42, 0.94);
  color: white;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.45;
  z-index: 2000;
}

button.action-confirmed {
  background: #0f8b8d;
  border-color: #0f8b8d;
  color: #fff;
}

.peak-label-group {
  cursor: grab;
}

.peak-label-group:active {
  cursor: grabbing;
}

.peak-label {
  paint-order: stroke;
  stroke: #fffdf8;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.mode-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(167, 67, 47, 0.1);
  color: #7b2f22;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.xic-card {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fffdf8;
}

.xic-canvas {
  position: relative;
  overflow: auto;
}

.figure-queue-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12px;
  box-shadow: 0 8px 20px rgba(24, 32, 42, 0.12);
}

.xic-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.xic-head h3 {
  margin: 2px 0 0;
  font-size: 20px;
}

.xic-controls {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.field.compact,
.check.compact {
  min-width: 160px;
}

.check.compact {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf0;
  color: #44505e;
  font-size: 13px;
  font-weight: 800;
}

.check.compact input {
  min-height: auto;
}

#xicSvg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 240px;
  border: 1px solid rgba(216, 207, 191, 0.78);
  border-radius: 18px;
  background: #fffdf8;
}

.raw-chrom-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}

.raw-chrom-controls button {
  min-height: 44px;
}

.raw-chrom-canvas {
  position: relative;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fffdf8;
  overflow: auto;
}

#rawChromSvg,
#timsImSvg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 260px;
}

.queue-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed #c5bba9;
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.72);
}

.queue-head, .queue-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.spectrum-workbench.is-xic-only,
.spectrum-workbench.is-queue-only {
  grid-template-columns: minmax(0, 1fr);
}

.queue-head > div {
  min-width: 0;
}

.queue-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.queue-head > span {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 139, 141, 0.1);
  color: #075f61;
  font-size: 12px;
  font-weight: 900;
}

.queue-actions {
  margin-top: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.format-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 0;
  padding: 0;
  margin: 0;
}

.export-queue {
  max-height: 220px;
  overflow: auto;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
}

.export-queue li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 10px;
  border-top: 1px solid rgba(197, 187, 169, 0.56);
}

.export-queue li:first-child {
  border-top: 0;
}

.export-queue .queue-empty {
  display: block;
  color: var(--muted);
}

.queue-remove {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.queue-status {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.footer-notes {
  width: var(--report-width);
  margin: 0 auto 38px;
  line-height: 1.8;
  color: #35404c;
}

@media (max-width: 920px) {
  .report-top-nav {
    width: var(--report-width);
    align-items: center;
    border-radius: 18px;
  }
  .report-top-nav__title {
    padding-top: 8px;
  }
  .hero, .workspace {
    grid-template-columns: 1fr;
  }
  .overview-narrative {
    grid-template-columns: 1fr;
  }
  .overview-donut-stage {
    grid-template-columns: 1fr;
  }
  .qc-grid, .analysis-chart-grid, .parameter-grid, .mscohort-subgrid, .condition-context-grid {
    grid-template-columns: 1fr;
  }
  .protein-background-head,
  .protein-background-notes {
    grid-template-columns: 1fr;
  }
  .protein-background-head {
    flex-direction: column;
  }
  .protein-background-grid {
    grid-template-columns: 1fr;
  }
  .analysis-table-grid {
    grid-template-columns: 1fr;
  }
  .abundance-control-grid,
  .abundance-detail-grid,
  .focus-cart-groups,
  .method-editor-grid {
    grid-template-columns: 1fr;
  }
  .quality-card.with-chart {
    grid-template-columns: 1fr;
  }
  .quality-card.with-chart span,
  .quality-card.with-chart strong,
  .quality-card.with-chart p,
  .quality-chart {
    grid-column: 1;
    grid-row: auto;
  }
  .table-pagination {
    align-items: flex-start;
    flex-direction: column;
  }
  .spectrum-toolbar, .style-grid {
    grid-template-columns: 1fr;
  }
  .zoom-grid {
    grid-template-columns: 1fr;
  }
  .xic-head {
    display: grid;
  }
  .xic-controls {
    justify-content: flex-start;
  }
  .raw-chrom-controls {
    grid-template-columns: 1fr 1fr;
  }
  .coverage-controls {
    grid-template-columns: 1fr;
  }
  .library-grid {
    grid-template-columns: 1fr;
  }
  .spectrum-workbench {
    grid-template-columns: minmax(210px, 236px) minmax(0, 1fr);
    gap: 12px;
  }
  .spectrum-side-controls {
    padding: 10px;
    border-radius: 18px;
  }
  .spectrum-side-controls .spectrum-toolbar,
  .style-grid {
    grid-template-columns: 1fr;
  }
  .hero__stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .spectrum-workbench {
    grid-template-columns: 1fr;
  }
  .spectrum-side-controls {
    position: relative;
    top: 0;
    max-height: none;
  }
  .raw-chrom-controls {
    grid-template-columns: 1fr;
  }
}
