* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f5f5f5;
  font-family: sans-serif;
  overflow-y: auto;
}

.container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px;
  position: relative;
  transition: padding-bottom 0.2s;
}

.container.has-bottom-nav {
  padding-bottom: calc(105px + env(safe-area-inset-bottom));
}

#detailPage {
  padding-bottom: 100px;
}

/* =========================
   認証入口画面
========================= */
.auth-page {
  min-height: calc(100vh - 32px);

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px 0;
}

.auth-card {
  width: 100%;

  padding: 30px 22px;

  background: white;
  border-radius: 28px;

  text-align: center;

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.08);
}

.auth-logo {
  width: 72px;
  height: 72px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 0 auto 18px;

  border-radius: 24px;

  background:
    linear-gradient(135deg,
      #ff7043,
      #ff5722);

  color: white;
  font-size: 36px;

  box-shadow:
    0 8px 20px rgba(255, 87, 34, 0.25);
}

.auth-title {
  margin: 0;

  color: #333;
  font-size: 25px;
  font-weight: 900;
}

.auth-description {
  margin: 10px 0 26px;

  color: #888;
  font-size: 13px;
  line-height: 1.7;
}

.auth-choice-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-choice-btn {
  width: 100%;
  min-height: 58px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 12px 16px;

  border: none;
  border-radius: 18px;

  cursor: pointer;

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.auth-choice-btn:active {
  transform: scale(0.98);
}

.auth-choice-btn.primary {
  background:
    linear-gradient(135deg,
      #ff7043,
      #ff5722);

  color: white;

  box-shadow:
    0 7px 16px rgba(255, 87, 34, 0.22);
}

.auth-choice-btn.secondary {
  background: #f7f7f7;
  color: #444;

  border: 1px solid #e8e8e8;
}

.auth-choice-main {
  display: flex;
  align-items: center;
  gap: 12px;

  text-align: left;
}

.auth-choice-icon {
  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  border-radius: 13px;

  background: rgba(255, 255, 255, 0.2);

  font-size: 20px;
}

.auth-choice-btn.secondary .auth-choice-icon {
  background: white;
}

.auth-choice-text strong {
  display: block;

  font-size: 15px;
  font-weight: 900;
}

.auth-choice-text small {
  display: block;

  margin-top: 3px;

  font-size: 10px;
  font-weight: 600;

  opacity: 0.8;
}

.auth-choice-arrow {
  font-size: 24px;
  line-height: 1;
}

.auth-note {
  margin-top: 20px;

  color: #aaa;
  font-size: 10px;
  line-height: 1.6;
}

/* =========================
   新規登録・ログインフォーム
========================= */
.auth-form-page {
  min-height: calc(100vh - 32px);

  display: none;
  align-items: center;
  justify-content: center;

  padding: 20px 0;
}

.auth-form-card {
  width: 100%;
  padding: 26px 22px;

  background: white;
  border-radius: 28px;

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.08);
}

.auth-form-header {
  margin-bottom: 24px;
  text-align: center;
}

.auth-form-icon {
  width: 58px;
  height: 58px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 0 auto 14px;

  border-radius: 20px;

  background:
    linear-gradient(135deg,
      #ff7043,
      #ff5722);

  color: white;
  font-size: 28px;

  box-shadow:
    0 7px 18px rgba(255, 87, 34, 0.22);
}

.auth-form-title {
  margin: 0;

  color: #333;
  font-size: 23px;
  font-weight: 900;
}

.auth-form-description {
  margin: 8px 0 0;

  color: #999;
  font-size: 11px;
  line-height: 1.6;
}

/* 入力欄 */
.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;

  margin: 0 0 7px;

  text-align: left;

  color: #555;
  font-size: 12px;
  font-weight: 800;
}

.auth-field input {
  width: 100%;
  min-height: 52px;

  padding: 13px 14px;

  border: 1px solid #dddddd;
  border-radius: 15px;

  background: #fafafa;
  color: #333;

  font-size: 15px;

  outline: none;

  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.auth-field input:focus {
  background: white;
  border-color: #ff7043;

  box-shadow:
    0 0 0 4px rgba(255, 112, 67, 0.1);
}

.auth-field input.invalid {
  border-color: #e53935;
  background: #fff8f8;
}

/* 入力条件 */
.auth-input-note {
  display: block;

  margin-top: 6px;

  color: #999;
  font-size: 10px;
  line-height: 1.5;
}

/* エラーメッセージ */
.auth-error {
  display: none;

  margin-top: 7px;

  color: #e53935;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.auth-error.show {
  display: block;
}

/* パスワード表示ボタン */
.password-input-wrap {
  position: relative;
}

.password-input-wrap input {
  padding-right: 68px;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 8px;

  transform: translateY(-50%);

  border: none;
  border-radius: 10px;

  padding: 7px 9px;

  background: #eeeeee;
  color: #666;

  font-size: 10px;
  font-weight: 800;

  cursor: pointer;
}

/* フォーム下部ボタン */
.auth-form-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;

  margin-top: 22px;
}

.auth-submit-btn,
.auth-back-btn {
  width: 100%;
  min-height: 52px;

  border: none;
  border-radius: 16px;

  font-size: 14px;
  font-weight: 900;

  cursor: pointer;

  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
}

.auth-submit-btn {
  background:
    linear-gradient(135deg,
      #ff7043,
      #ff5722);

  color: white;

  box-shadow:
    0 6px 15px rgba(255, 87, 34, 0.22);
}

.auth-submit-btn:disabled {
  background: #dddddd;
  color: #999;

  box-shadow: none;
  cursor: not-allowed;
}

.auth-back-btn {
  background: #f3f3f3;
  color: #666;
}

.auth-submit-btn:not(:disabled):active,
.auth-back-btn:active {
  transform: scale(0.98);
}

/* =========================
       進行バー
    ========================= */
.progress-container {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.progress-step {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: #ddd;
  transition: 0.3s;
}

.progress-step.active {
  background: #ff5722;
}

/* =========================
       入力画面カード
       ※メニュー一覧・本日の食事などは全画面表示にするため、
         白いカードUIは基本情報入力だけに使う
    ========================= */
#inputCard {
  background: white;
  border-radius: 28px;
  padding: 30px 24px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  height: calc(100vh - 105px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}


.page {
  min-height: calc(100vh - 32px);
  padding: 0;
}

#selectMenuPage {
  padding-bottom: 170px;
}

/* 一覧・詳細・タブ系ページは中央寄せせず上から表示 */
#selectMenuPage .card,
#detailPage .card,
#todayPage .card,
#aiPage .card,
#mypagePage .card {
  height: auto;
  min-height: calc(100vh - 40px);
  justify-content: flex-start;
}

.question {
  display: none;
}

.question.active {
  display: block;
}

label {
  display: block;
  text-align: center;
  font-size: 30px;
  font-weight: bold;
  margin-bottom: 40px;
}

/* =========================
       性別ボタン
    ========================= */
.gender-buttons {
  display: flex;
  gap: 16px;
}

.gender-btn {
  flex: 1;
  border: 3px solid #C9CDD3;
  border-radius: 20px;
  padding: 20px;
  font-size: 22px;
  font-weight: bold;
  background: #e5e5e5;
  transition: 0.2s;
  cursor: pointer;
}

.gender-btn:hover {
  background: #d8d8d8;
}

.gender-btn.selected {
  background: #ff5722;
  border-color: #ff5722;
  color: white;
}

/* =========================
       select
    ========================= */
select {
  width: 100%;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid #ddd;
  font-size: 22px;
  background: white;
}

input[type="text"] {
  width: 100%;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid #ddd;
  font-size: 22px;
  background: white;
}

/* =========================
       次へボタン / 共通ボタン
    ========================= */
.button-area {
  margin-top: 40px;
}

.next-btn {
  width: 100%;
  padding: 18px;
  font-size: 18px;
  border: none;
  border-radius: 20px;
  background: #e0e0e0;
  color: #999;
  cursor: not-allowed;
  transition: 0.2s;
}

.next-btn.enabled {
  background: #ff5722;
  color: white;
  cursor: pointer;
}

/* =========================
       スマホ最適化
    ========================= */
@media (max-height: 750px) {
  label {
    font-size: 24px;
    margin-bottom: 28px;
  }
}

/* =========================
       学食一覧ページ見出し
    ========================= */
#selectMenuPage h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

/* =========================
       SmartNews風 横スクロールタブ
    ========================= */
.tab-bar {
  display: flex;
  gap: 4px;
  overflow-x: scroll;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;

  width: calc(100% + 32px);
  max-width: none;

  margin: 0 -16px 16px;
  padding: 0 16px;

  border-bottom: 1px solid #eee;
  scrollbar-width: none;
}

.tab-bar::-webkit-scrollbar {
  display: none;
}

.tab-item {
  flex: 0 0 auto;
  appearance: none;
  border: none;
  background: none;
  padding: 10px 14px 12px;
  font-size: 15px;
  font-weight: bold;
  color: #aaa;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: 0.2s;
}

.tab-item:hover {
  color: #ff5722;
}

.tab-item.active {
  color: #ff5722;
  border-bottom-color: #ff5722;
}

/* カテゴリータブ間の区切り線 */
.tab-item+.tab-item {
  position: relative;
}

.tab-item+.tab-item::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 22px;
  background: #D1D5DB;
}

/* =========================
   学食一覧（写真付きメニューカード）
========================= */
#menuList {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
}

.menu-item {
  position: relative;
  min-width: 0;
  overflow: hidden;

  background: white;
  border: 1px solid #eeeeee;
  border-radius: 22px;

  display: flex;
  flex-direction: column;

  text-align: left;
  cursor: pointer;

  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.05),
    0 12px 28px rgba(0, 0, 0, 0.04);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.menu-item:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 87, 34, 0.35);

  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.08),
    0 16px 34px rgba(255, 87, 34, 0.08);
}

.menu-item:active {
  transform: scale(0.98);
}

/* =========================
   メニュー画像
========================= */
.menu-image-area {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f1f1f1;
}

.menu-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.menu-item:hover .menu-image {
  transform: scale(1.04);
}

/* 画像上のカロリー表示 */
.menu-calorie-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;

  padding: 5px 8px;
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.92);
  color: #555;

  font-size: 10px;
  font-weight: bold;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(5px);
}

/* =========================
   カードの文字部分
========================= */
.menu-content {
  min-width: 0;
  flex: 1;

  display: flex;
  flex-direction: column;

  padding: 12px;
}

.menu-item .menu-name {
  min-height: 40px;

  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  color: #2f2f2f;

  overflow-wrap: anywhere;
}

