:root {
  --bg: #f3efe7;
  --panel: rgba(255, 251, 244, 0.9);
  --panel-strong: #fff9f0;
  --ink: #1f2a28;
  --muted: #5b675f;
  --line: rgba(31, 42, 40, 0.12);
  --accent: #0d8a66;
  --accent-deep: #0a5d46;
  --accent-soft: rgba(13, 138, 102, 0.12);
  --warning: #b44f22;
  --success: #0b6d51;
  --shadow: 0 30px 80px rgba(39, 48, 45, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "SF Pro Display", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(13, 138, 102, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(226, 125, 59, 0.18), transparent 28%),
    linear-gradient(180deg, #f8f4ec 0%, #eee7db 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
}

.page-shell {
  width: min(1160px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 56px 0 72px;
}

.hero {
  padding: 12px 0 36px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.3rem, 4.6vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-copy {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 22px;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.panel::after {
  content: "";
  position: absolute;
  inset: auto -50px -70px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(13, 138, 102, 0.18), transparent 68%);
}

.upload-panel,
.result-panel {
  padding: 28px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.4rem;
}

.panel-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.file-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.file-card {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(250, 245, 238, 0.94));
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.file-card:hover {
  transform: translateY(-1px);
  border-color: rgba(13, 138, 102, 0.3);
  box-shadow: 0 18px 40px rgba(39, 48, 45, 0.08);
}

.file-title {
  font-size: 1.06rem;
  font-weight: 800;
}

.file-help {
  color: var(--muted);
  line-height: 1.55;
}

.file-name {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 700;
}

.file-card input {
  display: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

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

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 16px 36px rgba(13, 138, 102, 0.24);
}

.secondary-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
}

.message {
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

.message[data-tone="error"] {
  color: var(--warning);
  border-color: rgba(180, 79, 34, 0.2);
  background: rgba(180, 79, 34, 0.08);
}

.message[data-tone="success"] {
  color: var(--success);
  border-color: rgba(11, 109, 81, 0.18);
  background: rgba(11, 109, 81, 0.08);
}

.message[data-tone="working"] {
  color: var(--accent-deep);
}

.summary-list {
  display: grid;
  gap: 10px;
  padding-left: 20px;
  margin: 22px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.preview-wrap {
  margin-top: 26px;
}

.preview-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.preview-title-row h3 {
  margin: 0;
  font-size: 1rem;
}

.preview-title-row span {
  color: var(--muted);
  font-size: 0.92rem;
}

.table-shell {
  margin-top: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(31, 42, 40, 0.08);
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  background: #f8f4ec;
  font-size: 0.92rem;
}

td {
  color: var(--muted);
  font-size: 0.94rem;
}

.notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.note-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 249, 240, 0.78);
}

.note-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.note-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 920px) {
  .layout,
  .notes {
    grid-template-columns: 1fr;
  }

  .page-shell {
    width: min(100vw - 20px, 1160px);
    padding: 28px 0 44px;
  }

  .upload-panel,
  .result-panel {
    padding: 22px;
  }

  .hero {
    padding-bottom: 24px;
  }
}
