:root {
  --bg: #f3efe6;
  --panel: rgba(255, 252, 247, 0.95);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --ink: #1d2c2c;
  --muted: #5e6f6f;
  --line: rgba(32, 71, 60, 0.14);
  --green: #1f5c4d;
  --green-soft: #d8eee7;
  --orange: #d7863f;
  --orange-soft: #fff0da;
  --red: #b94f42;
  --red-soft: #fde5e1;
  --shadow: 0 18px 45px rgba(39, 63, 58, 0.1);
  --radius: 24px;
  --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%, #eee4d7 100%);
  color: var(--ink);
  font-family: var(--font-ui);
}

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

button,
input,
textarea,
select {
  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,
select:focus-visible,
.button-link:focus-visible {
  outline: 3px solid rgba(215, 134, 63, 0.35);
  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.86);
  border: 1px solid var(--line);
}

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

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

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

.hero {
  padding: clamp(22px, 3vw, 34px);
  background:
    linear-gradient(135deg, rgba(19, 54, 46, 0.96), rgba(34, 81, 69, 0.92)),
    radial-gradient(circle at top right, rgba(255, 223, 176, 0.2), transparent 32%);
  color: #f7f7f1;
}

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

.hero p,
.panel p,
.meta,
.status-box,
.card {
  line-height: 1.7;
}

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

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

.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: 14px;
  margin-bottom: 16px;
}

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

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

.field span {
  font-weight: 700;
}

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

textarea {
  resize: vertical;
  min-height: 150px;
}

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

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

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

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

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

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

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

.subtle {
  color: var(--muted);
}

.chip {
  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: 700;
}

.value-box {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  word-break: break-word;
}

.stack {
  display: grid;
  gap: 12px;
}

.empty-state {
  padding: 18px;
  border-radius: 20px;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.65);
  color: var(--muted);
}

.board-grid {
  display: grid;
  gap: 14px;
}

.students-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.student-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.student-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.student-card-actions button {
  flex: 1 1 180px;
}

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

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

.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: 10px;
  min-height: 136px;
  padding: 14px;
  border: 1px solid rgba(31, 92, 77, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
}

.seat-card.available {
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.seat-card.available:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(31, 92, 77, 0.1);
}

.seat-card.locked {
  background: rgba(235, 240, 238, 0.9);
  color: var(--muted);
}

.seat-card.mine {
  background: linear-gradient(180deg, rgba(216, 238, 231, 0.92), rgba(255, 255, 255, 0.96));
}

.seat-card.current {
  border-color: rgba(215, 134, 63, 0.42);
}

.seat-card button {
  width: 100%;
}

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

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

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

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
}

.list-item > div {
  min-width: 0;
}

.list-item strong,
.student-card strong {
  word-break: break-word;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

code {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(31, 92, 77, 0.08);
}

pre {
  overflow: auto;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 980px) {
  .panel-grid,
  .card-grid,
  .students-board {
    grid-template-columns: 1fr;
  }

  .panel-head {
    flex-direction: column;
  }

  .hero-actions,
  .button-row,
  .inline-grid {
    flex-direction: row;
  }
}

@media (max-width: 760px) {
  .hero-actions,
  .button-row,
  .inline-grid {
    flex-direction: column;
    align-items: stretch;
  }

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

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