/* ====== ベース設定 ====== */
:root {
  --bg: #fff7fb;
  --fg: #4b3f57;

  --accent: #ff9ecb;        /* かわいいピンク */
  --accent-hover: #ff7fb8;

  --sub-accent: #7de2d1;    /* ミント */
  --border: #f2cfe0;

  --radius: 14px;
  --transition: 0.25s;
}

body {
  background: var(--bg);
  font-family: "Segoe UI", sans-serif;
  padding: 40px;
}

/* ====== ラベル ====== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--fg);
}

/* ====== テキストボックス / パスワード / 数値入力 ====== */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 15px;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-sizing: border-box;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea,
select {
  background: #ffffff;
  border: 2px solid var(--border);
  box-shadow: 0 6px 14px rgba(255, 158, 203, 0.15);
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(165, 180, 252, 0.25);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(74, 115, 255, 0.2);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px rgba(255, 158, 203, 0.35),
    0 0 12px rgba(255, 158, 203, 0.4);
}
/* ====== テキストエリア ====== */
textarea {
  min-height: 120px;
  resize: vertical;
}

/* ====== チェックボックス ====== */
.checkbox-container,
.radio-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 10px;
  margin: 8px 0;
}

input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  position: relative;
  transition: all var(--transition);
}

input[type="checkbox"]:checked {
  border-color: var(--accent);
  background: var(--accent);
}

input[type="checkbox"]:checked::after {
  content: "";
  width: 6px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  position: absolute;
  top: 2px;
  left: 6px;
  transform: rotate(45deg);
}

/* ====== ラジオボタン ====== */
input[type="radio"] {
  border-radius: 50%;
}

input[type="radio"]:checked {
  border-color: var(--accent);
}

input[type="radio"]:checked::after {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
}

/* ====== セレクトボックス ====== */
select {
  background: #fff;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #888 50%),
    linear-gradient(135deg, #888 50%, transparent 50%);
  background-position: calc(100% - 15px) calc(50% - 4px),
      calc(100% - 10px) calc(50% + 3px);
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

select:focus {
  border-color: var(--accent);
}

/* ====== ボタン ====== */
button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

button:hover {
  background: var(--accent-hover);
}

button:active {
  transform: translateY(1px);
}

/* ====== チェックボックス（かわいい主張） ====== */
input[type="checkbox"],
input[type="radio"] {
  background: #fff;
  border: 2px solid var(--border);
}

input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #ff9ecb, #ffc1dd);
  border-color: var(--accent);
}

input[type="radio"]:checked::after {
  background: linear-gradient(135deg, #a5b4fc, #c7d2fe);
}

/* ====== ラジオ（ぷっくり） ====== */
input[type="radio"]:checked::after {
  background: linear-gradient(135deg, #ff9ecb, #ff7fb8);
}

/* ====== セレクト矢印もカラフル ====== */
select {
  background-image:
    linear-gradient(45deg, transparent 50%, #ff9ecb 50%),
    linear-gradient(135deg, #ff9ecb 50%, transparent 50%);
}

/* ====== ボタン（SNS感MAX） ====== */
button {
  background: linear-gradient(135deg, #ff9ecb, #cdb4ff);
  box-shadow: 0 10px 20px rgba(255, 158, 203, 0.45);
  letter-spacing: 0.05em;
}

button:hover {
  background: linear-gradient(135deg, #ff7fb8, #bda7ff);
  transform: translateY(-2px);
}

button:active {
  transform: translateY(1px);
  box-shadow: 0 5px 12px rgba(255, 158, 203, 0.4);
}

/* ====== 見出し ====== */
h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--fg);
  text-align: center;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  position: relative;
}

/* 下のふわっとライン */
h1::after {
  content: "";
  display: block;
  width: 80px;
  height: 6px;
  margin: 12px auto 0;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    var(--accent),
    var(--sub-accent)
  );
  box-shadow: 0 4px 10px rgba(255, 158, 203, 0.4);
}
h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  margin: 36px 0 16px;
  position: relative;
  padding-left: 14px;
}

/* 左のアクセントバー */
h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 60%;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    var(--accent),
    var(--sub-accent)
  );
}
h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  margin: 24px 0 10px;
  position: relative;
  padding-left: 10px;
}

/* ちいさなドット */
h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(255, 158, 203, 0.6);
}
.heading-sub {
  text-align: center;
  font-size: 14px;
  color: #7a6a8a;
  margin-top: -10px;
  margin-bottom: 30px;
}

/* ベーステーブル */
.table-calm-rounded {
  width: auto;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0 4px;
  font-family: "Segoe UI", sans-serif;
  color: var(--fg);
  border-radius: var(--radius); /* テーブル全体の角丸 */
  overflow: hidden; /* 角丸に合わせて中身をクリップ */
  border: 1px solid #f2cfe0; /* 全体枠線 */
}

/* ヘッダー */
.table-calm-rounded th {
  background: #f9cde1;
  color: #4b3f57;
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
  border: none; /* 枠線はテーブル全体で統一 */
}

/* ボディセル */
.table-calm-rounded td {
  background: #fff;
  padding: 10px 12px;
  border-top: 1px solid #f2cfe0; /* 行間の仕切りだけ */
}

/* 行ホバー（控えめ） */
.table-calm-rounded tr:hover td {
  background: #fff0f5;
}

/* 交互行色 */
.table-calm-rounded tr:nth-child(even) td {
  background: #fff5f9;
}


/* 見出し付きテーブル */
/* テーブル本体 */
.table-calm-horizontal {
  width: auto; /* 列幅は内容に合わせる */
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0 4px;
  font-family: "Segoe UI", sans-serif;
  color: var(--fg);
  border-radius: var(--radius); /* 外枠の角丸 */
  overflow: hidden; 
  border: 1px solid #f2cfe0;
}

/* 1行目のヘッダー */
.table-calm-horizontal thead tr th {
  background: #f9cde1; /* 淡いピンク */
  color: #4b3f57;
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
  border: none;
}

/* ボディセル */
.table-calm-horizontal tbody tr td {
  background: #fff;
  padding: 10px 12px;
  border-top: 1px solid #f2cfe0;
}

/* 行ホバー（控えめ） */
.table-calm-horizontal tbody tr:hover td {
  background: #fff0f5;
}

/* 交互行色 */
.table-calm-horizontal tbody tr:nth-child(even) td {
  background: #fff5f9;
}

/* ===== スマホ対応 ===== */
@media (max-width: 768px) {

  body {
    padding: 20px;
  }

  h1 {
    font-size: 20px;
  }

  h2 {
    font-size: 16px;
  }

  input,
  textarea,
  select,
  button {
    font-size: 16px; /* タップしやすさ & iOS対策 */
  }

  /* テーブル横スクロール */
  .table-calm-rounded {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
