:root {
  --bg-1: #f3f7ff;
  --bg-2: #dbe9ff;
  --card: rgba(255, 255, 255, 0.88);
  --text: #0f172a;
  --muted: #475569;
  --line: rgba(15, 23, 42, 0.08);
  --brand: #0e5ef7;
  --brand-2: #0837be;
  --danger: #c2410c;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(14, 94, 247, 0.18), transparent 45%),
    radial-gradient(circle at 90% 20%, rgba(2, 132, 199, 0.14), transparent 35%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

body {
  min-height: 100vh;
}

.app-shell {
  width: min(860px, 100% - 24px);
  margin: 0 auto;
  padding: 20px 0 28px;
  display: grid;
  gap: 14px;
}

.hero {
  padding: 12px 4px 2px;
}

.hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: -0.04em;
}

.eyebrow {
  margin: 0;
  color: var(--brand-2);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.lead {
  margin: 0;
  line-height: 1.5;
  color: var(--muted);
}

.lead.compact {
  margin-top: 6px;
  font-size: 0.92rem;
}

.lead a {
  color: var(--brand-2);
  font-weight: 700;
  text-decoration: none;
}

.lead a:hover {
  text-decoration: underline;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 40px rgba(30, 41, 59, 0.06);
}

.card h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.tips {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.row-form,
.button-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.button-row.single-action {
  grid-template-columns: 1fr;
}

.top-gap {
  margin-top: 10px;
}

.stack-form {
  display: grid;
  gap: 8px;
}

input,
button {
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 11px 12px;
  font-size: 0.95rem;
}

input {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

input:focus,
button:focus {
  outline: 2px solid rgba(14, 94, 247, 0.28);
  outline-offset: 1px;
}

button {
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border: none;
  font-weight: 700;
}

button.secondary {
  background: #e2e8f0;
  color: #0f172a;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.muted {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.status-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.status-grid > div {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.status-grid span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.status-grid strong {
  font-size: 0.95rem;
  word-break: break-word;
}

.endpoint-box,
.endpoint-item {
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.endpoint-item.current {
  border-color: rgba(14, 94, 247, 0.28);
  box-shadow: 0 0 0 1px rgba(14, 94, 247, 0.08) inset;
}

.endpoint-list {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}

.endpoint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.endpoint-code {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #0b1220;
  color: #dbeafe;
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-all;
}

.endpoint-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}

.secondary-badge {
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
}

.log {
  margin: 0;
  background: #0b1220;
  color: #dbeafe;
  border-radius: 12px;
  padding: 12px;
  min-height: 140px;
  max-height: 260px;
  overflow: auto;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 640px) {
  .row-form,
  .button-row {
    grid-template-columns: 1fr;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .endpoint-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-shell {
    width: min(860px, 100% - 14px);
    padding-top: 14px;
  }

  .card {
    padding: 12px;
    border-radius: 16px;
  }
}