.menu-item .menu-tags {
  min-height: 18px;
  margin-top: 7px;

  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.tag-badge {
  padding: 3px 7px;

  border-radius: 999px;
  background: #fff0eb;
  color: #f4511e;

  font-size: 9px;
  font-weight: bold;
  white-space: nowrap;
}

.menu-item .menu-meta {
  margin-top: auto;
  padding-top: 10px;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
}

.menu-item .menu-price {
  font-size: 19px;
  font-weight: 900;
  color: #ff5722;
}

.menu-item .menu-kcal {
  font-size: 11px;
  color: #999;
}

.menu-detail-hint {
  color: #b0b0b0;
  font-size: 10px;
  font-weight: bold;
  white-space: nowrap;
}

/* =========================
   栄養を見るボタン
========================= */

.menu-nutrition-btn {
  margin: 0;
  padding: 4px 0;

  border: none;
  background: transparent;

  color: #888;
  font-size: 10px;
  font-weight: 700;

  cursor: pointer;
}

/* PCでマウスを乗せたとき */
.menu-nutrition-btn:hover {
  color: #ff5722;
}

/* スマホで押したとき */
.menu-nutrition-btn:active {
  opacity: 0.6;
}

/* =========================
   メニューカード 裏面
========================= */

.menu-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

/* 表面もカードいっぱいに使う */
.menu-front {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 表面の情報部分を残りいっぱいに広げる */
.menu-front .menu-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 値段部分を下側に揃える */
.menu-front .menu-meta {
  margin-top: auto;
}

.menu-front,
.menu-back {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

/* 最初は裏面を非表示 */
.menu-back {
  display: none;
  padding: 12px;
  background: #fff;
}

/* 裏面表示 */
.menu-item.flipped .menu-front {
  display: none;
}

.menu-item.flipped .menu-back {
  display: flex;
  flex-direction: column;
}

/* 料理名 */
.menu-back-title {
  margin-bottom: 8px;

  color: #333;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.3;
}

/* 個人基準との比較説明 */
.menu-back-guide {
  margin-top: -4px;
  margin-bottom: 9px;

  color: #999;
  font-size: 8px;
  font-weight: 700;
}

/* 4項目全体 */
.quick-nutrition-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 項目名 + 判定 */
.quick-nutrition-head {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 3px;
}

/* 実際の数値 */
.quick-nutrition-value {
  margin-top: 2px;

  text-align: right;

  color: #aaa;
  font-size: 8px;
  font-weight: 700;
}

/* 詳細を見る */
.menu-back-detail-btn {
  width: 100%;

  margin-top: 10px;
  padding: 8px;

  border: none;
  border-radius: 10px;

  background: #ff5722;
  color: #fff;

  font-size: 10px;
  font-weight: 900;

  cursor: pointer;
}

/* 表に戻る */
.menu-back-return {
  margin-top: 5px;

  text-align: center;

  color: #aaa;
  font-size: 8px;
  font-weight: 700;
}

/* =========================
   栄養ゲージ
========================= */

.quick-nutrition-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.quick-nutrition-item {
  width: 100%;
}

/* 栄養名 + 判定 */
.quick-nutrition-head {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 5px;
}

.quick-nutrition-name {
  color: #555;
  font-size: 10px;
  font-weight: 800;
}

/* 少なめ・適量・多め */
.quick-nutrition-status {
  padding: 3px 6px;

  border-radius: 999px;

  font-size: 9px;
  font-weight: 900;
}

/* 少なめ */
.quick-nutrition-status.low {
  background: #e3f2fd;
  color: #1976d2;
}

/* 適量 */
.quick-nutrition-status.good {
  background: #e8f5e9;
  color: #388e3c;
}

/* 多め */
.quick-nutrition-status.high {
  background: #ffebee;
  color: #d32f2f;
}


/* =========================
   ゲージ本体
========================= */

.quick-gauge {
  position: relative;

  width: 100%;
  height: 9px;

  /* 
    0〜80%   ：少なめ
    80〜120% ：適量
    120%以上 ：多め

    ゲージ全体は基準値160%まで表示
  */
  background: linear-gradient(to right,
      #dceeff 0%,
      #dceeff 50%,

      #c8e6c9 50%,
      #c8e6c9 75%,

      #ffdede 75%,
      #ffdede 100%);

  border-radius: 999px;
}


/* 以前の適量ゾーン用要素は透明にする */
.quick-gauge-good-zone {
  display: none;
}


/* 80%の境界線 */
.quick-gauge::before {
  content: "";

  position: absolute;

  left: 50%;
  top: -2px;

  width: 1px;
  height: 13px;

  background: rgba(0, 0, 0, 0.15);
}


/* 120%の境界線 */
.quick-gauge::after {
  content: "";

  position: absolute;

  left: 75%;
  top: -2px;

  width: 1px;
  height: 13px;

  background: rgba(0, 0, 0, 0.15);
}


/* 現在位置 */
.quick-gauge-marker {
  position: absolute;

  top: 50%;

  width: 13px;
  height: 13px;

  background: #444;
  border: 2px solid #fff;
  border-radius: 50%;

  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);

  transform: translate(-50%, -50%);

  z-index: 2;
}

/* カード裏面：栄養成分の数値 */
.quick-nutrition-value {
  margin-top: 4px;
  text-align: right;
  color: #222;
  font-size: 12px;
  font-weight: 800;
}

/* =========================
   塩分専用ゲージ
========================= */

.quick-gauge.salt-gauge {
  background: linear-gradient(to right,
      #e8f5e9 0%,
      #e8f5e9 75%,

      #ffdede 75%,
      #ffdede 100%);
}

/* 塩分では80%の境界線は不要 */
.quick-gauge.salt-gauge::before {
  display: none;
}

/* 120%の境界だけ残す */
.quick-gauge.salt-gauge::after {
  display: block;
}

/* =========================
   裏面下部
========================= */

.menu-back-detail-btn {
  width: 100%;

  margin-top: 13px;
  padding: 9px;

  border: none;
  border-radius: 12px;

  background: #ff5722;
  color: #fff;

  font-size: 11px;
  font-weight: 900;

  cursor: pointer;
}

.menu-back-return {
  margin-top: 7px;

  text-align: center;

  color: #aaa;
  font-size: 8px;
  font-weight: 700;
}

/* =========================
   選択済みカード
========================= */
.menu-item.selected-menu {
  opacity: 1;
  cursor: default;

  background: #fafafa;
  border: 2px solid #ffab91;

  box-shadow: none;
}

.menu-item.selected-menu:hover {
  transform: none;
  background: #fafafa;
  border-color: #ffab91;
}

.menu-item.selected-menu:active {
  transform: none;
}

.menu-item.selected-menu .menu-image {
  filter: brightness(0.72);
}

/* 選択済み表示 */
.selected-status {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;

  margin: 0;
}

.selected-badge {
  display: inline-flex;
  align-items: center;

  margin: 0;
  padding: 6px 9px;
  border-radius: 999px;

  background: #ff5722;
  color: white;

  font-size: 10px;
  font-weight: bold;

  box-shadow: 0 3px 10px rgba(255, 87, 34, 0.3);
}

/* =========================
   選択済みカードの操作ボタン
========================= */
.selected-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;

  margin-top: 9px;
  padding-top: 9px;

  border-top: 1px solid #eeeeee;
}

.remove-selected-btn,
.cancel-large-btn,
.add-large-btn {
  min-height: 28px;
  padding: 5px 8px;

  border: none;
  border-radius: 999px;

  font-size: 9px;
  font-weight: bold;
  cursor: pointer;
}

.remove-selected-btn {
  background: #eeeeee;
  color: #555;
}

.cancel-large-btn {
  background: #fff3e0;
  color: #ef6c00;
}

.add-large-btn {
  background: #e3f2fd;
  color: #1976d2;
}

/* =========================
   確認モーダル内のメニュー
   ※ここは消さずに必要
========================= */
.confirm-food-item {
  margin-bottom: 8px;
}

.confirm-food-name {
  font-weight: bold;
  margin-bottom: 4px;
}

.confirm-food-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.modal-cancel-large-btn,
.modal-add-large-btn,
.remove-food-btn {
  border: none;
  border-radius: 999px;

  font-size: 11px;
  font-weight: bold;

  padding: 5px 9px;
  cursor: pointer;
}

.modal-cancel-large-btn {
  background: #fff3e0;
  color: #ff5722;
}

.modal-add-large-btn {
  background: #e3f2fd;
  color: #1e88e5;
}

.remove-food-btn {
  background: #eeeeee;
  color: #555;
}

/* =========================
   メニューが存在しない場合
========================= */
.empty-msg {
  grid-column: 1 / -1;

  text-align: center;
  color: #999;
  font-size: 14px;

  padding: 30px 0;
}

/* =========================
       メニュー詳細ページ
    ========================= */
.back-link {
  background: none;
  border: none;
  color: #ff5722;
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 12px;
  cursor: pointer;
  padding: 6px 0;
}

.detail-hero {
  width: 100%;
  height: 160px;
  border-radius: 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  background: linear-gradient(135deg, #ffe3da, #ffb199);
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

#detailTitle {
  font-size: 24px;
  margin: 0 0 4px;
}

.detail-category {
  font-size: 13px;
  color: #999;
  margin-bottom: 12px;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-price {
  font-size: 26px;
  font-weight: bold;
  color: #ff5722;
}

.detail-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.advice-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  background: #fff8e1;
}

.advice-box h3 {
  margin: 0 0 10px 0;
  font-size: 16px;
}

.advice-box ul {
  margin: 0;
  padding-left: 18px;
}

.advice-box li {
  margin-bottom: 6px;
  line-height: 1.5;
}

#recommendCompareText {
  margin-top: 12px;
}

#cancelRecommendBtn {
  background: #e0e0e0;
  color: #555;
}

#addRecommendBtn {
  background: #ff5722;
  color: white;
}

/* =========================
   栄養成分カード
========================= */
.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.nutrition-item {
  position: relative;
  overflow: hidden;

  min-width: 0;
  padding: 13px 10px;

  text-align: center;

  background: white;
  border: 1px solid #eeeeee;
  border-radius: 17px;

  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.04);

  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}

.nutrition-item:last-child {
  grid-column: 1 / -1;
}

.nutrition-item::before {
  content: "";

  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 4px;

  background: #dddddd;
}

