.detail-trigger {
  display: block;
  margin: 10px auto 0;
  min-height: 44px;
  padding: 8px 15px;
  border: 1px solid #aeced04d;
  border-radius: 999px;
  color: #d9edf1;
  font-size: 13px;
  background: #0b253bb8;
}
.detail-trigger:hover {
  border-color: #f3cca0;
  color: #f3cca0;
}
#diagram-dialog {
  color: #ecf4f6;
  background: #0b2332;
  border: 1px solid #506977;
  border-radius: 22px;
  padding: 0;
  max-height: calc(100dvh - 24px);
  max-width: calc(100vw - 24px);
  width: 720px;
  overflow: auto;
  overscroll-behavior: contain;
}
#diagram-dialog::backdrop {
  background: #03121ddd;
  backdrop-filter: blur(8px);
}
.detail-head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #62829655;
}
.detail-head h2 {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.35;
  margin: 0;
  color: #f3cca0;
  letter-spacing: -0.02em;
}
.detail-head button,
.detail-controls button {
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #809faa55;
  padding: 8px 12px;
}
.detail-head button {
  flex: none;
  font-size: 24px;
}
.detail-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
}
.detail-controls button[aria-pressed="true"] {
  background: #b0dfed22;
  color: #f3cca0;
  border-color: #f3cca0;
}
.detail-stage {
  overflow: auto;
  max-height: calc(100dvh - 240px);
  min-height: 120px;
  background: #071d2b;
  touch-action: pan-x pan-y pinch-zoom;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.detail-canvas {
  margin: 0 auto;
  transform-origin: 0 0;
}
.detail-canvas > svg {
  display: block;
  width: 100%;
  height: auto;
}
.detail-explanation {
  font-size: 15px;
  line-height: 1.6;
  padding: 12px 20px 20px;
  margin: 0;
  color: #d9e5eb;
}
.detail-help {
  font-size: 12px;
  color: #aec7d2;
  text-align: center;
  margin: 0;
  padding: 8px;
}

@media (min-width: 1101px) {
  .detail-trigger {
    display: none;
  }
}
