:root {
  --farmer: #3a7d44;
  --farmer-deep: #1b5e20;
  --buyer: #e65100;
  --buyer-warm: #f57c00;
  --text: #222;
  --muted: #555;
  --line: #e6e0d6;
  --max: 880px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  line-height: 1.7;
  background:
    radial-gradient(1200px 480px at 10% -10%, #fff3e0 0%, transparent 55%),
    radial-gradient(900px 420px at 100% 0%, #fff8e1 0%, transparent 50%),
    #faf7f2;
}
body.is-farmer {
  background:
    radial-gradient(1200px 480px at 10% -10%, #e8f5e9 0%, transparent 55%),
    radial-gradient(900px 420px at 100% 0%, #c8e6c9 0%, transparent 45%),
    #f6faf6;
}

a { color: inherit; }
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: #000;
  color: #fff;
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus { left: 8px; }

.wrap {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 8px;
}
.brand {
  text-decoration: none;
  min-width: 0;
}
.brand-name {
  display: block;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.brand-note {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}

.erich-toggle {
  display: flex;
  flex: 0 0 auto;
  max-width: 280px;
  width: min(100%, 280px);
}
.erich-toggle-btn {
  flex: 1;
  padding: 10px 10px;
  background: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.erich-toggle-btn[data-target="farmer"] {
  border: 2px solid var(--farmer);
  color: var(--farmer);
  border-radius: 8px 0 0 8px;
}
.erich-toggle-btn[data-target="buyer"] {
  border: 2px solid var(--buyer);
  color: var(--buyer);
  border-radius: 0 8px 8px 0;
  margin-left: -2px;
}
.erich-toggle-btn[data-target="farmer"][aria-pressed="true"] {
  background: var(--farmer);
  color: #fff;
}
.erich-toggle-btn[data-target="buyer"][aria-pressed="true"] {
  background: var(--buyer);
  color: #fff;
}
.erich-toggle-btn[data-target="farmer"]:hover:not([aria-pressed="true"]) {
  background: #e8f5e9;
}
.erich-toggle-btn[data-target="buyer"]:hover:not([aria-pressed="true"]) {
  background: #fff3e0;
}

.erich-view[hidden] { display: none; }

.erich-hero {
  text-align: center;
  padding: 2.2em 1.2em 2em;
  border-radius: 14px;
  margin: 12px 0 2em;
}
.erich-hero-farmer {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border: 1px solid #a5d6a7;
}
.erich-hero-buyer {
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  border: 1px solid #ffe082;
}
.erich-hero h1 {
  font-size: clamp(1.35rem, 4.5vw, 1.85rem);
  margin: 0 0 0.45em;
  line-height: 1.35;
}
.erich-hero-farmer h1 { color: #2e7d32; }
.erich-hero-buyer h1 { color: #e65100; }
.erich-hero p {
  font-size: 1.02rem;
  color: var(--muted);
  margin: 0 auto;
  max-width: 34em;
}
.erich-hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 1.25em;
}
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.98rem;
  font-family: inherit;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--buyer);
  color: #fff;
}
.btn-primary:hover { background: #d84300; }
.btn-secondary {
  background: #fff;
  color: var(--buyer);
  border: 2px solid var(--buyer);
}
.btn-secondary:hover { background: #fff3e0; }

.erich-stages { margin-bottom: 2.5em; }
.erich-stages h2,
.erich-section h2 {
  text-align: center;
  font-size: 1.25rem;
  margin: 0 0 1em;
  color: #333;
}
.erich-section h2 {
  padding-bottom: 0.45em;
  border-bottom: 2px solid var(--line);
}
.erich-stage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.erich-stage-card {
  display: block;
  padding: 16px 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  color: #333;
  border-left: 4px solid #4caf50;
}
.erich-stage-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.stage-num { display: block; font-size: 0.75em; color: #888; }
.stage-name { display: block; font-size: 1.05em; font-weight: 700; }
.stage-desc { display: block; font-size: 0.8em; color: #777; margin-top: 4px; }

.erich-section { margin-bottom: 2.5em; }
.erich-buyer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.erich-buyer-card {
  display: block;
  padding: 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
}
.erich-buyer-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.card-icon { font-size: 1.8em; margin-bottom: 8px; }
.card-title { display: block; font-size: 1.08em; font-weight: 700; margin-bottom: 6px; }
.card-desc { display: block; font-size: 0.9em; color: #666; line-height: 1.6; }

.erich-app-banner,
.erich-contact-banner {
  color: #fff;
  padding: 2em 1.4em;
  border-radius: 12px;
  text-align: center;
  margin: 2.5em 0;
}
.erich-app-banner {
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
}
.erich-contact-banner {
  background: linear-gradient(135deg, #e65100 0%, #f57c00 100%);
}
.erich-app-banner h2,
.erich-contact-banner h2 {
  color: #fff;
  font-size: 1.35rem;
  margin: 0 0 0.45em;
  border: none;
  padding: 0;
}
.erich-app-banner p,
.erich-contact-banner p {
  margin: 0 0 1.1em;
  opacity: 0.95;
}
.erich-app-banner a,
.erich-contact-banner a {
  display: inline-block;
  padding: 12px 32px;
  background: #fff;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
}
.erich-app-banner a { color: #1b5e20; }
.erich-contact-banner a { color: #e65100; }

.erich-post-list { list-style: none; padding: 0; margin: 0; }
.erich-post-list li {
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}
.erich-post-list a {
  color: #333;
  text-decoration: none;
  font-weight: 600;
}
.post-cat {
  display: inline-block;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 0.75em;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
}

.erich-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  max-width: 600px;
  margin: 0 auto;
}
.erich-steps li {
  position: relative;
  padding: 0 0 1.5em 50px;
}
.erich-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  background: var(--buyer);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9em;
}
.step-title { font-weight: 700; }
.step-desc { font-size: 0.9em; color: #666; }
.detail-link {
  text-align: center;
  margin-top: 0.5em;
}
.detail-link a {
  color: var(--buyer);
  font-weight: 600;
  text-decoration: none;
}

.site-footer {
  margin-top: 1em;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}
.site-footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin: 0 0 10px;
}

.form-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 560px;
  margin: 0 auto 2.5em;
}
.form-grid { display: grid; gap: 1rem; }
.form-field label,
.form-field .label-like {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.form-field .req { color: var(--buyer); }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font: inherit;
}
.form-field textarea { min-height: 6em; resize: vertical; }
.form-check {
  display: flex;
  gap: 8px 16px;
  flex-wrap: wrap;
}
.form-check label {
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1rem;
  text-align: center;
}
.form-status {
  margin-top: 1rem;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.92rem;
}
.form-status.ok { background: #fff8e1; }
.form-status.warn { background: #fff3e0; }
.btn-block { width: 100%; text-align: center; }

@media (max-width: 600px) {
  .site-header { flex-direction: column; align-items: stretch; }
  .erich-toggle { width: 100%; max-width: none; }
  .erich-stage-grid { grid-template-columns: repeat(2, 1fr); }
  .erich-buyer-grid { grid-template-columns: 1fr; }
  .erich-hero { padding: 1.5em 1em 1.4em; }
  .erich-hero-cta .btn { width: 100%; }
}