/* 不足 */
.nutrition-item.is-low {
  background:
    linear-gradient(180deg,
      #f7fbff,
      #ffffff);

  border-color: #d7e9f7;
}

.nutrition-item.is-low::before {
  background: #42a5f5;
}

/* 適正 */
.nutrition-item.is-good {
  background:
    linear-gradient(180deg,
      #f4fbf5,
      #ffffff);

  border-color: #d8eddc;
}

.nutrition-item.is-good::before {
  background: #43a047;
}

/* 多め */
.nutrition-item.is-high {
  background:
    linear-gradient(180deg,
      #fff8f5,
      #ffffff);

  border-color: #f5d8cf;
}

.nutrition-item.is-high::before {
  background: #ff7043;
}

.nutrition-item .n-label {
  margin-top: 2px;

  color: #777;
  font-size: 11px;
  font-weight: 700;
}

.nutrition-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 5px;

  margin-top: 6px;
}

.nutrition-item .n-value {
  color: #333;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.nutrition-item .n-unit {
  color: #999;
  font-size: 10px;
  font-weight: 600;
}

.n-standard {
  display: block;

  margin-top: 7px;

  color: #9aa0a6;
  font-size: 10px;
  font-weight: 600;
}

.diff-plus,
.diff-minus,
.diff-good {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 22px;

  padding: 4px 8px;

  border-radius: 999px;

  font-size: 10px;
  font-weight: 800;
}

.diff-minus {
  color: #1976d2;
  background: #e3f2fd;
}

.diff-plus {
  color: #e64a19;
  background: #fff0eb;
}

.diff-good {
  color: #2e7d32;
  background: #e8f5e9;
}

/* ここから下は残す */
.chart-area {
  height: 280px;
  position: relative;
  margin-bottom: 10px;
}

#todayPage .chart-area {
  height: 280px;
  width: 100%;
  position: relative;
}

#todayRadarChart {
  width: 100% !important;
  height: 100% !important;
}

#registerBtn {
  margin-top: 10px;
}

.option-area {
  margin: 10px 0;
  background: #f7f7f7;
  border-radius: 14px;
  padding: 12px;
}

.option-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  font-weight: bold;
}

.option-check input {
  width: 18px;
  height: 18px;
}

#largeOptionText {
  color: #999;
  font-size: 12px;
  font-weight: normal;
}

.chart-area {
  height: 280px;
  position: relative;
  margin-bottom: 10px;
}

#todayPage .chart-area {
  height: 280px;
  width: 100%;
  position: relative;
}

#todayRadarChart {
  width: 100% !important;
  height: 100% !important;
}

#registerBtn {
  margin-top: 10px;
}

.option-area {
  margin: 10px 0;
  background: #f7f7f7;
  border-radius: 14px;
  padding: 12px;
}

.option-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  font-weight: bold;
}

.option-check input {
  width: 18px;
  height: 18px;
}

#largeOptionText {
  color: #999;
  font-size: 12px;
  font-weight: normal;
}

/* =========================
   本日の食事ページ
========================= */
#todayPage {
  padding-bottom: 100px;
}

#todayPage>.card {
  min-height: auto;
}

#todayPage>.card>h2 {
  margin: 0 0 16px;

  color: #2f2f2f;
  font-size: 24px;
  font-weight: 900;
}

/* 本日の食事全体 */
.today-card {
  display: flex;
  flex-direction: column;
  gap: 16px;

  margin-top: 0;
  padding: 0;

  background: transparent;
  border-radius: 0;
}

/* 各セクション */
.today-section {
  padding: 16px;

  background: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 22px;

  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.05),
    0 12px 28px rgba(0, 0, 0, 0.04);
}

/* セクションタイトル */
.today-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  margin-bottom: 14px;
}

.today-section-title>div {
  display: flex;
  align-items: center;
  gap: 8px;

  min-width: 0;

  color: #333;
  font-size: 16px;
  font-weight: 900;
}

.today-section-icon {
  flex: 0 0 auto;

  width: 34px;
  height: 34px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 11px;

  background: #fff0eb;

  font-size: 18px;
}

/* 登録品数 */
.today-food-count {
  flex: 0 0 auto;

  padding: 5px 9px;
  border-radius: 999px;

  background: #fff0eb;
  color: #ff5722;

  font-size: 11px;
  font-weight: 800;
}

/* =========================
   今日食べたメニュー一覧
========================= */
.today-menu-list {
  display: flex;
  flex-direction: column;
  gap: 10px;

  margin: 0;
  padding: 0;

  list-style: none;
}

/* 料理1品のカード */
.today-food-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;

  align-items: center;

  padding: 10px;

  background: #fafafa;
  border: 1px solid #eeeeee;
  border-radius: 17px;
}

/* 料理画像 */
.today-food-image-area {
  width: 62px;
  height: 62px;

  overflow: hidden;

  border-radius: 14px;
  background: #eeeeee;
}

.today-food-image {
  width: 100%;
  height: 100%;

  display: block;
  object-fit: cover;
}

/* 料理情報 */
.today-food-content {
  min-width: 0;
}

.today-food-name {
  color: #333;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;

  overflow-wrap: anywhere;
}

/* 価格・カロリー */
.today-food-meta {
  display: flex;
  align-items: center;
  gap: 8px;

  margin-top: 4px;
}

.today-food-price {
  color: #ff5722;
  font-size: 14px;
  font-weight: 900;
}

.today-food-kcal {
  color: #999;
  font-size: 10px;
  font-weight: 700;
}

/* 大盛りなどの状態 */
.today-food-option {
  display: inline-flex;
  align-items: center;

  margin-top: 5px;
  padding: 3px 7px;

  border-radius: 999px;

  background: #fff3e0;
  color: #ef6c00;

  font-size: 9px;
  font-weight: 800;
}

/* 操作ボタン部分 */
.today-food-actions {
  grid-column: 1 / -1;

  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;

  margin-top: 2px;
  padding-top: 9px;

  border-top: 1px solid #eeeeee;
}

.today-food-actions button {
  min-height: 30px;

  padding: 5px 9px;

  border: none;
  border-radius: 999px;

  font-size: 10px;
  font-weight: 800;

  cursor: pointer;

  transition:
    transform 0.15s ease,
    filter 0.15s ease;
}

.today-food-actions button:hover {
  filter: brightness(0.97);
}

.today-food-actions button:active {
  transform: scale(0.95);
}

/* 大盛り追加 */
.today-add-large-btn {
  background: #e3f2fd;
  color: #1976d2;
}

/* 大盛り解除 */
.today-cancel-large-btn {
  background: #fff3e0;
  color: #ef6c00;
}

/* スープなし */
.today-soup-btn {
  background: #e8f5e9;
  color: #2e7d32;
}

/* スープありに戻す */
.today-cancel-soup-btn {
  background: #fff3e0;
  color: #ef6c00;
}

/* 削除 */
.today-remove-btn {
  background: #eeeeee;
  color: #555;
}

/* =========================
   合計金額
========================= */
.today-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-top: 14px;
  padding: 14px 16px;

  border-radius: 16px;

  background:
    linear-gradient(135deg,
      #fff4ef,
      #fffaf8);

  border: 1px solid rgba(255, 87, 34, 0.12);
}

.today-summary span {
  color: #777;
  font-size: 13px;
  font-weight: 700;
}

.today-summary strong {
  color: #ff5722;
  font-size: 24px;
  font-weight: 900;
}

/* =========================
   レーダーチャート説明
========================= */
.today-section-description {
  margin: -4px 0 8px;

  color: #999;
  font-size: 11px;
  line-height: 1.6;
}

/* 本日の食事ページのチャート */
#todayPage .chart-area {
  width: 100%;
  height: 270px;

  margin: 0;

  position: relative;
}

#todayRadarChart {
  width: 100% !important;
  height: 100% !important;
}

/* =========================
   未登録状態
========================= */
.today-empty-state {
  padding: 40px 20px;

  text-align: center;

  background: white;
  border-radius: 22px;

  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.05);
}

.today-empty-icon {
  margin-bottom: 12px;

  font-size: 52px;
}

.today-empty-title {
  margin-bottom: 6px;

  color: #444;
  font-size: 17px;
  font-weight: 900;
}

.today-empty-text {
  color: #999;
  font-size: 12px;
  line-height: 1.6;
}

/* =========================
   不足栄養素
========================= */
.lacking-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lacking-item {
  display: flex;
  align-items: center;
  gap: 9px;

  padding: 11px 12px;

  background: #fff8f5;
  border: 1px solid rgba(255, 87, 34, 0.12);
  border-radius: 13px;

  color: #555;
  font-size: 13px;
  font-weight: 700;
}

/* 左側の丸 */
.lacking-dot {
  flex: 0 0 auto;

  width: 9px;
  height: 9px;

  border-radius: 50%;
  background: #ff7043;

  box-shadow:
    0 0 0 4px rgba(255, 112, 67, 0.12);
}

/* 不足がない場合 */
.lacking-good {
  padding: 16px;

  text-align: center;

  background: #edf8ee;
  border: 1px solid #d8edda;
  border-radius: 14px;

  color: #2e7d32;
  font-size: 13px;
  font-weight: 800;
}

/* =========================
   おすすめ追加メニュー
========================= */
.recommend-food-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.recommend-food-btn {
  position: relative;

  width: 100%;
  min-height: 64px;

  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 8px;

  margin: 0;
  padding: 12px 13px;

  border: 1px solid #eeeeee;
  border-radius: 16px;

  background: #fafafa;

  text-align: left;
  cursor: pointer;

  box-shadow: none;

  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.recommend-food-btn:hover {
  background: #fff7f4;
  border-color: rgba(255, 87, 34, 0.25);
}

.recommend-food-btn:active {
  transform: scale(0.98);
}

.recommend-food-name {
  min-width: 0;

  color: #333;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
}

.recommend-food-info {
  color: #ff5722;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.recommend-food-arrow {
  color: #bbb;
  font-size: 22px;
  font-weight: normal;
  line-height: 1;
}

.recommend-empty {
  padding: 18px;

  text-align: center;

  background: #f7f7f7;
  border-radius: 14px;

  color: #999;
  font-size: 12px;
}

/* =========================
   食事コメント
========================= */
#todayPage .advice-box {
  position: relative;

  margin-top: 0;
  padding: 15px 15px 15px 17px;

  overflow: hidden;

  background:
    linear-gradient(135deg,
      #fff9e8,
      #fffdf5);

  border: 1px solid #f4e4a9;
  border-radius: 16px;
}

/* 左側のアクセント線 */
#todayPage .advice-box::before {
  content: "";

  position: absolute;
  top: 0;
  left: 0;

  width: 5px;
  height: 100%;

  background:
    linear-gradient(180deg,
      #ffb300,
      #ff7043);
}

#todayPage .advice-box ul {
  margin: 0;
  padding-left: 20px;
}

#todayPage .advice-box li {
  margin-bottom: 8px;

  color: #555;
  font-size: 13px;
  line-height: 1.65;
}

#todayPage .advice-box li:last-child {
  margin-bottom: 0;
}

/* =========================
   マイページ
========================= */
.profile-card {
  background: #f7f7f7;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 16px;
}

.history-date-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  background: white;
  font-weight: bold;
}

.history-detail-card {
  background: white;
  border-radius: 16px;
  padding: 16px;
  margin-top: 16px;
}

.history-detail-card h3 {
  margin-bottom: 12px;
}

