/*
 * ea-forms: サイト共通のフォーム部品(お問い合わせなどで使う)
 *
 *   <form class="ea-form [ea-form--card]">
 *     <div class="ea-field">
 *       <label class="ea-label" for="x">見出し <span class="ea-req">必須</span></label>
 *       <input class="ea-input" id="x"> / <select class="ea-input ea-select"> / <textarea class="ea-input ea-textarea" data-counter="カウンターのid">
 *       <p class="ea-help">補足</p>
 *     </div>
 *     <div class="ea-form__actions"><button class="ea-btn ea-btn--submit">送信</button></div>
 *   </form>
 *   <div class="ea-alert ea-alert--ok|error"><strong>見出し</strong><span>本文</span></div>
 *
 * 文字の大きさは 16px 以上(スマホで入力時に画面が拡大されないように)。
 */

.ea-form { --f-line: #ddd3c2; --f-focus: #ffd85a; --f-bad: #e0563b; display: grid; gap: 24px; margin: 0; font-family: var(--ea-ja); }
.ea-form--card { padding: 32px 36px 36px; background: #fff; border: 1px solid var(--ea-line); border-radius: 28px; box-shadow: 0 18px 40px -30px rgba(31, 42, 68, .45); }

.ea-field { display: grid; gap: 8px; margin: 0; }
.ea-label { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: var(--ea-ink); }
.ea-req { padding: 2px 8px; border-radius: 999px; background: #ffe6de; color: #c2410c; font-size: 11px; font-weight: 800; letter-spacing: .05em; }

.ea-input {
  box-sizing: border-box; width: 100%; min-height: 54px; padding: 14px 18px; margin: 0;
  border: 1.5px solid var(--f-line); border-radius: 16px; background: #fffdf9;
  font: inherit; font-size: 16px; line-height: 1.6; color: var(--ea-ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
.ea-input::placeholder { color: #a8a39a; }
.ea-input:hover { border-color: #c9bda8; }
.ea-input:focus { outline: none; border-color: var(--ea-ink); background: #fff; box-shadow: 0 0 0 4px rgba(255, 216, 90, .55); }
.ea-input:user-invalid { border-color: var(--f-bad); box-shadow: 0 0 0 4px rgba(224, 86, 59, .12); }

.ea-textarea { min-height: 220px; resize: vertical; }
.ea-select {
  padding-right: 48px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231f2a44' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center;
}

.ea-help { margin: 0; font-size: 13px; line-height: 1.7; color: var(--ea-muted); }
.ea-help--row { display: flex; justify-content: space-between; gap: 12px; }
.ea-counter { font-family: var(--ea-en); font-weight: 700; white-space: nowrap; }
.ea-counter.is-over { color: var(--f-bad); }
.ea-note-small { margin: 0; font-size: 13px; line-height: 1.8; color: var(--ea-ink-2); }

.ea-form__actions { display: flex; justify-content: flex-end; }
.ea-btn--submit { min-width: 220px; justify-content: center; padding: 16px 30px; font-size: 16px; }
.ea-btn--submit:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(255, 216, 90, .7); }

/* ボット対策の隠し欄 */
.ea-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.ea-alert { display: grid; gap: 4px; margin: 0 0 22px; padding: 16px 20px; border-radius: 18px; border: 1.5px solid; font-size: 14.5px; line-height: 1.7; }
.ea-alert strong { font-size: 15.5px; font-weight: 800; }
/* 記事本文の段落の余白(.ea-prose p)より優先する */
.ea-form p.ea-help, .ea-form p.ea-note-small, .ea-form p.ea-hp { margin: 0; }
.ea-alert--ok { background: #ecfaf3; border-color: #9fdcc0; color: #0f5c42; }
.ea-alert--error { background: #fff1ec; border-color: #f5b5a2; color: #8a2d14; }

@media (max-width: 600px) {
  .ea-form--card { padding: 22px 18px 24px; border-radius: 22px; }
  .ea-form__actions { justify-content: stretch; }
  .ea-btn--submit { width: 100%; }
}
