:root {
  --bottom-panel-height: calc(110px + env(safe-area-inset-bottom, 0px));
}

body {
  margin: 0;
  font-family: sans-serif;
  background-color: #000;
  color: white;
  padding-bottom: 130px;
  text-align: center;
}

button,
a,
select,
input,
[role="button"] {
  touch-action: manipulation;
}

header {
  position: relative;
}

.main-header {
  position: relative;
}

.main-title {
  text-align: center;
  margin: 0;
  line-height: 60px;
}

.feedback-link {
  position: absolute;
  top: 16px;
  right: 24px;
}

.feedback-link img {
  width: 24px;
}

h1 {
  font-size: 24px;
  margin-top: 16px;
  margin-bottom: 8px;
  line-height: 1.2;
}

.top-container {
  position: sticky;
  top: 0;
  z-index: 90; /* 画面下部の設定エリア（z-index: 99）やフッターボタン（z-index: 100）の下 */
  background-color: #f8f8f8; /* タイマーと同色の不透明背景で裏側を隠す */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* スクリール時に境界線として浮き上がらせる */
  border-bottom: 1px solid #e0e0e0;
}

#timer-display {
  font-size: 80px;
  margin-top: 0px;
  margin-bottom: 0px;
  padding: 16px 0;
  font-weight: bold;
  color: #1a1a1a;
  background-color: #f8f8f8; /* 公開サイトの明るいグレーに近い色 */
}

.control-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.control-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  font-size: 24px;
}

.control-group button {
  width: 32px;
  height: 32px;
  font-size: 18px;
  background-color: #444;
  color: white;
  border: none;
  border-radius: 4px;
}

.recipe-section {
  margin-top: 24px;
  margin-bottom: 0;
}

.recipe-section__heading {
  margin-top: 8px;
  margin-bottom: 4px;
  font-size: 20px;
}

.recipe-container {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 4px;
  padding-bottom: calc(135px + var(--bottom-panel-height));
  padding-left: 12vw;
  padding-right: 12vw;
  box-sizing: border-box;
  transition: padding-bottom 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.recipe-card {
  min-width: 300px;
  max-width: 340px;
  flex: 0 0 auto;
  scroll-snap-align: center;
  background: #181818;
  border-radius: 12px;
  margin: 0 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  padding: 16px;
}

.recipe-card h3 {
  margin-top: 0;
  font-size: 18px;
  text-align: center;
  padding: 0 48px; /* 左右のアクションボタン（左：履歴、右：コピー）と重ならないように */
}

.recipe-card.custom-recipe h3 {
  padding: 0 48px; /* 左上（履歴1個）と右上（三点リーダー1個）と重ならないように */
}

.recipe-card ul {
  padding-left: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}

.recipe-card li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 12px; /* バーを表示するための余白 */
  max-width: 100%;
  white-space: normal;
  transition: all 0.2s ease;
}

.recipe-card li.active {
  font-weight: bold;
  color: #fff;
}

.recipe-card li.active::before,
.recipe-card li.blink::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 4px;
  background: #f59e0b; /* アクセントのオレンジ */
  border-radius: 2px;
}

.recipe-card li.blink::before {
  animation: blink-step 1s infinite;
}

@keyframes blink-step {
  0%, 49.9% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.recipe-card li strong {
  display: inline-block;
  min-width: 45px;
  margin-right: 8px; /* 時間と説明の間の余白 */
  color: #fff;
}

/* レシピ切り替えタブ */
.recipe-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 8px;
}