.calendar-card {
  background: white;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.calendar-day {
  min-height: 50px;
  border: 1px solid #D1D5DB;
  border-radius: 10px;
  background: #f5f5f5;
  font-size: 12px;
}

.calendar-day.has-meal {
  background: #ffe0b2;
  color: #e65100;
  font-weight: bold;
}

.calendar-day:disabled {
  color: #ccc;
  cursor: default;
}

.calendar-day.today {
  border: 2px solid #ff5722;
  box-shadow: 0 0 0 2px rgba(255, 87, 34, .2);
}

.calendar-day.has-meal:hover {
  transform: scale(1.05);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.calendar-header h3 {
  margin: 0;
}

.calendar-header button {
  border: none;
  background: #ff5722;
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
}

.edit-profile-btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  background: #ff5722;
  color: white;
  font-weight: bold;
  padding: 12px;
  margin-top: 10px;
}

/* =========================
   下部ナビ
========================= */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 1000;

  transform: translateX(-50%);

  width: 100%;
  max-width: 430px;

  min-height: 76px;

  padding:
    8px 10px calc(8px + env(safe-area-inset-bottom));

  display: none;
  align-items: center;
  gap: 6px;

  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid rgba(0, 0, 0, 0.06);

  box-shadow:
    0 -5px 24px rgba(0, 0, 0, 0.08);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ナビボタン */
.bottom-nav button {
  position: relative;

  flex: 1;
  min-width: 0;
  height: 58px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;

  border: none;
  border-radius: 18px;
  background: transparent;

  color: #999;
  font-size: 10px;
  font-weight: 700;

  cursor: pointer;

  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.15s ease;
}

.bottom-nav button:active {
  transform: scale(0.94);
}

/* アイコン */
.nav-icon {
  height: 24px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 22px;
  line-height: 1;

  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}

/* 文字 */
.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 選択中 */
.bottom-nav button.active-tab {
  background: #fff0eb;
  color: #ff5722;
}

.bottom-nav button.active-tab .nav-icon {
  transform: translateY(-1px) scale(1.08);
}

/* 選択中の上側マーク */
.bottom-nav button.active-tab::before {
  content: "";

  position: absolute;
  top: 3px;
  left: 50%;

  width: 22px;
  height: 3px;

  transform: translateX(-50%);

  border-radius: 999px;
  background: #ff5722;
}

/* マウス操作時 */
.bottom-nav button:hover {
  background: #fff7f4;
  color: #ff7043;
}

/* 一番右の線などを消す */
.bottom-nav button:last-child {
  border-right: none;
}

/* 下部ナビのボタン間に区切り線を追加 */
.bottom-nav button+button::after {
  content: "";
  position: absolute;

  left: -3px;
  top: 50%;
  transform: translateY(-50%);

  width: 1px;
  height: 32px;

  background: #D1D5DB;
  pointer-events: none;
}

/* =========================
   選択中バー
========================= */
.selected-bar {
  position: fixed;

  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));

  transform: translateX(-50%);

  width: calc(100% - 32px);
  max-width: 398px;

  padding: 12px 14px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;

  z-index: 900;

  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(255, 87, 34, .15);
  border-radius: 20px;

  box-shadow:
    0 8px 24px rgba(0, 0, 0, .15);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.selected-bar span {
  font-size: 14px;
  font-weight: 700;
  color: #444;
}

.selected-bar button {
  border: none;
  border-radius: 14px;
  padding: 11px 16px;

  background: linear-gradient(135deg,
      #ff7043,
      #ff5722);

  color: white;
  font-size: 13px;
  font-weight: bold;

  cursor: pointer;
  transition: 0.15s;
}

.selected-bar button:hover {
  transform: translateY(-2px);
}

.selected-bar button:active {
  transform: scale(.96);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.modal-box {
  width: 100%;
  max-width: 398px;
  max-height: 85vh;
  overflow-y: auto;
  background: white;
  border-radius: 22px;
  padding: 18px;
}

.modal-box h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.modal-buttons button {
  flex: 1;
  border: none;
  border-radius: 14px;
  padding: 12px;
  font-weight: bold;
}

.modal-chart-area {
  height: 240px;
  position: relative;
  margin-top: 12px;
}

#reselectBtn {
  background: #e0e0e0;
  color: #555;
}

#confirmRegisterBtn {
  background: #ff5722;
  color: white;
}

/* =========================
   アプリヘッダー
========================= */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin: -16px -16px 18px;
  padding:
    calc(14px + env(safe-area-inset-top)) 18px 14px;

  background:
    linear-gradient(135deg,
      #ff7043 0%,
      #ff5722 55%,
      #f4511e 100%);

  box-shadow:
    0 4px 14px rgba(244, 81, 30, 0.22);

  overflow: hidden;
}

/* 背景の飾り */
.app-header::before {
  content: "";
  position: absolute;

  width: 130px;
  height: 130px;

  top: -75px;
  right: -30px;

  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.app-header::after {
  content: "";
  position: absolute;

  width: 70px;
  height: 70px;

  bottom: -45px;
  left: 25px;

  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

/* ヘッダー左側 */
.header-main {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  gap: 10px;

  min-width: 0;
}

/* ロゴ部分 */
.header-logo {
  flex: 0 0 auto;

  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;

  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.28);

  font-size: 22px;

  backdrop-filter: blur(8px);
}

/* タイトル部分 */
.header-text {
  min-width: 0;
}

.app-header h1 {
  margin: 0;

  color: white;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;

  letter-spacing: 0.02em;
}

.header-subtitle {
  margin-top: 2px;

  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-weight: 600;

  white-space: nowrap;
}

/* 右側のミニ表示 */
.header-status {
  position: relative;
  z-index: 1;

  flex: 0 0 auto;

  padding: 7px 10px;
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);

  color: white;
  font-size: 10px;
  font-weight: bold;

  backdrop-filter: blur(8px);
}

/* =========================
   今日のおすすめモーダル
========================= */

.recommend-overlay {
  position: fixed;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(0, 0, 0, 0.45);

  z-index: 9999;
}

.recommend-popup {
  position: relative;

  width: 100%;
  max-width: 380px;

  background: #fff;
  border-radius: 20px;

  overflow: hidden;

  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
}

.recommend-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;

  width: 34px;
  height: 34px;

  border: none;
  border-radius: 50%;

  background: rgba(0, 0, 0, 0.55);
  color: #fff;

  font-size: 23px;
  line-height: 1;

  cursor: pointer;

  z-index: 2;
}

.recommend-popup-label {
  padding: 15px 50px 12px 16px;

  font-size: 15px;
  font-weight: 700;

  color: #555;
}

.recommend-popup-image {
  display: block;

  width: 100%;
  height: 230px;

  object-fit: cover;
}

.recommend-popup-content {
  padding: 16px 18px 20px;
}

.recommend-popup-content h3 {
  margin: 0 0 7px;

  font-size: 20px;

  color: #222;
}

.recommend-popup-content p {
  margin: 0;

  font-size: 14px;
  line-height: 1.6;

  color: #666;
}

/* =========================
   メニュー評価
========================= */

.meal-rating {
  grid-column: 1 / -1;

  margin-top: 4px;
  padding-top: 14px;

  border-top: 1px solid #eeeeee;
}

.meal-rating-title {
  margin-bottom: 14px;

  color: #444;

  font-size: 13px;
  font-weight: 900;
}

/* 星評価 */

.meal-rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;

  margin-bottom: 14px;
}

.meal-rating-label {
  color: #555;

  font-size: 12px;
  font-weight: 800;
}

.meal-stars {
  display: flex;
  gap: 2px;
}

.meal-stars button {
  padding: 0;

  border: none;
  background: transparent;

  color: #ffb300;

  font-size: 27px;
  line-height: 1;

  cursor: pointer;
}

/* 味の濃さ・量 */

.meal-scale-block {
  margin-bottom: 16px;
}

.meal-scale-block .meal-rating-label {
  display: block;

  margin-bottom: 8px;
}

.meal-scale-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);

  gap: 4px;
}

.meal-scale-options button {
  min-height: 38px;

  padding: 5px 2px;

  border: 1px solid #dddddd;
  border-radius: 9px;

  background: #ffffff;
  color: #777;

  font-size: 9px;
  font-weight: 700;

  cursor: pointer;
}

/* 自由記述 */

.meal-comment-block {
  margin-top: 4px;
}

.meal-comment-block label {
  display: block;

  margin-bottom: 7px;

  color: #555;

  font-size: 12px;
  font-weight: 800;
}

.meal-comment-block label span {
  margin-left: 4px;

  color: #999;

  font-size: 9px;
  font-weight: 600;
}

.meal-comment {
  width: 100%;
  min-height: 72px;

  box-sizing: border-box;

  padding: 10px 12px;

  border: 1px solid #dddddd;
  border-radius: 11px;

  background: #ffffff;

  color: #444;

  font: inherit;
  font-size: 12px;

  resize: vertical;
}

.meal-comment::placeholder {
  color: #aaaaaa;
}

/* =========================
   メニュー評価 選択状態
========================= */

/* 星 */

.meal-star.selected {
  color: #ff9800;
}

/* 味の濃さ・量 */

.meal-scale-option.selected {
  border-color: #ff8a65;

  background: #fff0eb;
  color: #ff5722;

  font-weight: 900;

  box-shadow:
    0 0 0 1px rgba(255, 87, 34, 0.08);
}

/* =========================
   メニュー評価 送信ボタン
========================= */

.meal-rating-submit-area {
  margin-top: 14px;
}

.meal-rating-submit-btn {
  width: 100%;
  min-height: 44px;

  border: none;
  border-radius: 12px;

  background: #ff5722;
  color: #ffffff;

  font-size: 13px;
  font-weight: 900;

  cursor: pointer;

  transition:
    transform 0.15s ease,
    filter 0.15s ease;
}

.meal-rating-submit-btn:hover {
  filter: brightness(0.97);
}

.meal-rating-submit-btn:active {
  transform: scale(0.98);
}

/* =========================
   メニュー評価 回答済み
========================= */

.meal-rating-submit-btn.submitted {
  background: #eeeeee;
  color: #777;

  cursor: default;
}

.meal-rating-submit-btn.submitted:hover {
  filter: none;
}

.meal-rating-submit-btn.submitted:active {
  transform: none;
}

/* =========================
   一時的にログイン画面を非表示
========================= */
#authChoicePage {
  display: flex;
}

#registerPage,
#loginPage {
  display: none;
}

/* 新規登録・ログイン画面を使用しない */
#authChoicePage,
#registerPage,
#loginPage {
  display: none !important;
}

/* 新規登録・ログイン画面は非表示 */
#authChoicePage,
#registerPage,
#loginPage {
  display: none !important;
}


/* =========================
   学食切り替えボタン
========================= */

