.body-range-tabs { margin-top: 2px; }
.body-period-chart { min-height: 178px; }
.body-period-chart .goal-band { fill: rgba(113, 166, 201, .18); }
.body-period-chart .goal-line { stroke: #6d91ae; stroke-width: 1.5; stroke-dasharray: 5 4; }
.body-period-chart .chart-date { font-size: 8px; }
.body-source-images { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; padding: 10px; margin-bottom: 10px; border: 1px solid #d8e8ed; border-radius: 14px; color: #5a7788; background: #f7fcfd; }
.body-source-images strong { width: 100%; font-size: 13px; }
.body-source-images > p { width: 100%; margin: -4px 0 0; font-size: 11px; }
.body-source-images > img, .body-image-strip img { width: 64px; height: 64px; border-radius: 11px; object-fit: cover; cursor: zoom-in; }
.body-image-strip { display: flex; flex-wrap: wrap; gap: 7px; }
.protected-photo-preview { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; width: 64px; height: 64px; overflow: hidden; border-radius: 11px; background: #eaf4f7; cursor: pointer; }
.protected-photo-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.protected-photo-preview img[hidden], .protected-photo-status[hidden] { display: none; }
.protected-photo-status { padding: 3px; color: #587889; font: 10px sans-serif; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.meal-image-thumb .protected-photo-preview { width: 34px; height: 34px; border: 1px solid white; border-radius: 9px; }
.meal-image-thumb .protected-photo-status { font-size: 8px; }
.body-record-with-photo .protected-photo-preview { width: 52px; height: 52px; }
.body-extra-fields { margin-top: 14px; padding: 14px; border: 1px solid #cfe4dd; border-radius: 14px; background: #f7fcfa; color: #52776a; }
.body-extra-fields > strong { font-size: 14px; }
.body-extra-fields > p { margin: 5px 0 12px; font-size: 12px; line-height: 1.5; }
.body-extra-fields .health-form-grid { margin: 0; }
.body-image-delete { min-height: 36px; margin-left: auto; padding: 7px 10px; border: 1px solid #efc7ca; border-radius: 11px; color: #a15e68; background: #fff7f7; font: 700 12px "Yomogi Local", sans-serif; }
.shared-body-record > button { padding: 7px 10px; border: 0; border-radius: 10px; color: #527c96; background: #e8f4f6; font: 700 12px "Yomogi Local", sans-serif; }
.shared-body-photo { box-sizing: border-box; padding: 20px; }
.shared-body-photo header, .shared-body-photo-navigation { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.shared-body-photo h2 { margin: 0; font-size: 18px; }
.shared-body-photo-content { margin-top: 12px; color: #5a7788; font-size: 13px; }
.shared-body-photo-content img { display: block; max-width: 100%; max-height: 65vh; margin: 0 auto; object-fit: contain; }
.shared-body-photo-navigation { margin-top: 10px; }
.shared-body-photo-navigation button { padding: 8px; border: 0; border-radius: 10px; color: #527c96; background: #e8f4f6; }
.step-day.is-selected { outline: 2px solid #608c82; outline-offset: -2px; }
.body-trash-toggle { width: 100%; margin-top: 10px; padding: 9px; border: 1px solid #d7e4ea; border-radius: 12px; color: #607f91; background: #f7fbfd; font: 700 12px "Yomogi Local", sans-serif; }
.body-trash { margin-top: 8px; padding: 10px; border: 1px solid #d9e6eb; border-radius: 14px; background: #fbfdfe; }
.body-trash h3 { margin: 0 0 7px; color: #607e90; font-size: 13px; }
.body-trash-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 1px; border-top: 1px solid #e7eff2; color: #668092; font-size: 11px; }
.body-trash-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.body-trash-row button { flex: 0 0 auto; padding: 6px 9px; border: 0; border-radius: 9px; color: #527c96; background: #e8f4f6; font: 700 11px "Yomogi Local", sans-serif; }

.step-period-chart { min-height: 178px; }
.step-period-chart .step-goal-line { stroke: #6d91ae; stroke-width: 1.5; stroke-dasharray: 5 4; }
.step-period-chart .chart-date { font-size: 8px; }
.step-calendar-navigation { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; margin: 5px 0 7px; text-align: center; }
.step-calendar-navigation strong { color: #56758a; font-size: 15px; }
.step-calendar-navigation button { min-height: 32px; border: 0; border-radius: 10px; color: #537b98; background: #edf5f9; font-size: 24px; line-height: 1; }
.step-calendar-navigation button:disabled { opacity: .35; }
.step-calendar-legend { display: flex; justify-content: flex-end; gap: 7px; margin: 0 1px 6px; color: #718998; font-size: 10px; }
.step-calendar-legend span::before { display: inline-block; width: 8px; height: 8px; margin-right: 3px; border-radius: 50%; content: ""; }
.step-calendar-legend .is-goal::before { background: #b9e3d1; }
.step-calendar-legend .is-under::before { background: #dce9f3; }
.step-calendar-legend .is-recorded::before { background: #e8eef3; }
.step-calendar-legend .is-empty::before { border: 1px solid #d8e1e7; background: #f7f9fa; }
.step-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 3px; color: #839aa8; font-size: 10px; text-align: center; }
.step-weekdays span:first-child { color: #c7868d; }
.step-weekdays span:last-child { color: #6f9ac1; }
.step-calendar { gap: 4px; }
.step-day { display: flex; min-width: 0; min-height: 48px; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 3px 1px; border: 1px solid transparent; font: inherit; }
.step-day.goal { color: #397c69; background: #cdeadd; }
.step-day.under-goal { color: #58758a; background: #dfedf6; }
.step-day.recorded { color: #657b8a; background: #e8eef3; }
.step-day.unrecorded { color: #9aaab4; background: #f6f8fa; }
.step-day.is-today { border-color: #7eb4c5; box-shadow: inset 0 0 0 1px rgba(126,180,197,.22); }
.step-day .step-date { font-size: 10px; line-height: 1; }
.step-day .step-count { max-width: 100%; overflow: hidden; color: inherit; font-size: clamp(8px,2.35vw,10px); line-height: 1.05; letter-spacing: -.3px; white-space: nowrap; }
.step-day small { color: #b4c0c8; font-size: 11px; }
.health-undo { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin: -4px 3px 9px; padding: 8px 9px 8px 11px; border-radius: 12px; color: #687984; background: #e8ecef; font-size: 12px; filter: grayscale(1); }
.health-undo button { flex: 0 0 auto; min-height: 30px; padding: 5px 9px; border: 0; border-radius: 9px; color: #586c77; background: #fff; font: 700 12px "Yomogi Local", sans-serif; }
.health-popopo-comment { display: flex; align-items: center; gap: 8px; margin: 10px 1px 12px; padding: 9px 12px 9px 9px; border: 1px solid #d6e9e3; border-radius: 16px; color: #5f7c79; background: rgba(250,255,252,.88); }
.health-popopo-comment img { flex: 0 0 auto; width: 39px; height: 39px; object-fit: contain; }
.health-popopo-comment p { margin: 0; font-size: 12px; line-height: 1.48; }

/* 食事詳細は標準フォームの横並びを使わず、狭い画面でも項目を読みやすく収める。 */
.health-dialog .meal-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.health-dialog .meal-form-grid > label { display: grid; min-width: 0; gap: 5px; color: #5e7988; font-size: 12px; }
.health-dialog .meal-form-grid > label:nth-child(3),
.health-dialog .meal-form-grid > .meal-dishes,
.health-dialog .meal-form-grid > .meal-calorie,
.health-dialog .meal-form-grid > .meal-editor-images,
.health-dialog .meal-form-grid > label:last-child { grid-column: 1 / -1; }
.health-dialog .meal-form-grid input,
.health-dialog .meal-form-grid select,
.health-dialog .meal-form-grid textarea { box-sizing: border-box; width: 100%; min-width: 0; min-height: 42px; border: 1px solid #cfe0e6; border-radius: 12px; color: #506b7c; background: #fff; font: 15px "Hiragino Maru Gothic ProN", sans-serif; }
.health-dialog .meal-form-grid input,
.health-dialog .meal-form-grid select { padding: 8px 10px; }
.health-dialog .meal-form-grid textarea { min-height: 76px; padding: 10px; resize: vertical; }
.health-dialog .meal-dishes { min-width: 0; padding: 11px; border: 1px solid #d8e8ed; border-radius: 15px; background: #fbfdfe; }
.health-dialog .dish-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; min-width: 0; padding: 11px 0; border-bottom: 1px solid #e4eef1; }
.health-dialog .dish-row:last-child { border-bottom: 0; }
.health-dialog .dish-row label { display: grid; min-width: 0; gap: 5px; color: #657f8e; font-size: 11px; }
.health-dialog .dish-row label > span { padding-left: 1px; }
.health-dialog .dish-name input { min-height: 44px; font-size: 16px; }
.health-dialog .dish-amount-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.health-dialog .dish-controls { display: grid; grid-template-columns: minmax(0, 1fr) 42px; align-items: end; gap: 8px; min-width: 0; }
.health-dialog .dish-controls .dish-calorie { min-width: 0; }
.health-dialog .dish-calorie { position: relative; }
.health-dialog .dish-calorie input { padding-right: 42px; }
.health-dialog .dish-calorie i { position: absolute; right: 11px; bottom: 13px; color: #7190a0; font: 12px "Hiragino Maru Gothic ProN", sans-serif; font-style: normal; pointer-events: none; }
.health-dialog .dish-controls button { width: 42px; height: 42px; min-height: 42px; padding: 0; }
.health-dialog .dish-calorie-pending { margin: 0; padding: 10px; border-radius: 11px; color: #748d9a; background: #eef6f8; font-size: 12px; text-align: center; }
.health-dialog .meal-calorie { display: grid; gap: 3px; padding: 10px 12px; border-radius: 13px; color: #5a7788; background: #eef7f7; }
.health-dialog .meal-calorie output { color: #426e83; font-weight: 700; }
.health-dialog .meal-calorie p { margin: 0; font-size: 11px; line-height: 1.45; }
@media (max-width: 360px) { .health-dialog .dish-amount-grid { grid-template-columns: 1fr; } }
.health-dialog .body-photo-feedback { margin: 0 0 14px; padding: 14px; border: 1px solid #cfe4dd; border-radius: 14px; background: #f2faf5; color: #395e50; font-size: 13px; line-height: 1.55; }
.health-dialog .body-photo-feedback p { margin: 7px 0 0; }
