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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  background: #f5f7fa;
  color: #1e293b;
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

header {
  text-align: center;
  padding: 24px 0 16px;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 0.85rem;
  color: #64748b;
}

/* ===== Form Section ===== */
.form-section,
.result-section {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.form-section h2,
.result-section h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #dbeafe;
}

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

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 5px;
}

input[type="text"],
input[type="number"],
input[type="date"],
textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #1e293b;
  background: #f8fafc;
  transition: border-color 0.2s;
  font-family: inherit;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
}

textarea {
  resize: vertical;
}

/* Price type */
.price-type-row {
  display: flex;
  gap: 20px;
  margin-bottom: 8px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

.radio-label input[type="radio"] {
  width: auto;
  cursor: pointer;
}

.price-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.price-detail input {
  flex: 1;
  min-width: 120px;
}

.arrow {
  color: #64748b;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.unit {
  font-size: 1rem;
  color: #475569;
  font-weight: 600;
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

/* Buttons */
.btn-generate {
  width: 100%;
  padding: 13px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}

.btn-generate:hover {
  background: #1d4ed8;
}

.btn-generate:active {
  background: #1e40af;
}

.btn-clear {
  display: block;
  width: 100%;
  padding: 10px;
  background: none;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  margin-bottom: 32px;
  transition: all 0.2s;
}

.btn-clear:hover {
  color: #ef4444;
  border-color: #fca5a5;
  background: #fff5f5;
}

/* Result */
.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.result-header h2 {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.btn-copy {
  padding: 7px 16px;
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-copy:hover {
  background: #059669;
}

.result-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  font-size: 0.92rem;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.8;
  color: #1e293b;
  min-height: 120px;
}

.copy-feedback {
  text-align: center;
  color: #10b981;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 8px;
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.3rem;
  }

  .price-detail {
    flex-direction: column;
    align-items: stretch;
  }

  .arrow {
    text-align: center;
  }
}