.cafeteria-switch {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.cafeteria-btn {
  flex: 1;
  padding: 14px 10px;
  border: 2px solid #C9CDD3;
  border-radius: 14px;
  background: #f5f5f5;
  color: #444;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.cafeteria-btn.active {
  background: #ff5722;
  border-color: #ff5722;
  color: white;
}

.cafeteria-btn:active {
  transform: scale(0.97);
}



/* =========================
   全号館共通 日付選択バー
========================= */

.cafeteria-date-selector {
  margin: 16px 0 18px;
  padding: 18px 12px;
  background: #ffffff;
  border: 1px solid #f2e8e3;
  border-radius: 18px;
  box-shadow: 0 3px 12px rgba(80, 50, 30, 0.05);
}

/* 月のタイトル */

.cafeteria-month-title {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #454545;
  margin-bottom: 16px;
}

/* 日付と左右矢印 */

.cafeteria-week-navigation {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 月曜日〜金曜日の日付 */

.cafeteria-week-days {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  flex: 1;
  min-width: 0;
  gap: 4px;
}

/* 日付ボタン */

.cafeteria-day-btn {
  min-width: 0;
  padding: 11px 2px;
  border: 1px solid #f1ebe7;
  border-radius: 12px;
  background: #faf8f6;
  color: #555555;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

/* 選択している日付 */

.cafeteria-day-btn.active {
  background: #ff7043;
  border-color: #ff7043;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(255, 112, 67, 0.2);
}

/* 今日の日付（選択中以外） */

.cafeteria-day-btn.today:not(.active) {
  border: 2px solid #ffb38a;
}

/* 左右の週移動ボタン */

.cafeteria-week-arrow {
  flex-shrink: 0;
  width: 30px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: #fff1eb;
  color: #e9653b;
  font-size: 15px;
  cursor: pointer;
}

/* ボタンを押したとき */

.cafeteria-week-arrow:active,
.cafeteria-day-btn:active {
  transform: scale(0.96);
}

/* =========================
   スマホ表示
========================= */

@media (max-width: 480px) {

  .cafeteria-date-selector {
    padding: 14px 8px;
  }

  .cafeteria-week-navigation {
    gap: 4px;
  }

  .cafeteria-week-arrow {
    width: 26px;
  }

  .cafeteria-week-days {
    gap: 3px;
  }

  .cafeteria-day-btn {
    padding: 10px 1px;
    font-size: 11px;
  }

}

/* =========================
   2号館 日替わりメニューカード
========================= */

.daily-menu-card {
  margin: 16px 0 20px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #f5e5dc;
  border-radius: 18px;
  box-shadow: 0 3px 12px rgba(80, 50, 30, 0.06);
}

/* タイトル */
.daily-menu-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #444;
  font-size: 16px;
  font-weight: 700;
}

.daily-menu-icon {
  font-size: 20px;
}

/* 料理情報 */
.daily-menu-content {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

/* 料理画像の代わり */
.daily-menu-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  background: #fff1e9;
  border-radius: 14px;
  font-size: 30px;
}

/* 料理名と説明 */
.daily-menu-details {
  flex: 1;
  min-width: 0;
}

.daily-menu-name {
  margin-bottom: 6px;
  color: #333;
  font-size: 15px;
  font-weight: 700;
}

.daily-menu-description {
  color: #888;
  font-size: 12px;
  line-height: 1.6;
}

/* 選択ボタン */
.daily-menu-select-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: #ff7043;
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.daily-menu-select-btn:not(:disabled):active {
  transform: scale(0.98);
}

/* 献立未登録時 */
.daily-menu-select-btn:disabled {
  background: #f1f1f1;
  color: #999;
  cursor: not-allowed;
}

/* スマホ表示 */
@media (max-width: 480px) {
  .daily-menu-card {
    padding: 15px;
  }

  .daily-menu-placeholder {
    width: 58px;
    height: 58px;
    font-size: 26px;
  }

  .daily-menu-header {
    font-size: 15px;
  }

  .daily-menu-content {
    gap: 10px;
  }
}

/* =====================================
   本日の食事：栄養成分を5行表示
===================================== */

/* 栄養成分の一覧を縦1列にする */
#todayFood .nutrition-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

/* 栄養成分1項目を横並びにする */
#todayFood .nutrition-item {
  display: grid;
  grid-template-columns: minmax(82px, 1.2fr) minmax(0, 2fr) auto;
  align-items: center;
  gap: 8px;

  padding: 12px 10px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
}

/* 栄養素の名前 */
#todayFood .nutrition-item .n-label {
  margin: 0;
  font-size: 12px;
}

/* 実際の摂取量と差分 */
#todayFood .nutrition-item .nutrition-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

/* 基準値 */
#todayFood .nutrition-item .n-standard {
  margin: 0;
  font-size: 11px;
  white-space: nowrap;
}

/* 栄養成分の文字サイズ調整 */

/* 栄養素名 */
#todayFood .nutrition-item .n-label {
  font-size: 16px;
}

/* 摂取量 */
#todayFood .nutrition-item .n-value {
  font-size: 19px;
}

/* 基準との差分 */
#todayFood .nutrition-item .diff-plus,
#todayFood .nutrition-item .diff-minus,
#todayFood .nutrition-item .diff-good {
  font-size: 16px;
}

/* 基準値 */
#todayFood .nutrition-item .n-standard {
  font-size: 16px;
}

/* 栄養成分を横一列に固定 */
#todayFood .nutrition-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 12px 6px;
}

/* 栄養素名 */
#todayFood .nutrition-item .n-label {
  flex: 0 0 86px;
  font-size: 15px;
}

/* 摂取量と差分を横並びにする */
#todayFood .nutrition-item .nutrition-top {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
}

/* 摂取量 */
#todayFood .nutrition-item .n-value {
  font-size: 17px;
  white-space: nowrap;
}

/* 差分 */
#todayFood .nutrition-item .diff-plus,
#todayFood .nutrition-item .diff-minus,
#todayFood .nutrition-item .diff-good {
  font-size: 13px;
  white-space: nowrap;
}

/* 基準値 */
#todayFood .nutrition-item .n-standard {
  font-size: 13px;
  white-space: nowrap;
}

/* 栄養成分の摂取量と差分を横一列にする */
#todayFood .nutrition-item .nutrition-top {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 6px;
}

/* 摂取量と差分の改行を防ぐ */
#todayFood .nutrition-item .n-value,
#todayFood .nutrition-item .diff-plus,
#todayFood .nutrition-item .diff-minus,
#todayFood .nutrition-item .diff-good {
  white-space: nowrap;
  flex-shrink: 0;
}

/* =====================================
   栄養成分：文字色と横並びの調整
===================================== */

/* 4つの項目を横並びに配置 */
#todayFood .nutrition-item {
  display: grid;
  grid-template-columns: 1.2fr 2fr 1fr;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
}

/* 栄養素名 */
#todayFood .nutrition-item .n-label {
  width: auto;
  flex: initial;
  color: #333;
}

/* 真ん中の摂取量・差分 */
#todayFood .nutrition-item .nutrition-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

/* 摂取量 */
#todayFood .nutrition-item .n-value {
  color: #222;
  white-space: nowrap;
}

/* g・kcalなどの単位 */
#todayFood .nutrition-item .n-unit {
  color: #333;
  opacity: 1;
  font-weight: 600;
}

/* 差分 */
#todayFood .nutrition-item .diff-plus,
#todayFood .nutrition-item .diff-minus,
#todayFood .nutrition-item .diff-good {
  white-space: nowrap;
}

/* 目標値 */
#todayFood .nutrition-item .n-standard {
  color: #333;
  opacity: 1;
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
}

/* 栄養成分の列見出し */
#todayFood .nutrition-column-header {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  align-items: center;
  gap: 6px;

  padding: 10px 8px;
  border-bottom: 2px solid #D1D5DB;

  color: #555;
  font-size: 13px;
  font-weight: bold;
}

/* 見出しと数値の列幅を統一 */
#todayFood .nutrition-item {
  grid-template-columns: 1.2fr 2fr 1fr;
}

/* 栄養成分：見出しと数値の列幅を統一 */
#todayFood .nutrition-column-header,
#todayFood .nutrition-item {
  display: grid;
  grid-template-columns: 29% 19% 27% 25%;
  align-items: center;
  gap: 0;
  box-sizing: border-box;
}

/* 栄養成分のカード */
#todayFood .nutrition-item {
  padding: 12px 4px;
}

/* 摂取量と差分を独立した列として扱う */
#todayFood .nutrition-item .nutrition-top {
  display: contents;
}

/* 各列の文字配置 */
#todayFood .nutrition-item .n-label,
#todayFood .nutrition-item .n-value,
#todayFood .nutrition-item .n-standard {
  text-align: center;
  min-width: 0;
}

/* 栄養素名 */
#todayFood .nutrition-item .n-label {
  font-size: 14px;
}

/* 摂取量 */
#todayFood .nutrition-item .n-value {
  font-size: 16px;
  white-space: nowrap;
}

/* 差分 */
#todayFood .nutrition-item .diff-plus,
#todayFood .nutrition-item .diff-minus,
#todayFood .nutrition-item .diff-good {
  font-size: 12px;
  white-space: nowrap;
  justify-self: center;
}

/* 目標値 */
#todayFood .nutrition-item .n-standard {
  font-size: 12px;
  font-weight: 700;
  color: #333;
  white-space: nowrap;
}

/* 見出しも中央揃え */
#todayFood .nutrition-column-header span {
  text-align: center;
}

/* =====================================
   料理詳細画面：栄養成分を4列×5行に統一
===================================== */

/* 栄養情報全体を縦5行にする */
#detailPage #nutritionGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

/* 見出しと栄養成分の列幅を統一 */
#detailPage .detail-nutrition-header,
#detailPage #nutritionGrid .nutrition-item {
  display: grid;
  grid-template-columns: 29% 19% 27% 25%;
  align-items: center;
  gap: 0;
  box-sizing: border-box;
}

/* 見出し */
#detailPage .detail-nutrition-header {
  padding: 10px 4px;
  border-bottom: 2px solid #D1D5DB;
  color: #555;
  font-size: 13px;
  font-weight: bold;
}

#detailPage .detail-nutrition-header span {
  text-align: center;
}

/* 栄養成分の各行 */
#detailPage #nutritionGrid .nutrition-item {
  grid-column: auto;
  padding: 12px 4px;
}

/* 摂取量と差分を別々の列に配置 */
#detailPage #nutritionGrid .nutrition-top {
  display: contents;
}

/* 栄養素名 */
#detailPage #nutritionGrid .n-label {
  margin: 0;
  color: #333;
  font-size: 14px;
}

/* 摂取量 */
#detailPage #nutritionGrid .n-value {
  font-size: 16px;
  white-space: nowrap;
}

/* g・kcalの文字を濃くする */
#detailPage #nutritionGrid .n-unit {
  color: #333;
  opacity: 1;
  font-weight: 700;
}

