:root {
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --accent-color: #f59e0b;
  --success-color: #10b981;
  --error-color: #ef4444;
  --border-radius: 16px;
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 640px;
  background: var(--card-bg);
  padding: 32px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

header {
  text-align: center;
  margin-bottom: 32px;
}

h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 8px;
  letter-spacing: -0.025em;
}

.subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn-aichi-link {
  display: inline-block;
  background: #eef2ff;
  color: #4f46e5;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid #c7d2fe;
}

.btn-aichi-link:hover {
  background: #4f46e5;
  color: white;
}

.form-section {
  background: #f1f5f9;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.input-container {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 4px;
  transition: border-color 0.2s;
}

.input-container:focus-within {
  border-color: var(--primary-color);
}

.input-container input {
  border: none;
  background: transparent;
  padding: 10px;
  width: 100%;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

/* 矢印（スピンボタン）を非表示にする */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
input[type=number] {
  -moz-appearance: textfield;
}

.unit {
  padding-right: 16px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.btn-step {
  background: #f1f5f9;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--text-main);
  transition: background 0.2s;
}

.btn-step:hover {
  background: #e2e8f0;
}

select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  font-size: 1rem;
  outline: none;
  background: white;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 1.5em;
}

.helper-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.btn-calculate {
  width: 100%;
  padding: 16px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-calculate:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

#result-area {
  margin-top: 32px;
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.result-category {
  margin-bottom: 32px;
}

.category-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-main);
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

.result-card {
  background: white;
  padding: 20px;
  border-radius: var(--border-radius);
  margin-bottom: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.highlight-card {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  color: white;
  border: none;
}

.highlight-card .result-title {
  color: rgba(255, 255, 255, 0.8);
}

.tax-benefit-box {
  margin: 12px 0;
  text-align: center;
}

.benefit-label {
  font-size: 0.85rem;
  opacity: 0.9;
}

.benefit-value {
  font-size: 2.2rem;
  font-weight: 900;
}

.result-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.result-value {
  font-size: 1.2rem;
  font-weight: 800;
}

.amount {
  color: var(--primary-color);
  font-size: 1.8rem;
}

.status-ok { color: var(--success-color); font-weight: 700; }
.status-ng { color: var(--error-color); font-weight: 700; }

/* Grid for many items */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.support-item {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex-shrink: 0;
}

.status-icon.yes { background: #dcfce7; color: #166534; }
.status-icon.no { background: #fee2e2; color: #991b1b; }
.status-icon.maybe { background: #fef3c7; color: #92400e; }

.support-info h4 {
  font-size: 0.85rem;
  margin-bottom: 2px;
}
.support-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.advice-box {
  background: #fffbeb;
  border: 2px solid #fde68a;
  padding: 24px;
  border-radius: 16px;
  margin-top: 32px;
}

.advice-title {
  font-weight: 800;
  color: #92400e;
  margin-bottom: 8px;
}

/* ブログ誘導カード */
.blog-promo-card {
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  padding: 24px;
  border-radius: 20px;
  margin-top: 24px;
  text-align: center;
  transition: transform 0.2s;
}

.blog-promo-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.blog-promo-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-main);
}

.blog-promo-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.btn-blog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s;
}

.btn-blog:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.btn-blog .icon {
  font-size: 1.2rem;
}

.btn-print {
  background: #94a3b8; /* 目立ちすぎないようグレーに */
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.disclaimer {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 40px;
  text-align: center;
}

@media print {
  .no-print, .btn-step, .btn-calculate, header p, .form-section {
    display: none !important;
  }
  body { padding: 0; background: white; }
  .container { box-shadow: none; border: none; max-width: 100%; padding: 0; }
  .support-grid { grid-template-columns: 1fr 1fr; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
