body {
  min-height: 100vh;
}

textarea {
  resize: vertical;
}

code {
  word-break: break-all;
}

.pdf-viewer {
  display: block;
  height: min(70vh, 720px);
  min-height: 420px;
  width: 100%;
}

.pdf-fallback {
  background: #fff;
}

.experiment-step-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

.experiment-step-overview li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 14px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-weight: 600;
}

.experiment-step-number {
  display: inline-flex;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #fff;
  background: #0d6efd;
  border-radius: 50%;
  font-weight: 700;
}

.experiment-step-section {
  padding: 24px;
  border: 1px solid #dee2e6;
  border-radius: 10px;
}

.experiment-step-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.chat-guide-figure {
  margin: 0 0 24px;
}

.dialogue-intro-panel {
  padding: 24px;
  background: linear-gradient(135deg, #eef4ff 0%, #f8fbff 100%);
  border: 1px solid #cbdcf8;
  border-left: 6px solid #3568a8;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(53, 104, 168, 0.1);
}

.dialogue-intro-kicker {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  color: #2f5e96;
  background: #dbeafe;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.dialogue-intro-panel h2 {
  color: #1f416a;
}

.dialogue-intro-lead {
  max-width: 75ch;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.8;
}

.dialogue-intro-sentence {
  display: block;
  margin-bottom: 0.65rem;
}

.dialogue-intro-sentence:last-child {
  margin-bottom: 0;
}

.condition-highlight-panel {
  margin-top: 20px;
  padding: 18px 20px;
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-left: 6px solid #f97316;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(194, 65, 12, 0.1);
  line-height: 1.7;
}

.condition-highlight-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.condition-highlight-heading > span {
  padding: 3px 8px;
  color: #fff;
  background: #c2410c;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.chat-guide-image {
  display: block;
  width: 100%;
  height: auto;
  background: #f4f6f9;
  border: 1px solid #dee2e6;
  border-radius: 10px;
}

.chat-guide-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.chat-guide-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
}

.chat-guide-step > span {
  display: inline-flex;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: #64748b;
  border-radius: 50%;
  font-weight: 700;
}

.chat-guide-step p {
  margin: 0;
}

.app-menu-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  font-family: sans-serif;
}

.app-menu-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-menu-brand {
  min-width: 0;
  overflow: hidden;
  color: #212529;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-menu-login-id {
  flex: 0 0 auto;
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.app-menu-spacer {
  height: 52px;
}

@media (max-width: 575.98px) {
  .experiment-step-overview {
    grid-template-columns: 1fr;
  }

  .experiment-step-section {
    padding: 18px;
  }

  .dialogue-intro-panel {
    padding: 18px;
  }

  .chat-guide-steps {
    grid-template-columns: 1fr;
  }

  .app-menu-inner {
    padding-right: 12px;
    padding-left: 12px;
  }

  .app-menu-brand {
    font-size: 1rem;
  }

  .app-menu-login-id {
    font-size: 0.8rem;
  }
}
