:root {
  color-scheme: light;
  --ink: #17201c;
  --muted: #66736d;
  --line: #dce3df;
  --surface: #ffffff;
  --surface-soft: #f5f7f3;
  --accent: #0f766e;
  --accent-strong: #0b5d56;
  --gold: #c8922a;
  --coral: #d65f45;
  --sky: #2f7da7;
  --danger: #b42318;
  --danger-soft: #fff0ed;
  --shadow: 0 24px 70px rgba(28, 42, 36, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(47, 125, 167, 0.04) 42%, transparent),
    linear-gradient(315deg, rgba(214, 95, 69, 0.1), rgba(200, 146, 42, 0.1) 34%, transparent 64%),
    #edf2ef;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.workspace {
  overflow: hidden;
  background: #fbfdfb;
  border: 1px solid rgba(23, 32, 28, 0.08);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.topbar {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 430px;
  padding: 52px;
  overflow: hidden;
  border-bottom: 0;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

.hero-overlay {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(250, 253, 251, 0.99) 0%, rgba(250, 253, 251, 0.94) 28%, rgba(250, 253, 251, 0.42) 58%, rgba(250, 253, 251, 0.08) 100%),
    linear-gradient(0deg, rgba(15, 118, 110, 0.2), transparent 42%);
}

.hero-copy {
  display: grid;
  gap: 18px;
  max-width: 560px;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.55rem, 6vw, 4.55rem);
  line-height: 1.03;
}

h2 {
  font-size: 1.45rem;
}

h3 {
  font-size: 1.05rem;
}