/* 差分 */
#detailPage #nutritionGrid .diff-plus,
#detailPage #nutritionGrid .diff-minus,
#detailPage #nutritionGrid .diff-good {
  font-size: 12px;
  white-space: nowrap;
  justify-self: center;
}

/* 目標値 */
#detailPage #nutritionGrid .n-standard {
  margin: 0;
  color: #333;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* 各列の中央揃え */
#detailPage #nutritionGrid .n-label,
#detailPage #nutritionGrid .n-value,
#detailPage #nutritionGrid .n-standard {
  text-align: center;
  min-width: 0;
}

/* 料理詳細：料理名と値段を横並びにする */
#detailPage .detail-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

#detailPage #detailTitle {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 24px;
}

#detailPage .detail-price {
  flex-shrink: 0;
  font-size: 24px;
  color: #ff5722;
  font-weight: 800;
}

/* =====================================
   確認画面：栄養成分を4列×5行に統一
===================================== */

/* 栄養成分を縦5行にする */
#confirmModal .nutrition-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

/* 見出しと各行の列幅を統一 */
#confirmModal .nutrition-column-header,
#confirmModal .nutrition-item {
  display: grid;
  grid-template-columns: 29% 19% 27% 25%;
  align-items: center;
  gap: 0;
  box-sizing: border-box;
}

/* 見出し */
#confirmModal .nutrition-column-header {
  padding: 10px 4px;
  border-bottom: 2px solid #D1D5DB;
  color: #555;
  font-size: 13px;
  font-weight: 800;
}

#confirmModal .nutrition-column-header span {
  text-align: center;
}

/* 栄養成分の各行 */
#confirmModal .nutrition-item {
  padding: 12px 4px;
}

/* 摂取量と差分を別々の列に配置 */
#confirmModal .nutrition-top {
  display: contents;
}

/* 栄養素名 */
#confirmModal .n-label {
  margin: 0;
  color: #333;
  font-size: 14px;
  text-align: center;
  min-width: 0;
}

/* 摂取量 */
#confirmModal .n-value {
  color: #222;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  min-width: 0;
}

/* 単位 */
#confirmModal .n-unit {
  color: #333;
  font-weight: 700;
  opacity: 1;
}

/* 差分 */
#confirmModal .diff-plus,
#confirmModal .diff-minus,
#confirmModal .diff-good {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  justify-self: center;
}

/* 目標値 */
#confirmModal .n-standard {
  margin: 0;
  color: #333;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  min-width: 0;
}

/* 確認画面：戻るボタンを見やすくする */
#confirmModal #reselectBtn {
  background: #f5f5f5;
  color: #333;
  border: 2px solid #777;
  font-weight: 800;
}

/* =====================================
   マイページ：食事履歴の栄養表示
===================================== */

.history-detail-card .history-nutrition-header,
.history-detail-card .history-nutrition-item {
  display: grid;
  grid-template-columns: 29% 19% 27% 25%;
  align-items: center;
  box-sizing: border-box;
}

/* 見出し */
.history-detail-card .history-nutrition-header {
  padding: 10px 2px;
  border-bottom: 2px solid #d1d5db;
  font-size: 12px;
  font-weight: 800;
  color: #555;
}

/* 各栄養素を縦5行にする */
.history-detail-card .history-nutrition-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 12px 0 20px;
}

.history-detail-card .history-nutrition-item {
  padding: 10px 2px;
  border-bottom: 1px solid #eee;
}

/* 各列の文字 */
.history-detail-card .history-nutrition-header span,
.history-detail-card .history-nutrition-item span {
  text-align: center;
  min-width: 0;
}

/* 栄養素名 */
.history-detail-card .history-n-label {
  font-size: 12px;
  font-weight: 700;
  color: #333;
}

/* 摂取量 */
.history-detail-card .history-n-value {
  font-size: 13px;
  font-weight: 800;
  color: #222;
  white-space: nowrap;
}

/* 差分 */
.history-detail-card .diff-plus,
.history-detail-card .diff-minus,
.history-detail-card .diff-good {
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

/* 目標値 */
.history-detail-card .history-n-standard {
  font-size: 11px;
  font-weight: 700;
  color: #444;
  white-space: nowrap;
}

/* マイページ：選択中の日付 */
.calendar-day.selected {
  background: #ff8c42;
  color: #fff;
  border: 2px solid #e66b1e;
  font-weight: 800;
}

/* 選択中の日付の料理アイコン */
.calendar-day.selected div {
  color: #fff;
}

/* ================================
   マイページ：月間学食レポート
================================ */

.monthly-report {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.monthly-report h3 {
  font-size: 18px;
  margin: 0 0 16px;
  color: #333;
}

.monthly-total {
  background: #fff3e8;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.monthly-total span,
.monthly-stat span {
  color: #666;
  font-size: 13px;
}

.monthly-total strong {
  color: #e87520;
  font-size: 30px;
  font-weight: 800;
}

.monthly-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.monthly-stat {
  background: #f5f5f5;
  border-radius: 12px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.monthly-stat strong {
  font-size: 20px;
  color: #333;
}

/* =====================================
   マイページ：カレンダーデザイン改善
===================================== */

/* カレンダー全体 */
.calendar-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px 12px;
  margin-bottom: 18px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.06);
}

/* 日付の配置 */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  text-align: center;
}

/* 通常の日付 */
.calendar-day {
  min-width: 0;
  min-height: 48px;
  padding: 6px 2px;
  border: 1px solid #eeeeee;
  border-radius: 12px;
  background: #ffffff;
  color: #555555;
  font-size: 13px;
  font-weight: 600;
}

/* 食事記録がある日 */
.calendar-day.has-meal {
  background: #fff3e8;
  border: 1px solid #ffca9b;
  color: #d96b16;
  font-weight: 800;
}

/* 記録日の料理アイコン */
.calendar-day.has-meal div {
  font-size: 13px;
  margin-top: 3px;
}

/* 選択中の日付 */
.calendar-day.selected,
.calendar-day.has-meal.selected {
  background: #ff8c42;
  border: 2px solid #e66b1e;
  color: #ffffff;
  font-weight: 800;
}

/* 記録のない日 */
.calendar-day:disabled {
  opacity: 0.65;
}

/* 日付を押したとき */
.calendar-day:not(:disabled) {
  cursor: pointer;
}

.calendar-day:not(:disabled):active {
  transform: scale(0.96);
}

/* 食事記録がある日のオレンジの点 */
.calendar-day .meal-dot {
  display: block;
  width: 6px;
  height: 6px;
  margin: 5px auto 0;
  border-radius: 50%;
  background: #f58b2a;
}

/* 選択中は白い点にする */
.calendar-day.selected .meal-dot {
  background: #ffffff;
}

/* =====================================
   カレンダー：曜日と月切り替えボタン
===================================== */

/* 曜日の見出し */
.calendar-grid>div:nth-child(-n+7) {
  padding: 10px 0;
  font-size: 12px;
  font-weight: 800;
  color: #666;
}

/* 日曜日 */
.calendar-grid>div:first-child {
  color: #e35d5d;
}

/* 土曜日 */
.calendar-grid>div:nth-child(7) {
  color: #4b8ed8;
}

/* カレンダー上部 */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

/* 年月の表示 */
.calendar-header h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: #333;
}

/* 前月・翌月ボタン */
.calendar-header button {
  width: 38px;
  height: 38px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #f7f7f7;
  color: #444;
  font-size: 25px;
  font-weight: 700;
  cursor: pointer;
}

/* ボタンを押したとき */
.calendar-header button:active {
  background: #ffe6d1;
  transform: scale(0.95);
}

/* カレンダー下部の凡例 */
.calendar-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 14px;
  padding-right: 4px;
  color: #777;
  font-size: 12px;
  font-weight: 600;
}

/* 凡例のオレンジの点 */
.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f58b2a;
}

/* =====================================
   マイページ：基本情報カードの改善
===================================== */

/* 基本情報カード */
.profile-card {
  padding: 20px 16px;
}

/* 見出し */
.profile-card h3 {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 800;
}

/* 学籍番号 */
.profile-student {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}

.profile-student span,
.profile-info-item span {
  font-size: 12px;
  color: #777;
  font-weight: 600;
}

.profile-student strong {
  font-size: 16px;
  color: #333;
}

/* 性別・年齢・身長・体重を2列に */
.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

/* 各情報のカード */
.profile-info-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px;
  border-radius: 12px;
  background: #f5f5f5;
}

.profile-info-item strong {
  font-size: 17px;
  font-weight: 800;
  color: #333;
}

/* =====================================
   基本情報：コンパクト版
===================================== */

.profile-card {
  padding: 14px 16px;
}

.profile-card h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

/* 学籍番号 */
.profile-student {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

/* 2列配置 */
.profile-info-grid {
  gap: 8px;
  margin-bottom: 12px;
}

/* 各項目を横並びに */
.profile-info-item {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
}

/* ラベル */
.profile-info-item span,
.profile-student span {
  font-size: 12px;
}

/* 数値 */
.profile-info-item strong,
.profile-student strong {
  font-size: 14px;
}

/* 変更ボタン */
.profile-card .edit-profile-btn {
  margin-top: 0;
  padding: 10px 12px;
  min-height: 40px;
}

/* カレンダー：記録のない日も見やすくする */
.calendar-day:disabled {
  opacity: 1;
  color: #888;
  background: #fafafa;
  border: 1px solid #eeeeee;
}

/* 食事記録がある日を強調 */
.calendar-day.has-meal {
  color: #d96b16;
  font-weight: 800;
}

/* =====================================
   月間学食レポート：コンパクト版
===================================== */

/* レポート全体 */
.monthly-report {
  padding: 12px 14px;
  margin-bottom: 12px;
}

/* タイトル */
.monthly-report h3 {
  font-size: 16px;
  margin: 0 0 10px;
}

/* 合計金額 */
.monthly-total {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.monthly-total strong {
  font-size: 23px;
}

/* 利用日数・平均金額 */
.monthly-stats {
  gap: 8px;
}

.monthly-stat {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 8px;
}

.monthly-stat span {
  font-size: 11px;
}

.monthly-stat strong {
  font-size: 15px;
  white-space: nowrap;
}

/* 食事履歴：未登録日の表示 */
.history-empty {
  padding: 18px 10px;
  text-align: center;
}

.history-empty p {
  color: #777;
  font-size: 14px;
  margin-bottom: 16px;
}

#addHistoryMealBtn {
  background: #ff8c42;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 800;
}

/* 過去の食事記録：食事追加ボタン */
#addHistoryMealBtn {
  display: block;
  width: calc(100% - 40px);
  margin: 20px auto;
  padding: 14px 16px;

  background: #ff5722;
  color: white;
  border: none;
  border-radius: 14px;

  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
}

/* =========================
   マイページ：月別栄養グラフ
========================= */

#monthlyNutritionSection {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

