*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #f8fafc;
  --surface: #fff;
  --text: #1e293b;
  --text-muted: #64748b;
  --accent: #0ea5e9;
  --accent-hover: #0284c7;
  --error: #dc2626;
  --success: #16a34a;
  --border: #e2e8f0;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 1.25rem;
}

header {
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.description {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.375rem;
  font-size: 0.9375rem;
}

.required { color: var(--error); }

input, select, textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

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

.hint {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.error {
  display: block;
  font-size: 0.8125rem;
  color: var(--error);
  margin-top: 0.25rem;
}

#submit-area {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

#submit-btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s;
}

#submit-btn:hover:not(:disabled) {
  background: var(--accent-hover);
}

#submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.status {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.status.loading { color: var(--accent); }
.status.error { color: var(--error); }

.success-message {
  padding: 1rem;
  background: #dcfce7;
  border-radius: var(--radius);
  color: var(--success);
  font-weight: 500;
  margin-top: 1rem;
}

.success-message #submit-another-btn {
  display: block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s;
}

.success-message #submit-another-btn:hover {
  background: var(--accent-hover);
}

.success-message[hidden] { display: none !important; }

#ticket-form.hidden { display: none; }

@media (min-width: 480px) {
  .container { padding: 2rem; }
  h1 { font-size: 1.75rem; }
}