.tab-btn {
  background: transparent;
  border: 1px solid #374151; /* 公開サイトの非アクティブボタンに近い色 */
  color: #9ca3af;
  padding: 8px 20px;
  border-radius: 20px; /* より丸みのあるデザイン */
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn.active {
  background: transparent;
  border-color: #f59e0b; /* アクセントのオレンジ */
  color: #f59e0b;
}

/* レシピグループ（タブごとの表示制御） */
.recipe-group {
  display: none;
  width: 100%;
}

.recipe-group.active {
  display: flex;
  gap: 4px;
}

.recipe-card {
  position: relative;
}

/* アクションボタン（デフォルトは標準レシピ用の絶対配置） */
/* アクションボタン（左上：履歴ボタン用） */
.recipe-card__actions-left {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 8px;
}

/* アクションボタン（右上：コピー・編集・削除用） */
.recipe-card__actions-right {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 8px;
}

.recipe-card__btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #ddd;
  font-size: 16px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.recipe-card__btn--history,
.recipe-card__btn--more {
  width: 38px;
  height: 38px;
}

.recipe-card__btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.recipe-card__btn:active {
  transform: translateY(0);
}

.recipe-card__btn--delete:hover {
  color: #fff;
  background: rgba(255, 82, 82, 0.8);
  border-color: #ff5252;
}

/* カスタムレシピ モーダル内のステップ行 */
.custom-step-row {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1); 
  border-radius: 16px;
  padding: 40px 20px 20px; /* 余白をさらに広げて重なりを防止 */
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background 0.2s;
}

.step-index {
  position: absolute;
  top: 10px;
  left: 16px;
  font-size: 11px;
  font-weight: 600;
  color: #888;
  letter-spacing: 0.5px;
}

.custom-step-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* 削除ボタン：右上の赤い円形ボタン */
.custom-step-remove {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 26px;
  height: 26px;
  background: #ff5252 !important;
  border: 1px solid #fff !important;
  color: #fff !important;
  border-radius: 50% !important;
  font-size: 16px !important;
  font-weight: bold !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.5);
  z-index: 20;
  transition: transform 0.2s, background 0.2s;
  padding: 0;
  line-height: 1;
}

.custom-step-remove:hover {
  background: #ff1744 !important;
  transform: scale(1.1);
}

/* 合計表示の文字（大きくする） */
#custom-weight-sum {
  font-size: 14px !important;
  font-weight: 500;
  color: #fff;
}

/* ステップのコンテナ */
#custom-steps-container {
  padding: 12px 12px 20px; /* 削除ボタンのはみ出し分をカバー */
  max-height: 400px;
  overflow-y: auto;
}

/* 時間と注入量の並び（グリッドで安定化） */
/* ヘッダー行 */
.custom-steps-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px; /* ステップ行のパディングに合わせる */
  margin-bottom: 4px;
}

.custom-steps-header span {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.input-group {
  display: flex;
  flex-direction: column;
}

.input-group.full-width {
  width: 100%;
}

.custom-step-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin-top: 8px; /* 番号表示エリアとのスペースを確保 */
}

.step-total-display {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
  text-align: right;
  padding-right: 4px;
}

.time-adjust-placeholder {
  width: 40px; /* .time-adjust の幅に合わせる */
  height: 42px;
}

/* 時間入力：[-] 0:00 [+] */
.time-input-container {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid #374151;
  border-radius: 12px;
  overflow: hidden;
  height: 44px;
  margin-top: 4px;
}