#monthlyNutritionSection h3 {
  font-size: 18px;
  margin: 0 0 18px;
  color: #333;
}

#monthlyNutritionControls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.monthly-chart-area {
  position: relative;
  width: 100%;
  height: 280px;
}

#monthlyNutritionChart {
  width: 100% !important;
  height: 100% !important;
}

/* =========================
   履歴編集終了ボタン
========================= */

.cancel-history-edit-btn {
  display: flex;
  align-items: center;
  gap: 12px;

  width: 100%;
  margin: 0 0 18px;
  padding: 13px 15px;

  background: #fff3e7;
  border: 1px solid #ffd4b1;
  border-radius: 14px;

  text-align: left;
  cursor: pointer;

  transition: background 0.2s, transform 0.2s;
}

.cancel-history-edit-btn:hover {
  background: #ffe7d2;
  transform: translateY(-1px);
}

.cancel-history-edit-btn:active {
  transform: scale(0.98);
}

.cancel-edit-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;
  flex-shrink: 0;

  background: white;
  color: #e77928;
  border-radius: 50%;

  font-size: 20px;
  font-weight: bold;
}

.cancel-edit-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.cancel-edit-text strong {
  color: #a34b13;
  font-size: 14px;
}

.cancel-edit-text small {
  color: #a8673b;
  font-size: 12px;
}

.cancel-edit-arrow {
  color: #d28b56;
  font-size: 25px;
}

/* =========================
   月別グラフ：栄養素切り替えボタン
========================= */

#monthlyNutritionControls {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 2px 12px;
  margin-bottom: 12px;
  scrollbar-width: none;
}

#monthlyNutritionControls::-webkit-scrollbar {
  display: none;
}

.monthly-nutrient-btn {
  flex-shrink: 0;
  padding: 9px 14px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background: #fff;
  color: #555;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
}

/* 選択中のボタン */
.monthly-nutrient-btn.active {
  background: #ff9800;
  color: #fff;
  border-color: #ff9800;
  font-weight: bold;
}

/* =========================
   カテゴリタブ 左右スクロール
========================= */

.tab-navigation {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  margin-bottom: 16px;
}

.tab-navigation .tab-bar {
  flex: 1;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 0 4px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tab-scroll-btn {
  flex: 0 0 30px;
  height: 38px;
  border: none;
  border-radius: 8px;
  background: #fff0e8;
  color: #ff5722;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
}

.tab-scroll-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* 栄養豆知識カード */
.nutrition-tip-box {
  margin-top: 16px;
  padding: 18px;
  border-radius: 16px;
  background: #fff8e8;
  border: 1px solid #ffe1b0;
  line-height: 1.7;
}

.nutrition-tip-box h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.nutrition-tip-category {
  color: #c25b23;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.nutrition-tip-title {
  font-weight: 800;
  font-size: 15px;
  color: #3c342c;
}

.nutrition-tip-body {
  margin: 10px 0 0;
  font-size: 14px;
  color: #51463c;
}

.nutrition-tip-next {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: #ff7043;
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.nutrition-tip-next:active {
  opacity: .8;
}

.nutrition-tip-empty {
  color: #777;
  font-size: 13px;
}

/* おすすめ追加メニュー下のサイドメニュー遷移 */
.side-menu-link-btn {
  width: 100%;
  margin-top: 12px;
  padding: 13px 16px;
  border: 1px solid #ffb49e;
  border-radius: 14px;
  background: #fff7f3;
  color: #e95325;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.side-menu-link-btn:active {
  transform: scale(0.99);
}


/* 数量ステッパー：本日の食事・履歴で共通の丸型ボタン */
.today-quantity-controls {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.today-quantity-controls .today-quantity-minus,
.today-quantity-controls .today-quantity-plus,
.today-quantity-controls .history-quantity-minus,
.today-quantity-controls .history-quantity-plus {
  appearance: none;
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  border: 1px solid #ffd7c9;
  border-radius: 50%;
  background: #fff2ec;
  color: #f0643a;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, transform .15s;
}

.today-quantity-controls button:not(:disabled):active {
  transform: scale(.93);
}

.today-quantity-controls button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.today-quantity-controls strong {
  min-width: 16px;
  text-align: center;
}

/* 200番：詳細画面の丸型チェックUI */
#detailPage .option-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  min-width: 24px;
  border: 2px solid #ffab91;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

#detailPage .option-check input[type="checkbox"]:checked {
  background: #ff7043;
  border-color: #ff7043;
}

#detailPage .option-check input[type="checkbox"]:checked::after {
  content: "✓";
  color: white;
  font-size: 15px;
  font-weight: 900;
}

#detailPage .option-check input[type="checkbox"]:focus-visible {
  outline: 3px solid #ffd0c0;
  outline-offset: 2px;
}

#detailPage #registerBtn.remove-mode {
  background: #fff0ed;
  color: #c84b38;
  border: 1px solid #ffc6b8;
}

/* 選択済みカードも詳細を開けることを明示 */
#menuList .menu-item.selected-menu {
  cursor: pointer;
}

/* 詳細画面：選択済みの変更・削除を並列表示 */
#detailPage .detail-action-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  width: 100%;
}

#detailPage .detail-action-row .next-btn {
  flex: 1;
  min-width: 0;
  width: auto;
  margin: 0;
  border-radius: 16px;
  padding: 13px 8px;
  font-size: 14px;
}

#detailPage #removeDetailBtn {
  background: #fff0ed;
  color: #bd4935;
  border: 1px solid #f4b4a6;
}

#detailPage #removeDetailBtn:hover {
  background: #ffe5dd;
}

/* 確認画面：スープの飲む・飲まない切替 */
.modal-toggle-soup-btn {
  border: none;
  border-radius: 999px;
  background: #fff0e7;
  color: #bf562c;
  font-size: 11px;
  font-weight: bold;
  padding: 5px 10px;
  cursor: pointer;
}

.modal-toggle-soup-btn[aria-pressed="true"] {
  background: #fce0d4;
  color: #a54324;
}

/* 200番：確認画面の操作ボタンを視認しやすく */
#confirmModal .confirm-food-actions .modal-add-large-btn,
#confirmModal .confirm-food-actions .modal-cancel-large-btn,
#confirmModal .confirm-food-actions .modal-toggle-soup-btn {
  border: 1.5px solid #343434;
  border-radius: 999px;
  padding: 7px 12px;
  min-height: 32px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
  transition: background-color .15s, transform .15s;
}

#confirmModal .confirm-food-actions button:active {
  transform: scale(.97);
}

#confirmModal .confirm-food-actions button:focus-visible {
  outline: 3px solid #ffb58f;
  outline-offset: 2px;
}

/* 確認画面：栄養レーダーを独立した淡い背景のカードに */
#confirmModal .modal-chart-area {
  background: #fff5ed;
  border: 1px solid #f4dfd1;
  border-radius: 18px;
  padding: 16px 10px;
  margin-top: 18px;
  height: 272px;
  box-sizing: border-box;
}


/* ===== 200番：全画面の視覚的な統一（2026-11） ===== */
/* 本日の食事：確認画面と同じく、丸い操作ボタンの境界を明確に */
#todayPage .today-food-actions .today-add-large-btn,
#todayPage .today-food-actions .today-cancel-large-btn,
#todayPage .today-food-actions .today-soup-btn,
#todayPage .today-food-actions .today-cancel-soup-btn {
  border: 1.5px solid #343434;
  border-radius: 999px;
  min-height: 33px;
  padding: 6px 11px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .07);
}

#todayPage .today-food-actions button:focus-visible {
  outline: 3px solid #ffb58f;
  outline-offset: 2px;
}

/* 数量：オレンジを抑えた、濃淡のあるモノトーン */
.today-quantity-controls .today-quantity-minus,
.today-quantity-controls .today-quantity-plus,
.today-quantity-controls .history-quantity-minus,
.today-quantity-controls .history-quantity-plus {
  background: #e9eaec;
  color: #292b2f;
  border: 1.5px solid #8c9096;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .09);
}

.today-quantity-controls button:not(:disabled):hover {
  background: #d9dbde;
  border-color: #555960;
}

.today-quantity-controls button:focus-visible {
  outline: 3px solid #aeb3ba;
  outline-offset: 2px;
}

.today-quantity-controls strong {
  color: #36383d;
  font-weight: 800;
}

/* 本日の食事：各セクションを淡い色のカードにして区切りを強調 */
#todayPage .today-section {
  background: #fffaf6;
  border: 1px solid #f1e2d7;
  box-shadow: 0 4px 14px rgba(86, 58, 37, .045);
}

#todayPage .today-food-item {
  background: #ffffff;
  border-color: #ece3dd;
}

/* レーダーは少しだけ濃い色で、他の情報と視覚的に分離 */
#todayPage .chart-area,
#detailPage .chart-area,
#confirmModal .modal-chart-area,
#recommendModal .modal-chart-area,
#mypagePage .monthly-chart-area {
  background: #fff5ed;
  border: 1px solid #f4dfd1;
  border-radius: 18px;
  padding: 14px 10px;
  box-sizing: border-box;
}

#todayPage .chart-area {
  height: 285px;
}

#detailPage .chart-area {
  min-height: 270px;
}

#recommendModal .modal-chart-area {
  height: 260px;
}

#mypagePage .monthly-chart-area {
  height: 300px;
}

/* 詳細画面・モーダルの周辺カードも暖色の淡い背景で統一 */
#detailPage>.card,
#confirmModal .modal-box,
#recommendModal .modal-box {
  background: #fffdfb;
}

@media (max-width: 380px) {
  #todayPage .today-food-actions button {
    font-size: 10px;
    padding: 6px 9px;
  }

  .today-quantity-controls {
    gap: 6px;
  }
}


/* ===== 200番：操作ボタンの枠線をやさしいグレーに統一 ===== */
/* 淡いボタン背景に対して黒が強すぎないよう、輪郭は中間グレーに */
#confirmModal .confirm-food-actions .modal-add-large-btn,
#confirmModal .confirm-food-actions .modal-cancel-large-btn,
#confirmModal .confirm-food-actions .modal-toggle-soup-btn,
#confirmModal .confirm-food-actions .remove-food-btn,
#todayPage .today-food-actions .today-add-large-btn,
#todayPage .today-food-actions .today-cancel-large-btn,
#todayPage .today-food-actions .today-soup-btn,
#todayPage .today-food-actions .today-cancel-soup-btn,
#todayPage .today-food-actions .today-remove-btn {
  border: 1.5px solid #858585;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .045);
}

/* 削除も同じ輪郭で押せることが分かるように */
#confirmModal .confirm-food-actions .remove-food-btn,
#todayPage .today-food-actions .today-remove-btn {
  background: #eeeeee;
  color: #4b4b4b;
  padding: 7px 12px;
  min-height: 32px;
  font-weight: 700;
}

