.merged-plot-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.plot-header-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px 14px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.plot-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.plot-header-main {
  min-width: 0;
}

.plot-header-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.02em;
  background: linear-gradient(130deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.plot-header-subtitle {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background-color var(--transition-fast),
    color var(--transition-fast);
}

.header-icon-btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.header-icon-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.header-icon-btn i {
  width: 18px;
  height: 18px;
  stroke-width: 2.2px;
}

.mobile-sidebar-toggle {
  display: none;
}

.theme-toggle-btn {
  color: var(--accent);
  background: color-mix(in srgb, var(--card) 86%, var(--accent-weak) 14%);
}

.export-plot-btn {
  color: var(--accent);
  background: color-mix(in srgb, var(--card) 88%, var(--accent-weak) 12%);
}

.theme-toggle-btn .theme-icon-light {
  display: none;
}

[data-theme="dark"] .theme-toggle-btn .theme-icon-dark {
  display: none;
}

[data-theme="dark"] .theme-toggle-btn .theme-icon-light {
  display: inline-flex;
}

.plot-brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 66px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.plot-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border) 68%);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--card) 88%, var(--accent-weak) 12%),
    color-mix(in srgb, var(--card) 72%, var(--accent-weak) 28%)
  );
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.plot-search-trigger:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 46%, var(--border) 54%);
}

.plot-search-trigger i {
  width: 16px;
  height: 16px;
  stroke-width: 2.4px;
}

.plot-brand-logo {
  display: block;
  width: auto;
  height: 66px;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

.logo-fallback {
  width: 100%;
  min-height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.panel-card {
  background: linear-gradient(
    180deg,
    var(--card) 0%,
    color-mix(in srgb, var(--card) 78%, var(--panel) 22%) 100%
  );
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 12px;
  transition: box-shadow var(--transition-fast);
}

.panel-card:hover {
  box-shadow: var(--shadow-lg);
}

.panel-heading {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
  border-radius: 1px;
}

.card-divider {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 18px 0;
}

.accordion-card {
  padding: 0;
  overflow: hidden;
}

.accordion-section {
  border-bottom: 1px solid var(--border);
}

.accordion-section:last-child {
  border-bottom: none;
}

.accordion-section > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.accordion-section > summary::after {
  content: "›";
  float: right;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  display: inline-block;
  transform: rotate(0deg);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.accordion-section[open] > summary::after {
  transform: rotate(90deg);
  color: var(--accent);
  content: "›";
}

.accordion-body {
  padding: 0 14px 14px 14px;
}

.helper-copy {
  margin: 2px 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.icon-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-label i {
  width: 16px;
  height: 16px;
  stroke-width: 2px;
}

.sidebar .panel-card {
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.sidebar .panel-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.sidebar-credits {
  margin: 14px 6px 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  letter-spacing: 0.02em;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}

.sidebar-credits-sep {
  margin: 0 4px;
}
