/* iPlus Contract — フォームスタイル */

/* ── ラッパー ── */
.ips-form-wrap {
  max-width: 720px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans JP', sans-serif;
  color: #222;
  font-size: 15px;
}

/* ── ステップインジケーター ── */
.ips-steps {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.ips-step {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 4px;
  background: #f0f0f0;
  color: #999;
  font-size: 13px;
  white-space: nowrap;
  min-width: 80px;
}

.ips-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ccc;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.ips-step.active {
  background: #e8f5ee;
  color: #1a6e4a;
  font-weight: 600;
}
.ips-step.active span { background: #1a6e4a; }

.ips-step.done {
  background: #f5f5f5;
  color: #666;
}
.ips-step.done span {
  background: #27ae60;
  color: #fff;
}
.ips-step.done span::after { content: '✓'; }
.ips-step.done .step-num   { display: none; }

/* ── 通知 ── */
.ips-notice {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  border-left: 4px solid #e74c3c;
  background: #fdf3f2;
  color: #c0392b;
  font-size: 14px;
}
.ips-notice--success {
  border-color: #27ae60;
  background: #eafaf1;
  color: #1d7a42;
}

/* ── ステップコンテンツ ── */
.ips-step-content h2 {
  font-size: 20px;
  color: #1a6e4a;
  margin-top: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid #e0f0e8;
  padding-bottom: 8px;
}

/* ── フィールドグリッド ── */
.ips-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 520px) {
  .ips-field-grid { grid-template-columns: 1fr; }
}

.ips-field { display: flex; flex-direction: column; gap: 4px; }
.ips-field-full { grid-column: 1 / -1; }

.ips-field label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.ips-field input[type="text"],
.ips-field input[type="email"],
.ips-field input[type="tel"],
.ips-field input[type="date"],
.ips-field input[type="number"],
.ips-field select,
.ips-field textarea {
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 9px 12px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  transition: border-color .2s;
}

.ips-field input:focus,
.ips-field select:focus {
  outline: none;
  border-color: #1a6e4a;
  box-shadow: 0 0 0 3px rgba(26,110,74,.12);
}

.required { color: #e74c3c; margin-left: 2px; }

.ips-small {
  font-size: 12px;
  color: #777;
  margin: 4px 0 0;
  line-height: 1.5;
}

/* ── ボタン ── */
.ips-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, opacity .2s;
  background: #1a6e4a;
  color: #fff;
}
.ips-btn:hover  { background: #135438; }
.ips-btn:disabled { opacity: .55; cursor: not-allowed; }

.ips-btn-primary {
  background: #1a6e4a;
  font-size: 16px;
  padding: 13px 28px;
}
.ips-btn-primary:hover { background: #135438; }

.ips-btn-sub {
  background: #f0f0f0;
  color: #444;
}
.ips-btn-sub:hover { background: #e0e0e0; }

.ips-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ── 認証済みメール ── */
.ips-verified-email {
  font-size: 13px;
  color: #555;
  margin-bottom: 16px;
}

/* ── 学年フィルター ── */
.ips-grade-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ips-grade-btn {
  padding: 6px 14px;
  border: 2px solid #ccc;
  border-radius: 20px;
  background: #fff;
  color: #555;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
}
.ips-grade-btn.active,
.ips-grade-btn:hover {
  border-color: #1a6e4a;
  background: #1a6e4a;
  color: #fff;
}

/* ── 科目チェックボックス ── */
.ips-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.ips-checkbox-group label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: normal;
  font-size: 14px;
  cursor: pointer;
  color: #333;
}
.ips-checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1a6e4a;
  cursor: pointer;
}

/* ── 料金カード ── */
.ips-pricing-card {
  background: #f4fbf7;
  border: 2px solid #a8d5b8;
  border-radius: 10px;
  padding: 20px 22px;
  margin-top: 20px;
}
.ips-pricing-card h3 {
  margin: 0 0 14px;
  font-size: 17px;
  color: #1a6e4a;
}
.ips-pricing-card h4.ips-initial-head {
  margin: 12px 0 8px;
  font-size: 14px;
  color: #444;
}

.ips-monthly-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 10px;
  border: 1px solid #c8e8d4;
}
.ips-monthly-info span { font-size: 13px; color: #555; }
.ips-monthly-info strong { font-size: 18px; color: #1a6e4a; }

.ips-pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ips-pricing-table td {
  padding: 7px 4px;
  border-bottom: 1px solid #d6eee0;
  color: #333;
}
.ips-pricing-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ips-pricing-table .ips-total-row td {
  border-bottom: none;
  border-top: 2px solid #1a6e4a;
  font-weight: 700;
  font-size: 16px;
  padding-top: 10px;
}
.ips-campaign-row {
  color: #27ae60;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 4px;
}

.ips-next-payment {
  margin-top: 14px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #c8e8d4;
  border-radius: 6px;
  font-size: 13px;
  color: #333;
  line-height: 1.6;
}

.ips-payment-note {
  margin-top: 10px;
  font-size: 12px;
  color: #666;
}

/* ── 規約ボックス ── */
.ips-terms-box {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 16px 18px;
  max-height: 360px;
  overflow-y: auto;
  background: #fafafa;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.ips-terms-box h3 {
  font-size: 15px;
  color: #1a6e4a;
  margin-top: 0;
}

/* ── 同意チェック ── */
.ips-agreements {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.ips-check-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
}
.ips-check-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #1a6e4a;
  cursor: pointer;
}

/* ── 署名キャンバス ── */
.ips-signature-block {
  margin-bottom: 20px;
}
.ips-signature-block label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  display: block;
  margin-bottom: 4px;
}
.ips-canvas-wrapper {
  border: 2px solid #aaa;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 8px;
  touch-action: none;
  cursor: crosshair;
}
#ips-signature-canvas {
  display: block;
  width: 100%;
}

/* ── 完了画面 ── */
.ips-complete {
  text-align: center;
  padding: 32px 16px;
}
.ips-complete-icon {
  font-size: 52px;
  margin-bottom: 12px;
}
.ips-complete h2 {
  font-size: 22px;
  color: #1a6e4a;
  margin-bottom: 16px;
}
.ips-complete p {
  font-size: 15px;
  color: #333;
  margin-bottom: 12px;
}
