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

:root {
  --primary: #EF7A00;
  --primary-light: #E58D1A;
  --primary-rgb: 239, 122, 0;
  --text: #333;
  --text-muted: #666;
  --border: #e0e0e0;
  --bg: #f8f9fa;
  --white: #fff;
  --error: #dc3545;
  --success: #28a745;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

/* Header */
header {
  background: var(--primary);
  color: var(--white);
  padding: 16px 24px;
}

.header-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--white);
  text-decoration: none;
}

/* Main */
main {
  flex: 1;
  padding: 24px 24px;
}

.container {
  max-width: 640px;
  margin: 0 auto;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--primary);
}

.page-title.center {
  text-align: center;
}

.page-description {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.page-description.center {
  text-align: center;
  margin-bottom: 40px;
}

/* Card Grid (Service/Form Selection) */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 560px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.card-link {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding: 32px 24px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card-link:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.card-icon {
  width: 56px;
  height: 56px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.card-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--primary);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.card-description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Form Card */
.card {
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding: 32px;
}

.section {
  margin-bottom: 32px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

label {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

/* Badge labels */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.4;
}

.badge-required {
  background: none;
  color: var(--error);
  font-size: 10px;
  font-weight: 500;
  padding: 0;
}

.badge-optional {
  background: var(--border);
  color: var(--text-muted);
}

/* Breadcrumb */
.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb .separator {
  margin: 0 6px;
}

/* Submit area */
.submit-area {
  margin-top: 24px;
}

.submit-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 12px;
}

.submit-note a {
  color: var(--primary);
  text-decoration: underline;
}

.required::after {
  content: none;
}

.hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

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

.submit-btn {
  width: 100%;
  padding: 14px 24px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 12px;
}

.submit-btn:hover {
  background: var(--primary-light);
}

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

/* Checkbox Group */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

/* File Input */
.file-input {
  padding: 8px 0;
  border: none;
  font-size: 14px;
}

/* Messages */
.message {
  padding: 14px 16px;
  border-radius: 6px;
  margin-bottom: 24px;
  font-size: 14px;
  display: none;
}

.message.show {
  display: block;
}

.message.success {
  background: #d4edda;
  color: #155724;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
}

/* Loading */
.loading {
  display: none;
  text-align: center;
  padding: 48px 24px;
}

.loading.show {
  display: block;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: var(--text-muted);
  font-size: 14px;
}

/* Footer */
footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
}

.copyright {
  color: #999;
  font-size: 12px;
}
