:root {
  --bg: #f4efe6;
  --panel: rgba(255, 252, 247, 0.95);
  --ink: #1f2b2c;
  --muted: #627273;
  --line: rgba(31, 64, 55, 0.14);
  --green: #1f5c4d;
  --green-soft: #dceee7;
  --orange: #d4863d;
  --orange-soft: #fff0db;
  --red: #b35448;
  --red-soft: #fde8e3;
  --shadow: 0 18px 45px rgba(31, 48, 46, 0.1);
  --font-ui: "Pretendard Variable", "SUIT Variable", "Apple SD Gothic Neo",
    "Noto Sans KR", sans-serif;
  --font-display: "MaruBuri", "NanumSquareRound", "Apple SD Gothic Neo",
    "Noto Sans KR", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.72), transparent 24%),
    linear-gradient(180deg, #edf3e7 0%, var(--bg) 42%, #ece2d4 100%);
  color: var(--ink);
  font-family: var(--font-ui);
}

body {
  padding: clamp(14px, 2vw, 28px);
}

button,
input,
textarea {
  font: inherit;
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

button:hover,
.button-link:hover {
  transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.button-link:focus-visible {
  outline: 3px solid rgba(212, 134, 61, 0.32);
  outline-offset: 2px;
}

.primary {
  color: #f7f8f2;
  background: linear-gradient(135deg, #205f50, #17463b);
  box-shadow: 0 10px 24px rgba(31, 92, 77, 0.24);
}

.secondary {
  color: var(--green);
  background: var(--green-soft);
}

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

.danger {
  color: var(--red);
  background: var(--red-soft);
}

.page {
  max-width: 1200px;
  margin: 0 auto;
}

.hero,
.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.hero {
  padding: clamp(22px, 3vw, 36px);
  background:
    linear-gradient(135deg, rgba(19, 54, 46, 0.96), rgba(33, 79, 67, 0.92)),
    radial-gradient(circle at top right, rgba(255, 223, 176, 0.18), transparent 32%);
  color: #f8f7f1;
}

.hero h1,
.panel h2,
.card h3 {
  margin: 0;
  font-family: var(--font-display);
}

.hero-copy,
.helper,
.status-box,
.hero-note {
  line-height: 1.75;
}

.eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
  opacity: 0.82;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-actions {
  margin-top: 18px;
}

.hero-note {
  margin: 18px 0 0;
  color: rgba(248, 247, 241, 0.86);
}

.hero a {
  color: inherit;
}

.hero .button-link.ghost,
.hero .button-link.secondary,
.hero button.ghost,
.hero button.secondary {
  color: var(--ink);
}

.hero .button-link.primary,
.hero button.primary {
  color: #f7f8f2;
}

.hero-note a {
  color: #f8f1ce;
}

.hero-note a:hover {
  color: #ffffff;
}

.layout {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.panel {
  padding: clamp(18px, 2.4vw, 24px);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.field {
  display: grid;
  gap: 10px;
}

.field span {
  font-weight: 700;
}

.import-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.import-card {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.import-card h3 {
  margin: 6px 0 8px;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

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

.import-step {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(31, 92, 77, 0.08);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.status-box {
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
}

.status-box[data-tone="success"] {
  background: rgba(220, 238, 231, 0.9);
  color: var(--green);
}

.status-box[data-tone="warning"] {
  background: rgba(255, 240, 219, 0.94);
  color: #8a5f23;
}

.status-box[data-tone="error"] {
  background: rgba(253, 232, 227, 0.92);
  color: var(--red);
}

.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(31, 92, 77, 0.08);
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
}

.student-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.student-table th,
.student-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.student-table th {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.student-table td input {
  min-width: 0;
}

.student-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(212, 134, 61, 0.12);
  color: #8a5f23;
  font-size: 0.82rem;
  font-weight: 700;
}

.student-tag.off {
  background: rgba(108, 122, 122, 0.12);
  color: #5d6a6a;
}

.seat-board-wrap {
  overflow-x: auto;
}

.seat-board {
  display: grid;
  gap: 14px;
  min-width: 840px;
}

.seat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.desk-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.seat-card {
  display: grid;
  gap: 8px;
  min-height: 122px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(31, 92, 77, 0.18);
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.seat-card:hover {
  transform: translateY(-2px);
}

.seat-card.enabled {
  background: linear-gradient(180deg, rgba(220, 238, 231, 0.88), rgba(255, 255, 255, 0.96));
}

.seat-card.disabled {
  background: rgba(234, 238, 237, 0.9);
  color: var(--muted);
}

.seat-label {
  font-weight: 800;
  color: var(--green);
}

.seat-card.disabled .seat-label {
  color: #5e6c6d;
}

.seat-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.metric {
  margin-top: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green);
}

.metric.subtle {
  font-size: 1.1rem;
  color: var(--muted);
}

code {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

@media (max-width: 980px) {
  .panel-head,
  .hero-actions,
  .action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .import-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    padding: 12px;
  }

  .seat-board {
    min-width: 0;
  }

  .seat-row {
    grid-template-columns: 1fr;
  }

  .student-table {
    min-width: 0;
  }

  .student-table th,
  .student-table td {
    padding: 10px 8px;
  }
}