/* 詳細画面の削除ボタンも同じトーンに */
#detailPage #removeDetailBtn {
  border: 1.5px solid #858585;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .045);
}


/* おすすめ追加メニュー：栄養表示を他画面と同じ行形式に */
#recommendModal .recommend-nutrition-table {
  background: #fff9f4;
  border: 1px solid #f0e2d8;
  border-radius: 16px;
  padding: 10px 12px;
  box-sizing: border-box;
  width: 100%;
}

#recommendModal .recommend-nutrition-header,
#recommendModal .recommend-nutrition-row {
  display: grid;
  grid-template-columns: 34% 33% 33%;
  align-items: center;
  text-align: center;
}

#recommendModal .recommend-nutrition-header {
  color: #555;
  font-size: 12px;
  font-weight: 800;
  padding: 9px 0;
  border-bottom: 2px solid #d1d5db;
}

#recommendModal .recommend-nutrition-row {
  min-height: 47px;
  padding: 7px 0;
  border-bottom: 1px solid #e9e1db;
  box-sizing: border-box;
}

#recommendModal .recommend-nutrition-row:last-child {
  border-bottom: 0;
}

#recommendModal .recommend-nutrition-label {
  font-size: 13px;
  font-weight: 700;
  color: #444;
}

#recommendModal .recommend-nutrition-value {
  font-size: 15px;
  font-weight: 800;
  color: #333;
  white-space: nowrap;
}

#recommendModal .recommend-nutrition-value small {
  font-size: 10px;
  font-weight: 600;
  margin-left: 2px;
  color: #777;
}

#recommendModal .recommend-nutrition-after {
  color: #d76737;
}

/* マイページの月別棒グラフ：淡い暖色背景で周囲となじませる */
#mypagePage .monthly-chart-area {
  background: #fff3e9;
  border: 1px solid #e5e1dc;
  border-radius: 18px;
  box-shadow: 0 3px 12px rgba(70, 60, 50, 0.06);
  padding: 16px 12px;
  box-sizing: border-box;
}

/* 月別栄養摂取状況：見出し・切替ボタン・棒グラフをまとめて淡色カードに */
#mypagePage #monthlyNutritionSection {
  margin-top: 24px;
  padding: 18px 14px 20px;
  background: #fff3e9;
  border: 1px solid #ecd9cc;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(86, 58, 37, 0.05);
}

#mypagePage #monthlyNutritionSection .monthly-chart-area {
  background: #fff8f2;
  border: 1px solid #eadbd0;
  border-radius: 16px;
  padding: 12px 8px;
  box-sizing: border-box;
  height: 300px;
}

/* マイページ：基本情報カードの背景を白に統一 */
#mypagePage .profile-card {
  background: #ffffff;
}
/* 2回目以降のSTART画面 */
.return-start-page { min-height:calc(100vh - 32px); align-items:center; justify-content:center; padding:20px 0; }
.return-start-card { width:100%; padding:36px 22px; background:#fff; border-radius:28px; text-align:center; box-shadow:0 8px 24px rgba(0,0,0,.08); }
.return-start-logo { display:grid; place-items:center; width:76px; height:76px; margin:0 auto 18px; border-radius:24px; background:linear-gradient(135deg,#ff7043,#ff5722); font-size:36px; }
.return-start-card h1 { margin:0; font-size:25px; color:#e95729; }
.return-start-lead { color:#777; margin:12px 0 28px; }
.return-start-saved { background:#fff7f1; border-radius:14px; padding:14px; color:#79523e; font-size:13px; }
.return-start-btn { display:block; width:100%; margin-top:20px; padding:18px; border:0; border-radius:16px; background:linear-gradient(135deg,#ff7043,#ff5722); color:#fff; font-size:20px; font-weight:900; cursor:pointer; }
.return-switch-btn { margin-top:18px; border:0; background:transparent; color:#777; text-decoration:underline; cursor:pointer; }

/* エネルギーは厚労省による1食の許容幅がないため中立表示 */
.nutrition-item.is-neutral { background: linear-gradient(180deg,#f7f8fa,#fff); border-color:#dfe3e8; }
.nutrition-item.is-neutral::before { background:#9aa3ad; }
.diff-neutral { display:inline-flex;align-items:center;justify-content:center;min-height:22px;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:800;color:#59636e;background:#edf0f3; }
.quick-nutrition-status.neutral {color:#59636e;background:#edf0f3;border-color:#dfe3e8;}
.quick-gauge-marker.neutral {background:#89939e;border-color:#89939e;}
#detailPage #nutritionGrid .diff-neutral, #confirmModal .diff-neutral, #todayFood .diff-neutral, .history-detail-card .diff-neutral {color:#59636e;background:#edf0f3;}

/* 2026-11: エネルギー行の数値と中立差分が重ならないよう列幅を調整 */
#detailPage .detail-nutrition-header,
#detailPage #nutritionGrid .nutrition-item,
#todayFood .nutrition-column-header,
#todayFood .nutrition-item,
#confirmModal .nutrition-column-header,
#confirmModal .nutrition-item {
  grid-template-columns: 26% 25% 28% 21%;
}
#detailPage #nutritionGrid .diff-neutral,
#todayFood .nutrition-item .diff-neutral,
#confirmModal .nutrition-item .diff-neutral,
.history-detail-card .diff-neutral {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  padding: 4px 3px;
  font-size: 10px;
  white-space: nowrap;
  justify-self: center;
}
#detailPage #nutritionGrid .nutrition-item.is-neutral .n-value,
#todayFood .nutrition-item.is-neutral .n-value,
#confirmModal .nutrition-item.is-neutral .n-value {
  font-size: 14px;
}
#detailPage #nutritionGrid .nutrition-item.is-neutral .n-unit,
#todayFood .nutrition-item.is-neutral .n-unit,
#confirmModal .nutrition-item.is-neutral .n-unit {
  font-size: 9px;
}

/* 年齢・身長：階層式セレクター */
.hierarchy-native-select { display: none; }
.hierarchy-picker { width: 100%; font-size: 16px; }
.hierarchy-picker button { font-family: inherit; cursor: pointer; }
.hierarchy-summary { width:100%; min-height:60px; padding:15px 18px; display:flex; align-items:center; justify-content:space-between; background:#fff; color:#333; border:2px solid #e5e5e5; border-radius:17px; font-size:18px; font-weight:700; text-align:left; }
.hierarchy-summary:focus-visible,.hierarchy-group-button:focus-visible,.hierarchy-choice:focus-visible { outline:3px solid #ff7043; outline-offset:2px; }
.hierarchy-chevron { color:#ff5722; font-size:23px; font-weight:700; }
.hierarchy-groups { margin-top:9px; padding:7px; background:#fff; border:1px solid #e8e8e8; border-radius:16px; max-height:290px; overflow-y:auto; }
.hierarchy-section + .hierarchy-section { border-top:1px solid #f1f1f1; }
.hierarchy-group-button { width:100%; display:flex; align-items:center; justify-content:space-between; padding:12px 13px; background:transparent; border:0; color:#444; font-size:16px; font-weight:700; text-align:left; }
.hierarchy-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; padding:4px 8px 12px; }
.hierarchy-choice { padding:12px 4px; border:1px solid #ededed; border-radius:10px; background:#f7f7f7; color:#444; font-size:14px; font-weight:700; }
.hierarchy-choice.is-selected { background:#fff0e9; color:#e64a19; border-color:#ff7043; }

/* 基本情報入力のナビゲーション */
#inputCard .button-area { display:block; width:100%; }
#inputCard .button-area .next-btn { width:100%; box-sizing:border-box; }
#profileBackBtn { width:100%; box-sizing:border-box; margin-top:12px; border:1px solid #cbd5e1; background:#fff; color:#334155; border-radius:12px; padding:12px 18px; font-size:15px; cursor:pointer; align-items:center; justify-content:center; white-space:nowrap; }
#cancelProfileEditBtn { display:block; width:100%; margin-top:12px; padding:12px; border:1px solid #cbd5e1; border-radius:12px; background:transparent; color:#475569; font-size:14px; cursor:pointer; }

/* 基本情報入力：戻る操作の視認性を改善 */
#profileBackBtn,
#cancelProfileEditBtn {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  margin-top: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
#profileBackBtn {
  background: #edf4fb;
  border: 1.5px solid #a6c4df;
  color: #315b7d;
}
#cancelProfileEditBtn {
  background: #e9f0f7;
  border: 1.5px solid #94b3ce;
  color: #284f71;
}
#profileBackBtn:hover,
#cancelProfileEditBtn:hover {
  background: #dbeafa;
  border-color: #6c9ec8;
  box-shadow: 0 2px 6px rgba(36, 81, 118, .10);
}
#profileBackBtn:focus-visible,
#cancelProfileEditBtn:focus-visible {
  outline: 3px solid rgba(50, 120, 190, .32);
  outline-offset: 2px;
}

/* 基本情報編集時のみ、マイページへの導線をカード左上に配置 */
#inputCard #cancelProfileEditBtn {
  width: fit-content;
  max-width: 100%;
  min-height: 38px;
  margin: 0 0 22px 0;
  padding: 8px 13px;
  display: none;
  justify-content: flex-start;
  border: 1px solid #bfd0df;
  border-radius: 10px;
  background: #f1f6fa;
  color: #315b7d;
  font-size: 14px;
  box-shadow: none;
}
#inputCard #cancelProfileEditBtn:hover {
  background: #e4eef7;
  border-color: #94b3ce;
}

/* 月別グラフ：押しやすいカスタム凡例 */
.monthly-chart-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 14px;
}
.monthly-legend-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 15px;
  border: 1.5px solid;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color .15s, opacity .15s;
  touch-action: manipulation;
}
.monthly-legend-btn.orange { background: #fff0e7; border-color: #ef9a68; color: #a34c18; }
.monthly-legend-btn.blue { background: #e9f3ff; border-color: #85b2e8; color: #285f9c; }
.monthly-legend-btn.is-hidden { background: #f3f4f6; border-color: #d3d6da; color: #737b86; }
.monthly-legend-mark { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.monthly-legend-btn.orange .monthly-legend-mark { background: #ff9800; }
.monthly-legend-btn.blue .monthly-legend-mark { background: #2196f3; }
.monthly-legend-btn.is-hidden .monthly-legend-mark { background: #a0a6ad; }
.monthly-legend-eye { font-size: 17px; line-height: 1; }
.monthly-legend-btn:focus-visible { outline: 3px solid #333; outline-offset: 2px; }

/* 2号館 日替わりカード：写真がある場合は大きく表示 */
.daily-menu-content:has(.daily-menu-placeholder.has-photo) { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.daily-menu-placeholder.has-photo { width: 100%; height: auto; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; border-radius: 14px; }
.daily-menu-placeholder.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.daily-menu-content:has(.daily-menu-placeholder.has-photo) .daily-menu-details { width: 100%; }
