:root {
  --student-bg: #f5f1e8;
  --student-surface: rgba(255, 255, 255, 0.92);
  --student-line: #d7cec1;
  --student-text: #2e241d;
  --student-muted: #6f655b;
  --student-accent: #2c5f8d;
  --student-accent-soft: rgba(44, 95, 141, 0.1);
  --student-accent-strong: #233c56;
  --student-success: #346b50;
  --student-warm: #d17956;
  --student-money: #3f6c4a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  color: var(--student-text);
  background:
    radial-gradient(circle at top left, rgba(209, 121, 86, 0.16), transparent 26%),
    radial-gradient(circle at top right, rgba(44, 95, 141, 0.18), transparent 24%),
    linear-gradient(180deg, #faf6ef 0%, #eee6da 100%);
}

button,
input,
select {
  font: inherit;
}

.student-shell {
  padding: 24px;
}

.student-main {
  max-width: 1120px;
  margin: 0 auto;
}

.student-lock-shell {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
}

.student-lock-card {
  width: min(520px, 100%);
  padding: 30px;
  border: 1px solid var(--student-line);
  border-radius: 28px;
  background: var(--student-surface);
  box-shadow: 0 18px 48px rgba(45, 36, 29, 0.1);
}

.student-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  padding: 28px;
  border: 1px solid var(--student-line);
  border-radius: 28px;
  background: var(--student-surface);
  box-shadow: 0 18px 48px rgba(45, 36, 29, 0.1);
}

.student-eyebrow {
  margin: 0 0 10px;
  color: var(--student-accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.student-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

.student-hero-copy {
  margin: 12px 0 0;
  max-width: 640px;
  color: var(--student-muted);
  line-height: 1.6;
}

.student-selector {
  display: grid;
  gap: 8px;
  min-width: 240px;
  color: var(--student-muted);
}

.student-hero-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.student-code-badge {
  margin: 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(44, 95, 141, 0.12);
  color: var(--student-accent);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.student-access-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 18px;
}

.student-code-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--student-line);
  border-radius: 16px;
  background: white;
  color: var(--student-text);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.student-access-submit {
  min-width: 110px;
}

.student-error-copy {
  margin: 12px 0 0;
  color: #aa4935;
}

.student-selector select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--student-line);
  border-radius: 16px;
  background: white;
  color: var(--student-text);
}

.student-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.student-summary-card,
.student-panel,
.student-payment-card {
  border: 1px solid var(--student-line);
  border-radius: 22px;
  background: var(--student-surface);
}

.student-summary-card {
  padding: 18px;
}

.student-summary-label {
  display: block;
  color: var(--student-muted);
  font-size: 13px;
}

.student-summary-value {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  font-weight: 700;
}

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

.student-panel {
  padding: 22px;
}

.student-panel-head h2,
.student-subheading {
  margin: 0;
}

.student-panel-head p,
.student-muted-copy,
.student-item-meta {
  color: var(--student-muted);
}

.student-panel-head p {
  margin: 8px 0 0;
  line-height: 1.5;
}

.student-subheading {
  margin-top: 18px;
  font-size: 15px;
}

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

.student-item-list,
.student-tip-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.student-item + .student-item,
.student-tip-list li + li {
  margin-top: 10px;
}

.student-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--student-line);
  border-radius: 18px;
  background: white;
}

.student-item-copy {
  min-width: 0;
}

.student-item-copy strong {
  display: block;
  font-size: 16px;
  word-break: break-word;
}

.student-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
}

.student-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f2eee7;
  border: 1px solid var(--student-line);
}

.student-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.student-primary-button,
.student-secondary-button,
.student-ghost-button {
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid transparent;
  cursor: pointer;
}

.student-primary-button {
  background: var(--student-accent-strong);
  color: white;
}

.student-secondary-button {
  background: var(--student-accent-soft);
  color: var(--student-accent);
  border-color: rgba(44, 95, 141, 0.18);
}

.student-ghost-button {
  background: transparent;
  color: var(--student-muted);
  border-color: var(--student-line);
}

.student-agenda-list {
  display: grid;
  gap: 10px;
}

.student-agenda-card {
  padding: 16px;
  border: 1px solid var(--student-line);
  border-radius: 18px;
  background: white;
}

.student-agenda-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.student-agenda-body {
  display: grid;
  gap: 8px;
}

.student-agenda-item {
  padding: 10px 12px;
  border-radius: 14px;
  background: #f5f0e8;
}

.student-agenda-item.is-lesson {
  background: rgba(44, 95, 141, 0.08);
  color: var(--student-accent);
}

.student-payment-card {
  padding: 16px;
}

.student-tip-list li {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(209, 121, 86, 0.08);
  color: var(--student-text);
}

.student-powered-by {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 22px 0 4px;
  color: var(--student-muted);
  font-size: 13px;
  line-height: 1.5;
}

.student-powered-by a {
  color: var(--student-accent);
  font-weight: 800;
  text-decoration: none;
}

.student-powered-by a:hover {
  text-decoration: underline;
}

.student-fatal-error {
  padding: 24px;
  font-family: sans-serif;
}

.student-fatal-error pre {
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .student-shell {
    padding: 16px;
  }

  .student-hero,
  .student-panel-grid {
    grid-template-columns: 1fr;
  }

  .student-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-hero {
    align-items: stretch;
  }

  .student-hero-actions {
    justify-items: start;
  }
}

@media (max-width: 640px) {
  .student-summary-grid {
    grid-template-columns: 1fr;
  }

  .student-access-form {
    grid-template-columns: 1fr;
  }

  .student-item {
    flex-direction: column;
  }

  .student-action-row {
    justify-content: flex-start;
  }
}