.time-adjust {
  background: #222;
  border: none;
  color: #fff;
  width: 40px;
  height: 100%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.time-adjust:hover { background: #333; }

.input-time {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  text-align: center;
  font-size: 16px;
  font-family: inherit;
  width: 100%;
}

.input-time:focus { outline: none; }

.input-g, .input-desc {
  background: rgba(0, 0, 0, 0.4); 
  border: 1px solid #374151;
  border-radius: 12px;
  color: #fff;
  padding: 12px;
  font-size: 15px;
  font-family: inherit;
  margin-top: 4px;
  box-sizing: border-box;
  width: 100%;
  transition: all 0.2s;
}

.input-g:focus, .input-desc-editable:focus {
  border-color: #f59e0b;
  background: rgba(0, 0, 0, 0.6);
  outline: none;
}

.input-desc-editable {
  min-height: 70px;
  background: rgba(0, 0, 0, 0.4); 
  border: 1px solid #374151;
  border-radius: 12px;
  color: #fff;
  padding: 12px;
  font-size: 15px;
  font-family: inherit;
  margin-top: 4px;
  box-sizing: border-box;
  width: 100%;
  transition: all 0.2s;
  line-height: 1.6;
  outline: none;
  word-break: break-all;
  white-space: pre-wrap;
}

.input-desc-editable:empty:before {
  content: attr(placeholder);
  color: #555;
  pointer-events: none;
}

.weight-chip {
  display: inline-flex;
  align-items: center;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #f59e0b;
  color: #f59e0b;
  padding: 0 6px;
  border-radius: 6px;
  font-weight: 600;
  margin: 0 2px;
  font-size: 0.9em;
  vertical-align: baseline;
  user-select: none;
}

.desc-helpers {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.helper-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #374151;
  color: #9ca3af;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 2px;
}

.helper-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #f59e0b;
  color: #fff;
}

.helper-btn .val {
  color: #f59e0b;
  font-weight: 600;
}

.percentage-badge {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #ff9800;
  pointer-events: none;
  background: rgba(0,0,0,0.6);
  padding: 2px 4px;
  border-radius: 4px;
}

.input-g {
  width: 100%;
  background: #000;
  border: 1px solid #333;
  color: #fff;
  height: 42px;
  padding: 0 45px 0 12px; /* 右側にバッジ用の余白を確保 */
  border-radius: 8px;
  font-size: 16px;
  margin-top: 4px;
  box-sizing: border-box;
}


/* Step details moved and consolidated at the top */

/* ===== 4:6メソッド セレクター ===== */
.recipe-46-selectors {
  margin: 12px 0 8px;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.recipe-46-selectors .selector-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 8px;
}

.recipe-46-selectors .selector-group:last-child {
  margin-bottom: 0;
}

.recipe-46-selectors .selector-label {
  font-size: 11px;
  color: #888;
  letter-spacing: 0.5px;
  margin-left: 2px;
}

.recipe-46-selectors .selector-buttons {
  display: flex;
  gap: 4px;
  width: 100%;
}

.recipe-46-selectors .selector-btn {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  padding: 8px 10px;
  font-size: 12px;
  border: 1px solid #374151;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  outline: none;
}

.recipe-46-selectors .selector-btn:hover {
  border-color: #f59e0b;
  color: #fff;
}

.recipe-46-selectors .selector-btn.active {
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
  color: #f59e0b;
  font-weight: 600;
}

.water-amount-section {
  position: fixed;
  bottom: var(--bottom-panel-height); /* スタートボタン (.bottom-buttons) と重ならないように底上げ */
  left: 0;
  right: 0;
  height: 135px; /* プラマイボタンの位置がずれないよう高さを固定 */
  box-sizing: border-box;
  background: #0d0d0d; /* カード背景より暗いほぼ黒 */
  padding: 12px 0 0;
  margin: 0;
  border-top: 1px solid #222;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.6);
  z-index: 99; /* .bottom-buttons (z-index: 100) のすぐ下 */

  /* スライドイン・アウトのアニメーション用初期状態 */
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
  text-align: center;
}

.water-amount-section__heading {
  margin-top: 8px;
  margin-bottom: 0;
  font-size: 20px;
}

.water-amount-display {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 4px;
}

.water-amount-controls {
  display: flex;
  justify-content: center;
  gap: 48px;
}

.control-label {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.control-btn {
  background: #222;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  margin: 0 4px;
}

.control-value {
  font-size: 1.5rem;
  margin: 0 4px;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bottom-buttons {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-panel-height);
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  gap: 24px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); /* 下部の余白を元の12pxに差し戻し */
  background: #0d0d0d; /* 設定セクションと同じ不透明なほぼ黒 */
  align-items: flex-end; /* ボタンを下寄せにし、設定パネルとの距離を元の間隔に戻す */
  pointer-events: none;
  z-index: 100;
}

.bottom-buttons button {
  pointer-events: auto;
  width: 72px;
  height: 72px;
  border: none;
  background: #222;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.bottom-buttons button.save-record-btn-corner {
  position: absolute;
  right: 16px;
  bottom: calc(21px + env(safe-area-inset-bottom, 0px)); /* 再生ボタン等の垂直中心（下から48px + env）に合わせる */
  width: 54px;
  height: 54px;
  font-size: 24px;
  color: #fff;
}

.bottom-buttons button img {
  width: 36px;
  height: 36px;
  filter: brightness(0) invert(1);
}



/* Records List */
.records-section { max-width: 600px; margin: 0 auto; }
.records-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.records-header-back { text-decoration: none; font-size: 24px; color: #9cf; }
.records-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.record-item { background: #111; border: 1px solid #222; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; text-align: left; }
.record-item__top { padding: 12px 16px; background: #1a1a1a; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #222; }
.record-item__date { font-size: 12px; color: #888; }
.record-item__stars { font-size: 14px; color: #f5a623; }
.record-item__content { padding: 16px; }
.record-item__recipe { font-size: 17px; font-weight: 700; margin: 0 0 8px 0; }
.record-item__details { display: flex; gap: 16px; font-size: 13px; color: #aaa; margin-bottom: 12px; }
.record-item__memo { font-size: 14px; color: #ccc; background: #181818; padding: 10px; border-radius: 8px; margin: 8px 0 0 0; white-space: pre-wrap; }
.record-item__footer { padding: 8px 16px; background: #0d0d0d; display: flex; justify-content: flex-end; }
.record-item__actions { display: flex; gap: 16px; }
.record-item__actions button { 
  background: rgba(255, 255, 255, 0.08); 
  border: 1px solid rgba(255, 255, 255, 0.12); 
  border-radius: 8px;
  font-size: 16px; 
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer; 
  color: #aaa; 
  transition: all 0.2s ease; 
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.record-item__edit-btn:hover { 
  color: #fff; 
  background: rgba(255, 255, 255, 0.2); 
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.record-item__delete-btn:hover { 
  color: #fff; 
  background: rgba(255, 82, 82, 0.8); 
  border-color: #ff5252;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.record-item__actions button:active {
  transform: translateY(0);
}

/* Modal Styles */
.record-modal { 
  position: fixed; 
  inset: 0; 
  background: rgba(0, 0, 0, 0.4); /* より透過させる */
  backdrop-filter: blur(10px); /* 公開サイトのグラスモーフィズム */
  -webkit-backdrop-filter: blur(10px);
  display: flex; 
  align-items: center; 
  justify-content: center; 
  z-index: 1000; 
  padding: 20px; 
  text-align: left; 
}

.record-modal__content { 
  background: rgba(26, 26, 26, 0.8) !important; /* 半透明 */
  border: 1px solid rgba(255, 255, 255, 0.1); /* 微細な境界線 */
  border-radius: 20px; 
  width: 100%; 
  max-width: 400px; 
  padding: 32px; 
  box-sizing: border-box; 
  max-height: 90vh; 
  overflow-y: auto; 
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.record-modal__title { font-size: 20px; font-weight: bold; margin: 0 0 24px 0; color: #fff; text-align: center; }
.record-modal__field { margin-bottom: 20px; display: flex; flex-direction: column; gap: 6px; }
.record-modal__field label { font-size: 12px; color: #9ca3af; font-weight: 500; }
.record-modal__value { font-size: 16px; font-weight: bold; color: #fff; }
.record-modal__textarea { 
  width: 100%; 
  background: rgba(0, 0, 0, 0.2); 
  border: 1px solid #374151; 
  border-radius: 12px; 
  padding: 12px; 
  color: #fff; 
  font-family: inherit; 
  font-size: 14px; 
  box-sizing: border-box; 
  resize: vertical; 
  transition: border-color 0.2s;
}

.record-modal__textarea:focus { border-color: #f59e0b; outline: none; }

.record-modal__actions { display: flex; gap: 12px; margin-top: 32px; }
.record-modal__actions button { 
  flex: 1; 
  padding: 14px; 
  border: none; 
  border-radius: 12px; 
  font-size: 16px; 
  font-weight: 600; 
  cursor: pointer; 
  transition: transform 0.1s, filter 0.2s;
}

.record-modal__actions button:active { transform: scale(0.98); }

.record-modal__cancel { background: #374151; color: #fff; }
.record-modal__save { background: #f59e0b; color: #fff; }
.record-modal__status { margin-top: 16px; font-size: 13px; color: #9ca3af; text-align: center; }

.record-modal__add-photo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed #374151;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  box-sizing: border-box;
}

.record-modal__add-photo-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #f59e0b;
}

.record-modal__add-photo-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #374151;
  background: rgba(255, 255, 255, 0.02);
}

.modal-photo-preview-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.modal-photo-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #374151;
  flex-shrink: 0;
}

.modal-photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-photo-preview-item .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  border: none;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}


.star-rating {
  font-size: 36px;
  color: #444;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}
.star-rating .star {
  display: inline-block;
  padding: 4px;
}
.star-rating .star.active {
  color: #ffb400;
}


/* --- Recipe History Filter & Summary Cards --- */

.recipe-filter-container {
  position: relative;
  margin-bottom: 20px;
  width: 100%;
}

/* スクロールエリアのフェードグラデーション効果（右端をフェードアウト） */
.recipe-filter-container::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to right, transparent, #0a0a0a);
  pointer-events: none;
  z-index: 2;
}

.recipe-filter-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 40px 8px 0; /* 右側はフェードマスク用にパディングをあける */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* スクロールバーの非表示（Firefox/Chrome用） */
.recipe-filter-scroll::-webkit-scrollbar {
  display: none;
}
.recipe-filter-scroll {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* フィルターチップ */
.filter-chip {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #aaa;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.filter-chip:active {
  transform: translateY(0);
}

/* アクティブ状態のフィルターチップ */
.filter-chip.active {
  background: rgba(122, 92, 58, 0.35); /* シックなブロンズ */
  border-color: rgba(245, 158, 11, 0.5); /* ゴールド境界 */
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.filter-chip .chip-count {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: bold;
  margin-left: 6px;
  color: #888;
  transition: all 0.2s ease;
}

.filter-chip:hover .chip-count {
  color: #ccc;
  background: rgba(255, 255, 255, 0.15);
}

.filter-chip.active .chip-count {
  background: rgba(245, 158, 11, 0.25);
  color: #f59e0b;
}

/* 統計サマリーカード */
.recipe-summary-card {
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.6), rgba(13, 13, 13, 0.8));
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* フェードインアニメーション */
.recipe-summary-card.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.recipe-summary-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
}

.recipe-summary-card__icon {
  font-size: 18px;
  color: #f59e0b;
}

.recipe-summary-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.recipe-summary-card__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  text-align: center;
}

.recipe-summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.recipe-summary-stat__label {
  font-size: 10px;
  color: #777;
  font-weight: 500;
  text-transform: uppercase;
}

.recipe-summary-stat__value {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-top: 4px;
}

#recipe-summary-rating {
  color: #f59e0b;
}

/* 全体リセットボタン */
.reset-all-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #333;
  color: #aaa;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  display: block;
  text-align: center;
  box-sizing: border-box;
}

.reset-all-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: #f59e0b; /* アクセントのオレンジ */
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

.reset-all-btn:active {
  transform: scale(0.98);
}

/* 湯量とリセットボタンを含むヘッダーの横並び設定 */
.water-amount-header {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 0 16px;
  box-sizing: border-box;
}

.water-amount-header #reset-all-container {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  display: flex;
  align-items: center;
}

/* 枠で囲ったコンパクトなリセットボタン */
.reset-link-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #333;
  color: #aaa;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.reset-link-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: #f59e0b; /* アクセントのオレンジ */
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.reset-link-btn:active {
  transform: scale(0.95);
}

/* 抽出開始（timer-active）されたら、設定セクションをスライドアウトして隠す */
body.timer-active .water-amount-section {
  transform: translateY(200px); /* 135px以上の高さを画面外に押し下げる */
  opacity: 0;
  pointer-events: none;
  /* 消えるときは、出現時(0.3s)よりちょっとゆっくりめの 0.4s に設定 */
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
}

/* 抽出中は、レシピカードの余白をスタートボタン分だけに縮小する */
body.timer-active .recipe-container {
  padding-bottom: var(--bottom-panel-height);
  /* 設定エリアの消失スピードに合わせて 0.4s に上書き */
  transition: padding-bottom 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ドロップダウンメニューの項目用スタイル */
.recipe-card__dropdown-menu .dropdown-item {
  transition: background 0.15s, color 0.15s;
}
.recipe-card__dropdown-menu .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}
.recipe-card__dropdown-menu .dropdown-item:active {
  background: rgba(255, 255, 255, 0.15) !important;
}


