:root {
  --surface: #ffffff;
  --ink: #1d2530;
  --muted: #5f6b7a;
  --primary: #1565c0;
  --line: #d8e0ea;
  --danger: #c62828;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: linear-gradient(180deg, #eef4fb 0%, #f8fafc 40%, #f5f7fa 100%);
  color: var(--ink);
}

.app {
  max-width: 1024px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.header { margin-bottom: 16px; }
h1, h2 { margin: 0 0 8px; }
p { margin: 6px 0; }

.small {
  color: var(--muted);
  font-size: 0.92rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

textarea,
select,
input {
  width: 100%;
  border: 1px solid #bfcad6;
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}

textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.row.wrap { flex-wrap: wrap; }
.row.responsive { align-items: end; }
.row.responsive > label { flex: 1; }

button {
  border: 0;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

button:hover { filter: brightness(0.96); }
button:disabled { opacity: 0.6; cursor: not-allowed; }

.summary {
  margin-bottom: 10px;
  font-weight: 600;
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-top: 1px solid var(--line);
  padding: 8px;
  text-align: left;
}

.error { color: var(--danger); }

@media (max-width: 760px) {
  .row.responsive {
    flex-direction: column;
    align-items: stretch;
  }
}
