/* まるっとヘルスラボ — グラフ・体重の記録（担当：graph／接頭辞 graph-） */
.graph-page { display: flex; flex-direction: column; gap: 14px; }
.graph-lead { font-size: 17px; font-weight: 800; margin: 0 0 4px; line-height: 1.5; }
.graph-note { font-size: 14px; color: var(--ink-2); margin: 8px 0 0; line-height: 1.6; }
.graph-say:empty { display: none; }

/* ----- まとめ ----- */
.graph-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.graph-tile { background: var(--paper-2); border-radius: var(--radius-s); padding: 10px 12px; min-width: 0; }
.graph-tile-label { font-size: 14px; font-weight: 700; color: var(--ink-2); line-height: 1.4; }
.graph-tile-value { font-size: 26px; font-weight: 800; line-height: 1.25; color: var(--ink); white-space: nowrap; }
.graph-tile-wordy .graph-tile-value { font-size: 20px; padding: 3px 0; white-space: normal; }
.graph-tile-unit { font-size: 15px; font-weight: 700; margin-left: 3px; color: var(--ink-2); }
.graph-tile-sub { font-size: 13px; color: var(--ink-2); line-height: 1.45; margin-top: 2px; }
.graph-summary-empty p { margin: 0 0 4px; }

/* ----- 注意 ----- */
.graph-notice p { margin: 0 0 6px; line-height: 1.65; }
.graph-notice-foot { display: flex; justify-content: flex-end; }
.graph-notice-foot:empty { display: none; }

/* ----- 切りかえ ----- */
.graph-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--paper-2); border-radius: 999px; }
.graph-switch-btn {
  min-height: 44px; border: 0; border-radius: 999px; background: transparent; font-weight: 800; font-size: 16px; color: var(--ink-2);
  padding: 6px 4px; white-space: nowrap;
}
.graph-switch-btn.is-on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(110, 70, 20, .18); }
.graph-chart-body { margin-top: 10px; }
.graph-empty-text { font-size: 16px; color: var(--ink-2); padding: 16px 4px; margin: 0; }

/* ----- グラフ ----- */
.graph-box { position: relative; width: 100%; }
.graph-svg { display: block; overflow: visible; font-family: var(--font); -webkit-user-select: none; user-select: none; }
.graph-band { fill: var(--ok-soft); }
.graph-band-label { fill: #256b40; font-size: 13px; font-weight: 700; }
.graph-grid { stroke: var(--line); stroke-width: 1; }
.graph-xgrid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.graph-axis { stroke: #cdb99f; stroke-width: 1.5; }
.graph-ytick, .graph-xtick { fill: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.graph-xyear, .graph-yunit { fill: var(--ink-2); font-size: 13px; }
.graph-today { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 1 3; opacity: .8; }
.graph-today-label { fill: var(--ink-2); font-size: 13px; font-weight: 700; }
.graph-goal { stroke: var(--fumi); stroke-width: 2; stroke-dasharray: 7 5; stroke-linecap: round; fill: none; }
.graph-goal-end { fill: var(--paper); stroke: var(--fumi); stroke-width: 2; }
.graph-goal-label { fill: var(--ink); font-size: 14px; font-weight: 800; paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.graph-line { stroke: var(--miso); stroke-width: 2.5; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.graph-dot { fill: var(--miso); stroke: var(--paper); stroke-width: 2; }
.graph-pt .graph-dot.is-on { fill: #245a94; }
.graph-hit { fill: transparent; cursor: pointer; outline: none; }
.graph-hit:focus-visible { fill: rgba(63, 127, 196, .18); }
.graph-last-label { fill: var(--ink); font-size: 15px; font-weight: 800; paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; font-variant-numeric: tabular-nums; }
.graph-tip {
  position: absolute; z-index: 2; transform: translateX(-50%); min-width: 140px; padding: 8px 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: 0 4px 14px rgba(80, 50, 20, .18);
  font-size: 15px; line-height: 1.5; pointer-events: none; white-space: nowrap;
}
.graph-tip-date { font-size: 14px; font-weight: 800; color: var(--ink-2); }
.graph-tip-row b { font-variant-numeric: tabular-nums; }

/* ----- 凡例 ----- */
.graph-legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.graph-legend-item { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--ink); line-height: 1.5; }
.graph-sw { flex: 0 0 30px; }
.graph-legend-item .ref-btn { padding: 0 2px; min-height: 28px; }
.graph-caption { font-size: 14px; color: var(--ink-2); margin: 8px 0 0; line-height: 1.6; }

/* ----- 記録する ----- */
.graph-add .graph-lead { margin-bottom: 2px; }
.graph-add-sub { margin: 0 0 10px; }
.graph-add-btn { margin-top: 10px; }
.graph-form .field-input[type="date"] { font-size: 17px; }
.graph-over { margin: 0; }

/* ----- 一覧 ----- */
.graph-list { list-style: none; margin: 10px 0 0; padding: 0; }
.graph-list-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.graph-list-row:first-child { border-top: 0; }
.graph-list-main { flex: 1; min-width: 0; }
.graph-list-date { font-size: 14px; font-weight: 700; color: var(--ink-2); line-height: 1.4; }
.graph-list-vals { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; row-gap: 0; }
.graph-list-w { font-size: 20px; font-weight: 800; line-height: 1.35; }
.graph-list-w small { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.graph-list-meta { font-size: 15px; color: var(--ink); }
.graph-del { flex: 0 0 auto; min-height: 44px; min-width: 64px; padding: 6px 14px; font-size: 15px; }
.graph-more { margin-top: 8px; }

@media (max-width: 370px) {
  .graph-tile-value { font-size: 23px; }
  .graph-switch-btn { font-size: 15px; }
}
