.stfc { max-width: 980px; margin: 0 auto; }
.stfc-form { padding: 12px; border: 1px solid #ddd; border-radius: 10px; background: #fff; }

.stfc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: end;
}
@media (max-width: 820px) {
  .stfc-grid { grid-template-columns: 1fr; }
}

.stfc-grid label { display: grid; gap: 6px; font-size: 14px; }
.stfc-grid input, .stfc-grid select {
  width: 100%;
  padding: 10px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
}

.stfc-boundary { grid-column: 1 / -1; padding-top: 6px; }
.stfc-boundary-label { font-weight: 700; margin-bottom: 6px; }
.stfc-boundary-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.stfc-boundary-btn {
  padding: 10px 12px;
  border: 1px solid #bbb;
  background: #f7f7f7;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
}
.stfc-boundary-btn.is-active {
  border-color: #222;
  background: #222;
  color: #fff;
}
.stfc-boundary-note { margin-top: 8px; font-size: 12px; color: #666; }
.stfc-boundary-note.is-warn { color: #b00020; font-weight: 700; }

.stfc-actions { margin-top: 12px; text-align: center; }
.stfc-submit {
  padding: 12px 18px;
  border: 0;
  border-radius: 10px;
  background: #222;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.stfc-result { margin-top: 16px; }
.stfc-loading { padding: 12px; }
.stfc-error { padding: 12px; color: #b00020; font-weight: 700; }

.stfc-warning {
  padding: 12px;
  border: 1px solid #f0c36d;
  background: #fff8e5;
  border-radius: 10px;
  margin-bottom: 14px;
}

.stfc-section { margin: 16px 0; }
.stfc-title { font-weight: 800; font-size: 16px; margin: 0 0 8px; }
.stfc-sub p { margin: 2px 0; font-size: 13px; color: #333; }

.stfc-scrollwrap { position: relative; }
.stfc-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
}
.stfc-scrollhint {
  font-size: 12px;
  color: #666;
  margin-top: 6px;
}

/* テーブル：はみ出し対策（関係タグが表外に漏れない） */
.stfc-table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
}
.stfc-table td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  vertical-align: middle;

  /* 改行/折返し（空亡<br>三合…を潰さない） */
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}
.stfc-table td:first-child {
  position: sticky;
  left: 0;
  background: #fafafa;
  font-weight: 700;
}


.stfc-kanshi-btn {
    cursor: pointer; /* マウスを乗せると指マークになる */
    transition: background-color 0.2s, transform 0.2s;
}
.stfc-kanshi-btn:hover {
    background-color: #ffb7c5; /* ホバーで可愛くピンクに */
    color: #fff;
}
.stfc-kanshi-btn:hover .stfc-kanshi-label {
    color: #fff; /* ホバー時は文字を白抜きに */
}