:root {
  /* Base & Background (ミルク・キャンバス系) */
  --bg-color: #f9f6f0;
  /* スチームミルク（全体の背景） */
  --card-bg: #f5ebe0;
  /* オーツミルク（カードの背景） */

  /* Text (エスプレッソ系) */
  --text-color: #3e2723;
  /* 深煎りエスプレッソ（基本の文字色） */

  /* Main Colors (ロースト系) */
  --primary-color: #4e342e;
  /* コーヒー豆（メインの枠線や見出し） */
  --secondary-color: #795548;
  /* モカブレンド（サブの要素やボタン） */

  /* Accents (シロップ・抽出系) */
  --accent-color: #c0a080;
  /* キャラメル（ホバー時の色など） */
  --crema-color: #e6ccb2;
  /* クレマ（テーブルの背景やハイライト） */

  /* Action Colors (機能系) */
  --reset-color: #9e5b5b;
  /* コーヒーチェリー（少し落ち着いた赤：リセット） */
  --leaf-color: #a5a58d;
  /* コーヒーの葉（くすんだ緑：成功メッセージや別アクション） */
  --modern-mint: rgb(174, 194, 181);
}

* {
  /* 統一設定 */
  box-sizing: border-box;
}

/* html {
    font-size: 62.5%;
} */

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text-color);
}

h1 {
  margin-top: -5px;
  margin-bottom: -5px;
}

.card__title {
  font-family: "Times New Roman", Times, serif;
}

.card {
  border-radius: 15px;
  background-color: var(--card-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 10px 10px 10px;
  gap: 15px;
}

.form-box {
  width: 70%;
  border-radius: 10px;
  padding: 10px;
  background-color: var(--crema-color);
  border: 1px solid var(--crema-color);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  align-items: center;

  width: 100%;
}

.input-group__label {
  /* font-weight: bold; */
  font-size: 1rem;
  color: var(--secondary-color);
  margin-bottom: 2px;
}

.input-group__field {
  border-radius: 10px;
  width: 100%;
  max-width: 300px;
  padding: 6px;
  border: 1px solid var(--secondary-color);
  font-family: "Times New Roman", Times, serif;
  font-size: 2rem;
  text-align: center;
}

.input-group__field:invalid {
  border: 2px solid #e57373;
  background-color: #ffebee;
  color: #d32f2f;
  outline: none;
}

.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.controls__group {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 10px;
}

.btn {
  width: 10rem;
  border-radius: 10px;
  padding: 15px;

  border: 1px solid rgb(171, 171, 171);
  font-family: "Times New Roman", Times, serif;
  font-size: 1.3rem;
  color: var(--primary-color);
  transition: background-color 0.2s ease;

  cursor: pointer;
}

.btn--primary {
  color: var(--bg-color);
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn--secondary {
  color: var(--secondary-color);
}

.btn--danger {
  color: var(--reset-color);
  border-color: var(--reset-color);
}

.btn:hover {
  @media (hover: hover) {
    background-color: var(--accent-color);
  }
}

.btn:active {
  background-color: var(--accent-color);
}

/* .btn--short {
    width: 7rem;
    padding: 0.3rem;
    font-size: 1.3rem;
} */

.message-group {
  width: 70%;
  min-height: 4rem;

  border-radius: 10px;
  background-color: rgb(56, 56, 56);

  padding: 15px 20px 15px 20px;

  display: flex;
  flex-direction: column;
  text-align: left;
}

.message-group__text {
  line-height: 130%;
  font-family: "Courier New", Courier, monospace;
  font-size: 90%;
  color: rgb(240, 240, 240);
}

.timer-group {
  margin-top: -0.5rem;
  width: 70%;
  border-radius: 10px;
  background-color: rgb(174, 194, 181);
  padding: 10px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.timer-group__display {
  display: flex;
  background-color: rgb(15, 15, 15);
  width: 65%;
  height: 6rem;
  border-radius: 60px;
  padding: 8px;
  justify-content: center;
  align-items: center;
  color: rgb(220, 95, 9);
  font-family: "Times New Roman", Times, serif;
  font-size: 2.5em;
}

.timer-group__controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 30px;
}

.btn--timer-start-stop {
  height: 4rem;
  width: 7rem;
  text-align: center;
  font-size: 2rem;
  color: var(--bg-color);
  background-color: var(--secondary-color);
}

.btn--timer-reset {
  margin: 10px;
  height: 3rem;
  width: 6rem;
  border-radius: 50%;
  padding: 5px;
  text-align: center;
  font-size: 1.3rem;
  color: var(--reset-color);
}

.table-group {
  font-family: "Times New Roman", Times, serif;
  width: 70%;
  min-height: 300px;
  border-radius: 10px;
  background-color: var(--crema-color);
  border: 1px solid rgb(171, 171, 171);

  padding: 20px 15px 40px 15px;
  text-align: center;
}

.table-group__caption {
  margin-bottom: 15px;
  font-size: 1.6rem;
  font-weight: bold;
  font-family: "Times New Roman", Times, serif;
}

.table-group__table {
  width: 100%;

  border-collapse: separate;
  border-spacing: 0;

  border-radius: 10px;
  border: 1px solid var(--primary-color);

  font-size: 1.5rem;
  overflow: hidden;
}

.table-group__header,
.table-group__table td {
  border-right: 1px solid var(--primary-color);
  border-bottom: 1px solid var(--primary-color);
  /* 行高さ */
  padding: 10px;
}

.table-group__header:last-child,
.table-group__table td:last-child {
  border-right: none;
}

.table-group__table tr:last-child td {
  /* rowの底辺の指定 */
  border-bottom: none;
}

.editor-group {
  width: 70%;
  background-color: var(--modern-mint);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: large;
}

.editor-group__title {
  font-size: 1.6rem;
  font-weight: bold;
  font-family: "Times New Roman", Times, serif;
}

.editor-header,
.editor-body {
  width: 100%;
  /* padding: 10px; */
}

.editor-row {
  width: 100%;
  min-height: 3rem;
  /* background-color: var(--modern-mint); */
  /* background-color: rgb(194, 105, 105); */
  display: grid;
  grid-template-columns: 0.5fr 1fr 1fr 1fr 0.9fr;
  /* flex-direction: row;
    justify-content: center; */
  gap: 5px;
  margin-top: 10px;
}

.editor-cell {
  border-radius: 10px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 5px;
  background-color: var(--bg-color);
}

.editor-cell__field {
  width: 80%;
  min-height: 2rem;
  border-radius: 10px;
  border: none;
  padding: 5px;
  background-color: var(--bg-color);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.3rem;
  text-align: center;
}

.btn-delete-step {
  width: 90%;
  height: 70%;
  border-radius: 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-color);
  font-size: 1rem;
}

.btn--add-step,
.btn--add-data,
.btn--reset-step {
  justify-self: center;
  width: 40%;
  height: 2.5rem;
  border-color: var(--leaf-color);
  background-color: var(--bg-color);

  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: 1 / -1;
}

/* 画面幅600px以下の設定 */
@media (max-width: 1000px) {
  .form-box,
  .message-group,
  .timer-group,
  .table-group,
  .editor-group {
    width: 80%;
  }

  .timer-group__display,
  .input-group__field {
    width: 75%;
  }
}
