:root {
  --bg: #f5f7fb;
  --card-bg: #ffffff;
  --accent: #4c6fff;
  --accent-soft: #e0e7ff;
  --border: #d0d7e2;
  --text-main: #1f2933;
  --text-sub: #6b778c;
  --danger: #e02424;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 4px;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #eef2ff 0, #f9fafb 40%, #f5f7fb 100%);
  color: var(--text-main);
}

.wrapper {
  max-width: 900px;
  margin: 32px auto;
  padding: 0 16px 32px;
}

.card {
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  padding: 24px 24px 28px;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.header-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff, #c7d2fe);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.25);
  flex-shrink: 0;
}

.header-icon span {
  font-size: 20px;
}

h1 {
  font-size: 20px;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.subtitle {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 4px;
}

.note {
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-sub);
  border: 1px dashed #cbd5e1;
  margin-bottom: 14px;
  line-height: 1.6;
}

.note strong {
  color: #111827;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #111827;
}

.section-title span {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.title-margin {
  margin-top: 12px;
}

textarea {
  width: 100%;
  min-height: 150px;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  resize: vertical;
  outline: none;
  background: #f9fafb;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  line-height: 1.5;
  white-space: pre;
}

textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(76, 111, 255, 0.3);
  background: #ffffff;
}

textarea::placeholder {
  color: #9ca3af;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 10px;
  font-size: 12px;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  cursor: pointer;
}

.radio-label input[type="radio"] {
  accent-color: var(--accent);
}

.note-small {
  color: #666;
  margin-left: 4px;
}

.button-row {
  display: flex;
  gap: 8px;
  margin: 10px 0 8px;
  flex-wrap: wrap;
}

button {
  border-radius: 999px;
  border: none;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.12s ease, opacity 0.1s ease;
  font-weight: 500;
  white-space: nowrap;
}

button span.icon {
  font-size: 15px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.45);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.55);
}

.btn-secondary {
  background: #e5edff;
  color: #1f2937;
  box-shadow: 0 4px 12px rgba(148, 163, 184, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(148, 163, 184, 0.4);
}

button:active {
  transform: translateY(0);
  box-shadow: none;
}

.status {
  font-size: 12px;
  margin: 4px 0 0;
  min-height: 18px;
  color: var(--text-sub);
}

.status.ok {
  color: #15803d;
}

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

.footer-note {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-sub);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

/* 追加されたフッター用スタイル */
.app-footer {
  margin-top: 30px;
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.5;
}

.app-footer p {
  margin: 0;
}

@media (max-width: 640px) {
  .card {
    padding: 18px 16px 20px;
  }
  .header {
    align-items: flex-start;
  }
  h1 {
    font-size: 18px;
  }
  .button-row {
    flex-direction: column;
    align-items: stretch;
  }
  button {
    justify-content: center;
    width: 100%;
  }
  textarea {
    min-height: 130px;
  }
}