#tool-output.is-error {
  color: #ff9eaa;
}

:root[data-theme="dark"] .output-panel {
  border-color: #42516c;
  background: #0f192b;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .output-panel .panel-heading {
  background: #14213a;
  border-bottom-color: #42516c;
}

.related-quick-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 26px 0 6px;
  padding: 0.68rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, var(--accent-soft));
}

.related-quick-nav > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.related-quick-nav > div {
  display: flex;
  flex: 1 1 auto;
  gap: 0.5rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.related-quick-nav a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.42rem;
  min-height: 36px;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.81rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.related-quick-nav a > span {
  color: var(--accent);
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
}

.related-quick-nav a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

@media (max-width: 720px) {
  .related-quick-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.42rem;
    margin-top: 22px;
  }

  .related-quick-nav > div {
    width: 100%;
    padding-bottom: 0.1rem;
  }
}

.clear-button {
  min-height: 43px;
  padding: 0 15px;
  border: 1px solid #e5a0aa;
  border-radius: 9px;
  background: var(--surface);
  color: #b4233d;
  font-size: 0.88rem;
  font-weight: 800;
}

.clear-button::before {
  content: '×';
  margin-right: 0.38rem;
  font-size: 1.08em;
}

.clear-button:hover:not(:disabled) {
  border-color: #d1495b;
  background: #fff1f2;
}

:root[data-theme="dark"] .clear-button {
  border-color: #944454;
  background: #21131b;
  color: #ffb4be;
}

:root[data-theme="dark"] .clear-button:hover:not(:disabled) {
  border-color: #fb7185;
  background: #371923;
}

.copy-toast {
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: calc(100vw - 2rem);
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: #172033;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.25);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.75rem);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.copy-toast::before {
  content: '✓';
  display: grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: #168568;
  color: #fff;
  font-size: 0.75rem;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.json-error-card {
  display: block;
  max-width: 42rem;
  white-space: normal;
  font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.json-error-label,
.json-error-title,
.json-error-advice,
.json-error-technical {
  display: block;
}

.json-error-label {
  color: #fb7185;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.json-error-title {
  margin-top: 0.4rem;
  color: #fff1f2;
  font-size: 1.1rem;
  line-height: 1.35;
}

.json-error-location {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(251, 113, 133, 0.38);
  border-radius: 999px;
  color: #fecdd3;
  font-size: 0.82rem;
  font-weight: 700;
}

.json-error-advice {
  margin-top: 0.85rem;
  color: #f8fafc;
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.65;
}

.json-error-technical {
  margin-top: 1.15rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(253, 164, 175, 0.24);
  color: #fda4af;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
