body.network-page {
  min-width: 1200px;
  background: #ffffff;
}

.network-page .site-wrap {
  width: 1200px;
}

.network-title-block {
  margin-bottom: 16px;
}

.network-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(200px, 0.55fr) minmax(0, 1.72fr);
  gap: 12px;
  margin-bottom: 12px;
  align-items: stretch;
}

.network-grid>.panel {
  min-width: 0;
}

.network-input-body {
  display: flex;
  flex-direction: column;
}

.network-textarea {
  min-height: 400px;
  font-size: 14px;
}

.network-input-toolbar {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sample-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.sample-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-mid);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 140ms ease;
}

.sample-chip:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
  background: #eff6ff;
}

.btn {
  gap: 6px;
}

.btn-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sample-chip .btn-icon {
  width: 12px;
  height: 12px;
  opacity: 0.9;
}

.network-options {
  margin-top: 0;
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.network-viz-controls {
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.range-group {
  margin-bottom: 0;
}

.range-row {
  display: grid;
  grid-template-columns: 1fr 56px;
  gap: 8px;
  align-items: center;
}

.range-input {
  width: 100%;
  accent-color: #2563eb;
}

.range-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink-mid);
  font-size: 11px;
  font-weight: 600;
}

.network-input-meta {
  margin: 0;
}

.network-clear-btn {
  min-height: 28px;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  flex-shrink: 0;
}

.network-summary-panel {
  margin-top: 12px;
}

.network-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.metric-label {
  margin: 0;
  font-size: 12px;
  color: var(--ink-muted);
}

.metric-value {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-main);
}

.strongest-box {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 10px;
}

.strongest-label {
  margin: 0;
  font-size: 12px;
  color: var(--ink-muted);
}

.strongest-value {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.strongest-meta {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--ink-faint);
}

.network-keyword-block {
  margin-top: 12px;
}

.keyword-title {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--ink-mid);
  font-weight: 600;
}

.keyword-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.keyword-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
}

.network-guide {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #ffffff;
}

.guide-title {
  margin: 0;
  font-size: 12px;
  color: var(--ink-main);
  font-weight: 700;
}

.guide-text {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-mid);
}

.network-graph-panel .panel-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
}

.network-graph-ad-wrap {
  display: flex;
  justify-content: stretch;
}

.network-graph-ad {
  width: 100%;
  min-height: 90px;
}

.network-graph-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.network-graph-actions .btn-primary {
  width: 100%;
}

.network-save-row {
  display: flex;
  justify-content: stretch;
}

.network-usage-tip {
  margin: -2px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.network-lead {
  margin: 0;
  color: var(--ink-mid);
  font-size: 13px;
  line-height: 1.6;
}

.network-viz-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 10px;
}

.network-viz-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.network-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
}

.network-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  color: var(--ink-mid);
  background: #f8fafc;
}

.network-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.btn-save-network {
  width: 100%;
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.network-canvas-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #ffffff;
}

.network-canvas {
  width: 100%;
  min-height: 260px;
  display: block;
  cursor: grab;
}

.network-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -120%);
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  font-size: 11px;
  pointer-events: none;
  white-space: nowrap;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.network-table-panel {
  margin-top: 12px;
}

.network-table-panel .panel-body {
  padding-top: 12px;
}

.table-head {
  margin-bottom: 8px;
}

.table-note {
  margin: 0;
  font-size: 11px;
  color: var(--ink-muted);
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: auto;
}

.network-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.network-table th,
.network-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
  font-size: 12px;
  text-align: center;
}

.network-table thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: var(--ink-mid);
  font-weight: 600;
  z-index: 1;
}

.network-table tr:last-child td {
  border-bottom: 0;
}

.network-table td.pair-cell {
  text-align: left;
  color: var(--ink-main);
  font-weight: 600;
}

.network-table td.weight-cell {
  color: #2563eb;
  font-weight: 700;
}

.empty-box {
  padding: 28px 16px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 13px;
}

@media (max-width: 1199px) {
  body.network-page {
    min-width: 0;
  }

  .network-page .site-wrap {
    width: 100%;
    min-width: 0;
  }

  .network-grid {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.55fr);
  }

  .network-graph-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  body.network-page {
    min-width: 0;
  }

  .network-page .site-wrap {
    width: 100%;
    min-width: 0;
    padding: 0 10px 20px;
  }

  .network-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .network-textarea {
    min-height: 320px;
  }

  .network-input-toolbar {
    flex-wrap: wrap;
    align-items: flex-start;
  }

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