.hero-lede {
  max-width: 470px;
  color: #33413b;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.65;
  word-break: keep-all;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span {
  padding: 8px 11px;
  color: #123f3b;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(23, 32, 28, 0.08);
}

.status-pill {
  position: absolute;
  top: 28px;
  right: 28px;
  flex: 0 0 auto;
  min-width: 92px;
  padding: 10px 14px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 800;
  text-align: center;
}

.status-pill.live {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.status-pill.closed {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #ffd1ca;
}

.seminar-summary {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 1px;
  background: rgba(220, 227, 223, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.72);
}

.seminar-summary div {
  min-width: 0;
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.88);
}

.seminar-summary span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.seminar-summary strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.mode-tabs {
  display: flex;
  gap: 8px;
  padding: 20px 22px 0;
  background: #fbfdfb;
}

.tab {
  min-width: 110px;
  min-height: 44px;
  padding: 10px 18px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px 8px 0 0;
  font-weight: 800;
}

.tab.active {
  color: var(--ink);
  background: var(--surface-soft);
  border-color: var(--line);
  border-bottom-color: var(--surface-soft);
}

.panel {
  display: none;
  padding: 28px;
  background:
    linear-gradient(180deg, #f6f9f5, #eef5f2);
  border-top: 1px solid var(--line);
}

.panel.active {
  display: block;
}

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

.panel-heading p,
.registrations p,
.notice {
  color: var(--muted);
}

.panel-heading > div {
  display: grid;
  gap: 6px;
}

.public-materials {
  margin-bottom: 20px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.public-materials h3 {
  margin-bottom: 12px;
}

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

.material-link {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 13px 14px;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.material-link span,
.material-link small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.material-link strong {
  overflow-wrap: anywhere;
}

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

.form-grid label {
  display: grid;
  gap: 8px;
}

.form-grid .wide-field {
  grid-row: span 2;
}

.form-grid span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 13px 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

input::placeholder,
textarea::placeholder {
  color: #95a19b;
}

.primary-action,
.secondary-action,
.danger-action {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 900;
}

.primary-action {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #148c6c);
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.18);
}

.primary-action:hover {
  background: var(--accent-strong);
}

.secondary-action {
  color: var(--ink);
  background: #ffffff;
  border-color: #cfd8d3;
}

.secondary-action:hover {
  border-color: rgba(15, 118, 110, 0.38);
  box-shadow: 0 8px 20px rgba(23, 32, 28, 0.08);
}

.danger-action {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #ffd1ca;
}

.form-grid > .primary-action {
  align-self: end;
}

.notice {
  min-height: 24px;
  margin-top: 16px;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.signature-section,
.signature-settings {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.signature-section legend { padding: 0 6px; font-weight: 800; }
.signature-help { color: var(--muted); font-size: 0.88rem; line-height: 1.6; margin: 8px 0 12px; }
.signature-settings { display: grid; gap: 10px; }
#signature-statement { font-weight: 700; line-height: 1.6; }
#signature-pad { display: block; width: 100%; aspect-ratio: 2; height: auto; border: 1px dashed #9caca2; border-radius: 8px; background: #fff; cursor: crosshair; touch-action: none; }
.signature-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 16px; flex-wrap: wrap; }
.form-grid .checkbox-field { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.checkbox-field input { width: 20px; min-width: 20px; height: 20px; min-height: 20px; margin: 0; padding: 0; accent-color: var(--accent); }
.checkbox-field span { line-height: 1.5; }
.signature-time { display: block; white-space: nowrap; color: var(--muted); margin-top: 6px; }
.signature-dialog { width: min(760px, calc(100% - 24px)); max-height: 90vh; overflow-y: auto; padding: 0; border: 1px solid var(--line); border-radius: 8px; }
.signature-dialog::backdrop { background: rgba(23, 32, 28, 0.42); }
.signature-preview { display: grid; gap: 12px; padding: 20px; }
.signature-preview img { width: 100%; border: 1px solid var(--line); }
button:disabled { opacity: 0.6; cursor: wait; }

.auth-form {
  display: grid;
  grid-template-columns: minmax(220px, 340px) auto;
  align-items: end;
  gap: 12px;
  max-width: 520px;
}

.auth-form label {
  display: grid;
  gap: 8px;
}

.auth-form span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.seminar-manager {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(160px, auto);
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
}

.seminar-manager label,
.status-note {
  display: grid;
  gap: 8px;
}

.seminar-manager span,
.status-note span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.status-note {
  min-height: 48px;
  padding: 6px 14px;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.status-note strong {
  font-size: 0.95rem;
}

.admin-form {
  align-items: end;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.registrations {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.material-manager {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

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

.material-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.material-upload strong {
  display: block;
  margin-bottom: 5px;
}

.material-upload p {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.material-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

a.secondary-action {
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  text-decoration: none;
}

.registrations-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.compact {
  min-height: 40px;
  padding: 0 14px;
}

.qr-dialog {
  width: min(360px, calc(100% - 32px));
  padding: 0;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.qr-dialog::backdrop {
  background: rgba(23, 32, 28, 0.42);
}

.qr-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.qr-dialog-header h2 {
  font-size: 1.08rem;
}

.icon-action {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1.35rem;
  line-height: 1;
}

.qr-code-wrap {
  display: grid;
  place-items: center;
  padding: 22px 22px 10px;
}

.qr-code-wrap img {
  width: min(260px, 100%);
  height: auto;
}

.qr-url {
  padding: 0 18px 20px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: #fbfcfb;
  font-size: 0.82rem;
}

td {
  overflow-wrap: anywhere;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.empty-state {
  color: var(--muted);
  text-align: center;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
    padding: 10px 0;
  }

  .topbar,
  .panel-heading,
  .registrations-header {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar,
  .panel {
    padding: 22px;
  }

  .topbar {
    min-height: 570px;
    align-items: flex-start;
    padding-top: 74px;
  }

  .hero-media img {
    object-position: 64% center;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(250, 253, 251, 0.98) 0%, rgba(250, 253, 251, 0.92) 44%, rgba(250, 253, 251, 0.24) 72%, rgba(15, 118, 110, 0.18) 100%),
      linear-gradient(90deg, rgba(250, 253, 251, 0.82), rgba(250, 253, 251, 0.2));
  }

  .hero-copy {
    max-width: 100%;
    gap: 14px;
  }

  h1 {
    max-width: 10.5ch;
    font-size: 2.42rem;
  }

  .hero-lede {
    max-width: 23rem;
    font-size: 0.98rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .hero-tags span {
    font-size: 0.78rem;
  }

  .status-pill {
    top: 18px;
    right: auto;
    left: 22px;
  }

  .seminar-summary,
  .form-grid,
  .auth-form,
  .seminar-manager,
  .material-links,
  .material-upload-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .wide-field {
    grid-row: auto;
  }

  .mode-tabs {
    padding-inline: 16px;
  }

  .tab {
    flex: 1;
    min-width: 0;
  }

  .admin-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
