.network-visual {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d2e7f1;
  border-radius: 14px 64px 14px 14px;
  background: #eaf5fc;
}

.network-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #eaf5fc;
}

.network-open img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
}

.network-open > .net-demo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
}

.network-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 17px;
  border-top: 1px solid #d2e7f1;
  background: #f5faff;
}

.network-phase {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 11px;
  line-height: 1.5;
  font-weight: 700;
  color: var(--navy);
}

.network-running-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.network-controls.is-paused .network-running-dot { background: #8095a9; }
.network-actions { display: flex; gap: 6px; flex-shrink: 0; }
.network-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid #bfd5e5;
  border-radius: 6px;
  color: var(--navy);
  background: #fff;
  font-size: 10px;
  font-weight: 700;
  transition: background-color 160ms ease, transform 120ms var(--ease-out);
}
.network-actions button:active { transform: scale(.97); }
.network-actions button:disabled { opacity: .5; cursor: default; }
.network-actions .icon { width: 17px; height: 17px; stroke-width: 1.8; }
.network-toggle .play-glyph { display: none; }
.network-toggle[aria-pressed="true"] .play-glyph { display: block; }
.network-toggle[aria-pressed="true"] .pause-glyph { display: none; }
.network-toggle[aria-pressed="true"] { background: #e0edfc; border-color: #9bbce2; }

.gallery-dialog > img[hidden], .network-detail[hidden] { display: none !important; }
.network-detail .net-demo { display: block; width: 100%; height: auto; max-height: 72svh; }
.gallery-dialog.is-network-detail { width: min(1100px,calc(100% - 32px)); }
.network-detail .network-controls { border: 1px solid #d2e7f1; border-radius: 0 0 8px 8px; }
.network-detail .network-toggle-text { display: inline; }

.network-expand {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #c9e0ed;
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  box-shadow: 0 4px 16px #062c5412;
}

.network-expand .icon { width: 20px; height: 20px; }
.network-open:focus-visible { outline-offset: -5px; }

.network-visual figcaption {
  display: grid;
  gap: 5px;
  padding: 23px 26px 22px;
  border-top: 1px solid #d2e7f1;
  background: #fff;
}

.network-visual figcaption strong {
  font-family: var(--heading);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -.035em;
  color: var(--navy);
}

.network-visual figcaption span {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.network-visual figcaption small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}

@media (hover: hover) and (pointer: fine) {
  .network-actions button:hover:not(:disabled) { background: #e4effc; }
  .network-open:hover .network-expand {
    color: #fff;
    background: var(--blue);
    border-color: var(--blue);
  }
}

@media (max-width: 960px) {
  .network-visual { border-top-right-radius: 44px; }
  .network-visual figcaption { padding: 18px 20px; }
  .network-visual figcaption strong { font-size: 13px; }
  .network-visual figcaption span { font-size: 11px; }
  .network-expand { width: 36px; height: 36px; right: 12px; bottom: 12px; }
}

@media (max-width: 680px) {
  .network-visual { width: 100%; border-top-right-radius: 42px; }
  .network-visual figcaption { padding: 20px; }
  .network-visual figcaption strong { font-size: 14px; }
  .network-visual figcaption span { font-size: 12px; }
  .network-open { min-height: 0; }
  .network-controls { padding: 10px 13px; gap: 8px; }
  .network-phase { font-size: 10px; gap: 6px; }
  .network-actions button { min-width: 40px; min-height: 44px; }
  .network-toggle-text { display: none; }
  .network-detail .network-toggle-text { display: none; }
  .gallery-dialog.is-network-detail { width: calc(100% - 20px); }
}

@media (prefers-reduced-motion: reduce) {
  .network-actions button { transition: none; }
  .network-actions button:active { transform: none; }
}
