* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, 'Malgun Gothic', '맑은 고딕', sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

/* Header */
.header {
  background: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo img {
  height: 40px;
  object-fit: contain;
}

.header-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

.header-badge {
  display: grid;
  grid-template-columns: 16px 16px;
  grid-template-rows: 16px 16px;
  gap: 3px;
}

.header-badge span {
  width: 16px;
  height: 16px;
  display: inline-block;
}

.badge-red { background: #e53e3e; }
.badge-gray { background: #cbd5e0; }
.badge-blue { background: #3182ce; }

/* Container */
.container {
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
}

/* Form */
.form-section {
  padding: 0 20px;
}

.form-group {
  padding: 20px 0;
  border-bottom: 1px dashed #e0e0e0;
}

.form-group:last-child {
  border-bottom: none;
}

.form-label {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  display: block;
}

.form-label .required {
  color: #e53e3e;
  margin-left: 4px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: #e53e3e;
}

.form-select {
  padding: 12px 14px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 15px;
  background: #fff;
  outline: none;
  appearance: auto;
}

/* Phone input */
.phone-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-row .form-select {
  width: 100px;
}

.phone-row .phone-dash {
  color: #999;
  font-size: 16px;
}

.phone-row .form-input {
  flex: 1;
}

/* Email input */
.email-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.email-row .form-input {
  flex: 1;
}

.email-at {
  font-size: 16px;
  color: #666;
  flex-shrink: 0;
}

.email-domain-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.email-domain-row .form-input {
  flex: 1;
}

.email-domain-row .form-select {
  flex: 1;
}

.btn-no-email {
  padding: 10px 16px;
  background: #f0f0f0;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
  margin-top: 8px;
}

.btn-no-email.active {
  background: #e53e3e;
  color: #fff;
  border-color: #e53e3e;
}

/* Checkbox */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
}

.checkbox-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #e53e3e;
}

.checkbox-row label {
  font-size: 13px;
  color: #666;
  cursor: pointer;
}

/* Address */
.address-row {
  display: flex;
  gap: 8px;
}

.address-row .form-select {
  flex: 1;
}

/* Radio group */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.radio-item input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: #e53e3e;
}

.radio-item label {
  font-size: 15px;
  cursor: pointer;
}

/* Privacy box */
.privacy-box {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 14px;
  max-height: 200px;
  overflow-y: auto;
  font-size: 13px;
  color: #555;
  line-height: 1.8;
  white-space: pre-wrap;
  margin-bottom: 12px;
}

/* Submit button */
.submit-section {
  padding: 20px;
}

.btn-submit {
  width: 100%;
  padding: 16px;
  background: #e53e3e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-submit:hover {
  background: #c53030;
}

.btn-submit:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Completion page */
.completion-page {
  display: none;
  text-align: center;
  padding: 20px;
}

.completion-banner {
  background: linear-gradient(135deg, #e53e3e, #c53030);
  color: #fff;
  padding: 20px;
  margin: -20px -20px 0;
}

.completion-banner h2 {
  font-size: 22px;
}

.completion-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 30px 20px;
  margin-top: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.completion-card .qr-image {
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
}

.completion-card .reg-number {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  letter-spacing: 1px;
}

.completion-card .reg-name {
  font-size: 26px;
  font-weight: 800;
  margin-top: 12px;
  color: #222;
}

.completion-card .reg-job {
  font-size: 18px;
  font-weight: 600;
  margin-top: 6px;
  color: #555;
}

.completion-info {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  padding: 16px;
  background: #f9f9f9;
  border-radius: 8px;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.completion-info > div {
  text-wrap: balance;
}

/* Closed page */
.closed-page {
  display: none;
  text-align: center;
  padding: 60px 20px;
}

.closed-page h2 {
  font-size: 22px;
  color: #666;
  margin-bottom: 12px;
}

.closed-page p {
  color: #999;
}

/* Banner logo */
.logo-area {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: #eee;
}

.exhibition-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Error messages */
.error-msg {
  color: #e53e3e;
  font-size: 12px;
  margin-top: 6px;
  display: none;
}

.error-msg.show {
  display: block;
}

.form-input.input-error,
.form-select.input-error {
  border-color: #e53e3e;
  background: #fff5f5;
}

.form-group.has-error .form-label {
  color: #e53e3e;
}

/* Toast (서버 에러용) */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #e53e3e;
  color: #fff;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}

.toast.show {
  opacity: 1;
}

/* Responsive */
@media (max-width: 480px) {
  .container {
    max-width: 100%;
  }
}
