/* AIパーソナル — monochrome */
:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --line: #262626;
  --text: #f5f5f5;
  --muted: #8a8a8a;
  --faint: #4a4a4a;
  --accent: #ffffff;
  --accent-ink: #0a0a0a;
  --p: #ffffff;
  --f: #9a9a9a;
  --c: #4d4d4d;
  --danger: #ff6b6b;
  --radius: 18px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f4f2;
    --surface: #ffffff;
    --line: #e4e4e0;
    --text: #0a0a0a;
    --muted: #6b6b6b;
    --faint: #c4c4c0;
    --accent: #0a0a0a;
    --accent-ink: #ffffff;
    --p: #0a0a0a;
    --f: #7a7a7a;
    --c: #c9c9c6;
    --danger: #c62828;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: inherit; }
img { display: block; max-width: 100%; }

.top {
  position: sticky; top: 0; z-index: 10;
  padding: calc(env(safe-area-inset-top) + 14px) 20px 14px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 13px; letter-spacing: .02em;
}
.brand .word { font-weight: 700; font-size: 13px; letter-spacing: .32em; }

.wrap { max-width: 560px; margin: 0 auto; padding: 4px 16px 48px; }

/* 文字 */
.hero { font-size: 34px; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; margin: 28px 0 12px; }
.title { font-size: 24px; line-height: 1.35; font-weight: 800; margin: 12px 0 8px; }
.lead { color: var(--muted); margin: 0 0 20px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .24em; color: var(--muted); }
.note, .fine { font-size: 12px; color: var(--muted); }
.fine { margin-top: 24px; text-align: center; }
.empty { color: var(--muted); margin: 6px 0 2px; }
.pad { padding: 24px 4px; text-align: center; }
.alert {
  border: 1px solid var(--danger); color: var(--danger); border-radius: 12px;
  padding: 10px 14px; font-size: 14px; margin: 0 0 16px;
}

/* フォーム */
.stack { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input[type=email], input[type=text] {
  width: 100%; font: inherit; font-size: 17px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.code { text-align: center; font-size: 30px !important; letter-spacing: .4em; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  padding: 15px 20px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn:active { transform: scale(.98); }
.link { background: none; border: 0; padding: 8px 0; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link.danger { color: var(--danger); margin-top: 28px; }
.back { display: inline-block; font-size: 14px; color: var(--muted); text-decoration: none; margin: 4px 0 12px; }

/* 撮影 */
/* 下のタブバー（10/15 ヨッシー「めっちゃいいね」。あすけん型: 5 枠・真ん中は大きな「撮る」）。色は会社の見た目の変数のまま（標準はモノクロ） */
.has-tabs .wrap { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 1fr; align-items: end;
  padding: 8px 6px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabbar a, .tab-shoot { display: grid; justify-items: center; gap: 3px; text-decoration: none; color: var(--muted); font: inherit; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; position: relative; padding: 4px 0 0; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tabbar a svg, .tab-shoot svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--text); }
.tabbar a.on svg { stroke-width: 2.2; }
.tab-shoot .circ { width: 60px; height: 60px; border-radius: 50%; background: var(--text); color: var(--bg); display: grid; place-items: center; margin-top: -30px; box-shadow: 0 6px 18px rgba(0,0,0,.22); border: 3px solid var(--bg); }
.tab-shoot .circ svg { width: 28px; height: 28px; }
.tab-shoot > span:last-child { color: var(--text); }
.tab-shoot:active .circ { transform: scale(.96); }
.tab-shoot[disabled] { opacity: .6; }
.tab-badge { position: absolute; top: 0; right: calc(50% - 22px); min-width: 17px; height: 17px; border-radius: 9px; background: #d33; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--surface); line-height: 1; }
/* 送信中の案内（タブバーのすぐ上に浮かせる）。空なら出さない */
.shoot-msg { position: fixed; left: 16px; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 59; margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 13px; text-align: center; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.shoot-msg:empty { display: none; }
/* 画面内カメラが使えない端末だけ: 撮ってあった写真から選ぶ（タブバーの上の小さな丸いボタン） */
.lib-btn { position: fixed; right: 16px; bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 59; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.lib-btn[disabled] { opacity: .5; }
.lib-btn.lib-left { right: auto; left: 16px; text-decoration: none; } /* 画面内カメラが使えない端末の「文字で記録」（10/16） */
.add-line { margin: 6px 0 10px; display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.push-card .notify { margin-top: 10px; }
.messages .card-head .sub { text-decoration: underline; text-underline-offset: 3px; }

/* カード */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; margin: 0 0 14px;
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.hello, .sub { font-size: 12px; color: var(--muted); }
.big { display: flex; align-items: baseline; gap: 6px; margin: 2px 0 12px; }
.big .num { font-size: 52px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.big .unit { font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: .08em; }
.big .pre { font-size: 15px; color: var(--muted); }
.range { font-size: 12px; color: var(--muted); margin: -6px 0 12px; }

.pfc-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--line); gap: 2px; }
.pfc-bar i { display: block; height: 100%; }
.pfc-bar .p, .dot.p { background: var(--p); }
.pfc-bar .f, .dot.f { background: var(--f); }
.pfc-bar .c, .dot.c { background: var(--c); }
.pfc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; }
.pfc div { min-width: 0; }
.pfc dt { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.pfc dd { margin: 2px 0 0; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pfc dd small { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

/* 7 日 */
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 150px; margin-top: 8px; }
.bar { display: grid; grid-template-rows: 18px 1fr 20px; height: 100%; text-align: center; }
.bar .val { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar .col { display: flex; align-items: flex-end; justify-content: center; }
.bar .col i { display: block; width: 100%; max-width: 26px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--bar1, var(--faint)), var(--bar2, var(--faint))); }
.bar.is-today .col i { background: var(--accent); }
.bar.none .col { border-bottom: 2px dashed var(--line); }
.bar .lbl { font-size: 12px; color: var(--muted); padding-top: 2px; }
.bar.is-today .lbl { color: var(--text); font-weight: 800; }

/* 食事一覧 */
.day { font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--muted); margin: 22px 4px 8px; }
.meal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.meal a {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center;
  padding: 10px 14px 10px 10px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.thumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.meta { min-width: 0; display: grid; }
.when { font-size: 12px; color: var(--muted); }
.name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.kcal { text-align: right; font-variant-numeric: tabular-nums; }
.kcal b { display: block; font-size: 20px; letter-spacing: -.01em; line-height: 1.1; }
.kcal small { font-size: 10px; color: var(--muted); letter-spacing: .08em; }
.is-pending .name { color: var(--muted); }
.meal { position: relative; }
.meal a { padding-right: 40px; }
.mdel { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; border-radius: 50%; }
.mdel:active { background: var(--line); }

.spinner { display: inline-block; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--text); animation: spin .9s linear infinite; }
.spinner.big { width: 34px; height: 34px; margin: 18px auto; display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* 詳細 */
.photo { margin: 0 0 14px; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.photo img { width: 100%; height: auto; }
.detail .when { margin: 0; }
.advice {
  margin: 18px 0 0; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  font-weight: 600; line-height: 1.7;
}
.advice .eyebrow { display: block; margin-bottom: 4px; }
.breakdown { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 6px; }
.breakdown summary { cursor: pointer; padding: 10px 0; font-weight: 700; list-style: none; }
.breakdown summary::-webkit-details-marker { display: none; }
.breakdown summary::after { content: "＋"; float: right; color: var(--muted); }
.breakdown[open] summary::after { content: "－"; }
.breakdown h3 { font-size: 13px; margin: 14px 0 4px; color: var(--muted); }
.breakdown ul { list-style: none; padding: 0; margin: 0; }
.breakdown li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.breakdown .w, .breakdown .k { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag { font-style: normal; font-size: 10px; border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; margin-left: 6px; color: var(--muted); vertical-align: 2px; }
.warn { margin-top: 12px !important; }
.warn li { display: block !important; font-size: 12px; color: var(--muted); border: 0 !important; padding: 3px 0 !important; }
.warn li::before { content: "・"; }

.doc h2 { font-size: 16px; margin: 22px 0 6px; }
.doc p, .doc li { font-size: 14px; }
.logout { text-align: center; margin-top: 36px; }

/* トレーナーからのメッセージ（会員側） */
.trainer-msg { margin: 0 0 14px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.trainer-msg.is-new { border-color: var(--accent); }
.trainer-msg .msg { margin-top: 8px; }
.trainer-msg .msg + .msg { border-top: 1px solid var(--line); padding-top: 10px; }
.trainer-msg b { font-size: 13px; }
.trainer-msg p { margin: 2px 0 4px; }
.muted { color: var(--muted); font-size: 12px; }
.detail .trainer-msg { margin-top: 18px; }

/* 店舗用 */
.area-staff .wrap { max-width: 1180px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand .badge { font-size: 10px; font-weight: 800; letter-spacing: .2em; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; color: var(--muted); }
.staff-nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.staff-nav a { text-decoration: none; font-weight: 700; }
.staff-nav form { margin: 0; }
.staff-head { margin: 8px 0 14px; }
.staff-head .title { margin-top: 2px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 2px; }
.kpi b { font-size: 34px; line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: 12px; }
.rows { list-style: none; padding: 0; margin: 6px 0 0; }
.rows li a { display: grid; grid-template-columns: minmax(120px, auto) 1fr auto; gap: 14px; align-items: baseline; padding: 11px 2px; border-top: 1px solid var(--line); text-decoration: none; }
.rows .go { color: var(--muted); }
.search { display: flex; gap: 8px; margin-top: 8px; max-width: 520px; }
.search input { flex: 1; }
.search .btn { padding: 12px 18px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl a { text-decoration: none; }
.tbl.small td, .tbl.small th { padding: 7px 10px; font-size: 13px; }
.detail .table-wrap { margin-top: 14px; }
.thumb.sm { display: block; width: 48px; height: 48px; border-radius: 10px; }
.cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); } .cols > * { min-width: 0; } /* 列は中身（種目タブの横並びなど）で広がらない。10/14 iPhone で縮小表示になった */
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; } }
.bars.wide { gap: 4px; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.bars.wide .bar .val { font-size: 9px; }
textarea { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; resize: vertical; }
.vis { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; }
.vis small { color: var(--muted); margin-left: 4px; }
.vis input { accent-color: var(--accent); }
.thread { list-style: none; padding: 0; margin: 14px 0 0; }
.thread li { border-top: 1px solid var(--line); padding: 12px 0 6px; }
.thread li.is-staff { border-left: 3px solid var(--faint); padding-left: 10px; }
.thread .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.thread p { margin: 6px 0 0; }
.thread .del { text-align: right; margin: 0; }
.thread .del .link { font-size: 12px; padding: 2px 0; }
.alert.ok { border-color: var(--line); color: var(--text); }

/* トレーニング（会員・店舗共通） */
.entries { list-style: none; padding: 0; margin: 8px 0 0; }
.entries li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.entries li:last-child { border-bottom: 0; }
.tipline { flex-basis: 100%; color: var(--muted); }
.coach-note { margin: 10px 0 0; font-size: 14px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--text) 6%, transparent); }
.tphotos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tphotos img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.big.sm .num { font-size: 34px; }
.prog-grid { display: grid; gap: 16px; }
@media (min-width: 480px) { .prog-grid { grid-template-columns: 1fr 1fr; } }
.delta { font-size: 13px; font-weight: 700; }
.spark { width: 100%; height: 34px; margin-top: 4px; }
.spark polyline { fill: none; stroke: var(--text); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.wform { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.wform input { width: 110px; font: inherit; font-size: 17px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.wform .btn { padding: 10px 16px; }
.lifts { list-style: none; padding: 0; margin: 6px 0 0; }
.lifts li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lifts b { font-variant-numeric: tabular-nums; }
.lifts small { color: var(--muted); margin-left: 2px; }
.history .sess { border-top: 1px solid var(--line); padding: 4px 0; }
.history .sess:first-of-type { border-top: 0; }
.history summary { cursor: pointer; display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; list-style: none; }
.history summary::-webkit-details-marker { display: none; }
.consent-line { text-align: center; margin: 4px 0 16px; }
.consent-line .link { margin-left: 6px; }

/* 店舗: トレーニング入力 */
.btn.wide { width: 100%; margin: 6px 0 4px; }
.sess-item { border-top: 1px solid var(--line); padding: 12px 0 4px; margin-top: 8px; }
.sess-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.tform .sess { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tform input[type=date], .tform input[type=number], .tform select, .tform input[type=text] {
  font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%;
}
.trow-head { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; }
.trow-head .exname, .trow-head .freecat { grid-column: 2 / 3; }
.trow-head .num { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.trow .f { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.trow .f.other { grid-template-columns: repeat(2, 1fr); }
.trow .f label { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.trow .f label input { grid-column: 1 / 2; }
.trow .f label small { grid-row: 2; grid-column: 2; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.seg button { font: inherit; font-size: 14px; font-weight: 700; padding: 10px 0; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.trow .note { margin-top: 10px; }
.photo-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.pthumb img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
[hidden] { display: none !important; }

/* ホーム画面への追加の案内 */
.install-hint { margin: 0 0 14px; padding: 14px 16px; border: 1px dashed var(--faint); border-radius: var(--radius); font-size: 14px; }
.install-hint p { margin: 6px 0 0; color: var(--muted); }
.install-hint .share { display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; font-size: 12px; }
.install-hint .link { padding: 4px 0 0; font-size: 12px; }

/* 実際のカロリーの入力（任意） */
.truth { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 14px; }
.truth h2 { font-size: 15px; margin: 0 0 6px; }
.breakdown h3 small { font-weight: 400; margin-left: 6px; }
.breakdown .sub { display: block; }

/* 合計カロリー（日・週・月の切り替え） 10/11 */
.totals .seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin: 10px 0 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; }
.totals .seg label { text-align: center; padding: 8px 0; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; user-select: none; }
#span-d:checked ~ .seg label[for="span-d"], #span-w:checked ~ .seg label[for="span-w"], #span-m:checked ~ .seg label[for="span-m"] { background: var(--accent); color: var(--accent-ink); }
.totals .pane { display: none; }
#span-d:checked ~ .pane-d, #span-w:checked ~ .pane-w, #span-m:checked ~ .pane-m { display: block; }
.hbars { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.hbars li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.hbars .hl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.hbars .ht { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.hbars .ht i { display: block; height: 100%; background: linear-gradient(90deg, var(--bar2, var(--accent)), var(--bar1, var(--accent))); border-radius: 99px; }
.hbars b { font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
.month-nav { display: flex; justify-content: space-between; align-items: center; margin: 0 4px 12px; }
.month-nav b { font-size: 16px; }
.link.off { opacity: .35; text-decoration: none; cursor: default; }
.day-sum { float: right; font-weight: 700; color: var(--text); letter-spacing: 0; }
.totals .bars.wide, .bars.wide { gap: 2px; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
#span-d:focus-visible ~ .seg label[for="span-d"], #span-w:focus-visible ~ .seg label[for="span-w"], #span-m:focus-visible ~ .seg label[for="span-m"] { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 目標体重 10/11 */
.goal .card-head a.sub { color: var(--muted); text-decoration: none; }
.meter { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 2px 0 10px; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.goal .advice { margin: 10px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.7; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.goal-form select { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 12px; }
.goal-form fieldset { border: 0; padding: 0; margin: 0; }
.choice { display: flex; gap: 18px; color: var(--text); font-size: 16px; }
.choice input { width: 18px; height: 18px; accent-color: var(--accent); vertical-align: -3px; }
.goal-form .field input { padding: 13px 12px; }
.goal-pfc dd.muted { font-size: 11px; font-weight: 400; margin-top: 2px; }

/* 続けるための機能 10/11（目立たせすぎない） */
.capture-sub { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 0; font-size: 13px; }
.capture-sub a { color: var(--muted); }
.streak { font-weight: 700; color: var(--text); }
.review p { margin: 6px 0 0; font-size: 14px; line-height: 1.7; }
.bars { position: relative; }
.bars .target { position: absolute; left: 0; right: 0; top: calc(18px + (100% - 38px) * (1 - var(--r))); border-top: 1px dashed var(--muted); pointer-events: none; z-index: 1; }
.weight { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.wrow { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
.wrow b { font-size: 18px; }
.wchart { width: 100%; height: 76px; display: block; margin: 6px 0 8px; }
.wchart .goal-line { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.wchart .real { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.wchart .pt { fill: var(--accent); }
.wform { display: flex; gap: 8px; align-items: center; }
.wform input { width: 7.5em; padding: 10px 12px; font-size: 16px; }
.wform .btn { padding: 10px 16px; }
.portion { margin: 16px 0 4px; }
.plabel { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.plabel b { color: var(--text); font-weight: 600; margin-right: 8px; } /* 10/13 ヨッシー「初見で分かりにくい」: 名前の横に一言 */
.truth-row .plabel { flex: 1 0 100%; margin: 0; }
.seg5, .seg3 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; }
.seg3 { grid-template-columns: repeat(3, 1fr); margin-bottom: 8px; }
.seg3.four { grid-template-columns: repeat(4, 1fr); }
.seg5 button, .seg3 span { display: block; text-align: center; padding: 9px 0; border: 0; border-radius: 999px; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg5 button.on, .seg3 input:checked + span { background: var(--accent); color: var(--accent-ink); }
.seg3 input:focus-visible + span, .seg5 button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg3 label { cursor: pointer; }
.notify { text-align: center; margin-top: 28px; }
.notify .note { display: block; margin-top: 8px; }

/* よっしー用: 各社の管理 10/11 */
.owner-nav { display: flex; gap: 16px; margin: 0 4px 8px; font-size: 14px; }
.owner-nav { flex-wrap: wrap; gap: 10px; margin: 0 0 14px; } /* 10/13 ヨッシー「ボタンにして」 */
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.filter select, .filter input { font: inherit; font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; }
.filter input { flex: 1 1 160px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--text); font-size: 14px; }
.color-row { display: flex; align-items: center; gap: 10px; }
.color-row input[type=color] { width: 56px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; }
.tbl tr.off td { opacity: .5; }
.bulk { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tenant-form { margin-top: 12px; }
.staff-link { text-align: right; margin: 0 0 8px; }
.staff-link .btn { padding: 8px 16px; font-size: 13px; }
.staff-box { margin: 10px 0; padding: 10px 0; border-top: 1px solid var(--line); }
.staff-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.staff-row .link.danger { margin: 0; }
.staff-add { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.staff-add input, .staff-add select { font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.staff-add input[type=email] { flex: 1 1 180px; }
.member-status { margin-top: 6px; font-size: 14px; }
.member-status .link.danger { margin-top: 0; }
.mark-img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; display: block; }
.logo-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 0; }
.logo-box .mark-img { width: 48px; height: 48px; border-radius: 12px; }
.mark-ph { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.logo-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.logo-box .link.danger { margin: 0; }

/* 管理ページの上の並び: 1 語ずつ折り返さず、入りきらなければ横に流す（10/11 ヨッシー「改行が変」） */
.staff-nav { width: 100%; gap: 6px 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
.staff-nav::-webkit-scrollbar { display: none; }
.staff-nav a, .staff-nav .link { white-space: nowrap; letter-spacing: 0; flex: 0 0 auto; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.autosave-note { font-size: 12px; color: var(--muted); }
.small-link { font-size: 13px; color: var(--muted); }

/* バーコードで記録 10/11 */
.bc-video { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: #000; margin: 6px 0 8px; }
.bc-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.bc-frame { position: absolute; left: 12%; right: 12%; top: 34%; bottom: 34%; border: 2px solid rgba(255,255,255,.9); border-radius: 10px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); }
.seg5 { grid-auto-flow: column; grid-auto-columns: 1fr; grid-template-columns: none; }
/* 月のレポート 10/11 */
.report-head { margin: 4px 0 12px; }
.kpi em { font-style: normal; font-size: 11px; color: var(--muted); }
@media print {
  .top, .no-print, .staff-nav { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .kpi { break-inside: avoid; border-color: #ccc; }
}

/* 写真の上の料理ごとのカロリー 10/11 */
figure[data-spots] { position: relative; cursor: pointer; }
.spots { position: absolute; inset: 0; pointer-events: none; transition: opacity .2s; }
.spots-off .spots { opacity: 0; }
.photo.can-fix .spot .tag { pointer-events: auto; cursor: pointer; }
.spot .tag .pen { display: block; font-style: normal; font-size: 10px; font-weight: 700; color: #1f7a4d; margin-top: 2px; letter-spacing: .04em; }
.fix-hint { font-size: 14px; color: var(--muted); margin: 8px 0 0; text-align: center; } .fix-hint-s { display: inline-block; white-space: nowrap; } /* 10/14 ヨッシー「もう少し大きく」: 一文 22 字なので 14px でも 1 行 */ /* 10/14 ヨッシー「1 行に」 */
.spot-fix { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 5; display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.spot-fix label { font-size: 13px; font-weight: 700; }
.spot-fix input[type=text] { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); }
.spot-fix .sf-btns { display: flex; justify-content: flex-end; gap: 12px; align-items: center; }
.spot-fix.inline { position: static; box-shadow: none; border: 1px solid var(--line); margin: 6px 0 10px; }
/* 料理ごとの食べた量（10/16）: 全部/半分/少し/残した */
.eaten { display: inline-flex; gap: 3px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; vertical-align: middle; }
.eaten button { font: inherit; font-size: 12px; font-weight: 700; padding: 5px 9px; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; white-space: nowrap; }
.eaten button.on { background: var(--text); color: var(--bg); }
.eaten button:disabled { opacity: .5; }
.eaten[inert] { opacity: .85; }
.eaten-row { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.eaten-row.ing { display: flex; margin: 4px 0 2px; }
.breakdown .eaten-hint { margin: 2px 0 8px; }
.spot.left .tag { opacity: .55; }
.spot.part .tag { opacity: .85; }
.spot .tag .eaten-tag { display: block; font-size: 10px; text-decoration: none; color: var(--accent); font-weight: 800; }
.spot-fix .sf-eaten { display: grid; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.spot-fix .sf-eaten .eaten { justify-self: start; }
.spot-fix .sf-msg { font-size: 12px; color: #c0392b; }
.spot-fix .sf-msg:empty { display: none; }
.breakdown li .fix-l { font-size: 12px; margin-left: 8px; vertical-align: 1px; }
.spot { position: absolute; width: 0; height: 0; }
.spot::before { content: ""; position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.25); }
.spot::after { content: ""; position: absolute; left: -1px; bottom: 5px; width: 2px; height: 22px; background: rgba(255,255,255,.9); }
.spot .tag { position: absolute; bottom: 27px; left: 0; transform: translateX(-50%); display: grid; gap: 0; padding: 6px 10px; border-radius: 12px;
  background: rgba(255,255,255,.92); color: #1a1a1a; box-shadow: 0 6px 18px -8px rgba(0,0,0,.45); white-space: nowrap; text-align: left; }
.spot .tag small { font-size: 11px; color: #555; max-width: 9.5em; overflow: hidden; text-overflow: ellipsis; }
.spot .tag.two small { white-space: normal; max-width: 11em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.spot .tag b { font-size: 17px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.spot .tag i { font-style: normal; font-size: 11px; font-weight: 700; }
.spot.below::after { top: 5px; bottom: auto; }
.spot.below .tag { top: 27px; bottom: auto; }
.top-banner { display: block; width: 100%; height: auto; margin: 0; border-radius: 0; }

/* 利用を停止する（ホームの一番下・小さく） */
.stop-link { text-align: center; margin: 18px 0 8px; }
.stop-link a { color: var(--muted); font-size: 12px; }
.auth .btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }

/* 会員の名前を変える（管理者） */
.rename { margin: -4px 0 10px; font-size: 14px; }
.rename summary { color: var(--muted); cursor: pointer; list-style: none; text-decoration: underline; text-underline-offset: 3px; }
.rename summary::-webkit-details-marker { display: none; }
.rename-form { display: flex; gap: 8px; margin-top: 8px; max-width: 360px; }
.rename-form input { flex: 1; min-width: 0; }

/* iPhone の日付の入力欄が横の欄に重なる（10/11）。幅を枠に合わせる */
.tform .sess > .field { min-width: 0; }
.tform input[type=date] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; display: block; min-height: 46px; text-align: left; }
.tform input[type=date]::-webkit-date-and-time-value { text-align: left; }

/* トレーニング記録の日付: 画面内のカレンダー。記録のある日に印（10/14） */
.dp-btn { font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; min-height: 46px; text-align: left; cursor: pointer; }
.dp-btn[aria-expanded=true] { border-color: var(--text); }
.dp { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px 8px; background: var(--surface); }
.dp-head { display: flex; align-items: center; justify-content: space-between; font-size: 16px; padding: 0 4px; }
.dp-head button { font: inherit; font-size: 20px; line-height: 1; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 8px; }
.dp-w { text-align: center; font-size: 11px; color: var(--muted); padding: 4px 0; }
.dp-d { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; font: inherit; font-size: 15px; border: 1px solid transparent; background: none; color: var(--text); position: relative; cursor: pointer; padding: 0; }
.dp-d.is-rec { background: var(--line); font-weight: 800; }
.dp-d.is-rec::after { content: ''; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: var(--text); }
.dp-d.is-today { border-color: var(--text); }
.dp-d.is-sel { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.dp-d.is-sel::after { background: var(--accent-ink); }
.dp-foot { display: flex; align-items: center; gap: 14px; margin-top: 8px; padding: 0 4px; font-size: 12px; color: var(--muted); }
.dp-foot .link { margin-left: auto; font-size: 13px; }
.dp-k { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -2px; margin-right: 4px; border: 1px solid transparent; }
.dp-k.is-rec { background: var(--line); }
.dp-k.is-today { border-color: var(--text); }
.dp-note { grid-column: 1 / -1; font-size: 13px; margin: -4px 0 0; }
/* 会員の運動の日のカレンダー: ジム / 自分の印、選べない日（10/14） */
.dp-d.is-rec.is-gym::after { background: var(--accent); } .dp-d.is-rec.is-self::after { background: #f59e0b; }
.dp-d:disabled { color: var(--faint); cursor: default; } .dp-d:disabled.is-rec { background: none; font-weight: 400; }
.dp-k.is-gym { background: var(--accent); } .dp-k.is-selfk { background: #f59e0b; }
.stack .dp { margin-top: -4px; }

/* トレーニングの記録（10/14「他を見て来て」→ Hevy / Strong / Stronglifts 型: 枠を重ねない・数字は大きく・やった日はカレンダーの丸） */
.ts-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 14px 0 4px; }
.ts-stats > div { display: grid; gap: 2px; padding: 2px 0 2px 14px; border-left: 1px solid var(--line); line-height: 1; }
.ts-stats > div:first-child { padding-left: 0; border-left: 0; }
.ts-stats b { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.ts-stats small { font-size: 11px; color: var(--muted); }
/* 5 週のカレンダー */
.ts-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px 0; margin: 16px 0 6px; justify-items: center; }
.ts-cal-w { font-size: 10px; color: var(--muted); letter-spacing: .1em; }
.ts-cal-d { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--text); background: none; border: 0; padding: 0; }
.ts-cal-d i { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 9px; color: var(--muted); white-space: nowrap; line-height: 1; }
.ts-cal-d.is-future { color: var(--faint); }
.ts-cal-d.is-today::after { content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--text); }
.ts-cal-d.is-on { background: var(--accent); color: var(--accent-ink); font-weight: 800; cursor: pointer; }
.ts-cal-d.is-on.is-today::after { background: var(--accent-ink); }
.ts-cal-d.is-on.is-self { background: #f59e0b; color: #fff; } /* 自分で入れた運動は青（10/14 ヨッシー「混ぜるなら色分けして」）。ジムは店の色 */
.ts-cal-d.is-on.is-self.on { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px #f59e0b; }
.ts-cal-d.is-on.on { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.viewing main .ts-cal-d, .viewing main .ts-row, .viewing main .ts-tab, .viewing main .ts-close, .viewing main .ts-more { pointer-events: auto; } /* 見るだけの画面でも開閉できる（.viewing main button より強く。10/14 監査） */
.ts-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; font-size: 12px; color: var(--text); align-items: center; }
.ts-legend b { font-variant-numeric: tabular-nums; }
.ts-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; vertical-align: -2px; }
.ts-legend i.is-gym { background: var(--accent); } .ts-legend i.is-self { background: #f59e0b; }
.ts-legend .muted { font-size: 11px; }
/* 重さの伸び: 1 種目ずつ、タブで切替 */
.ts-prog { margin-top: 18px; }
.ts-tabs { min-width: 0; display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
.ts-tabs::-webkit-scrollbar { display: none; }
.ts-tab { flex: none; font: inherit; font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; white-space: nowrap; }
.ts-tab.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ts-prog-head { display: flex; align-items: baseline; gap: 12px; margin: 14px 0 0; line-height: 1; flex-wrap: wrap; }
.ts-big b { font-size: 40px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ts-big small { font-size: 14px; font-weight: 700; color: var(--muted); margin-left: 3px; }
.ts-delta { display: grid; gap: 4px; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ts-delta small { font-size: 11px; font-weight: 400; color: var(--muted); }
.lc { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 320 / 130; margin-top: 4px; overflow: visible; }
.lc-area { fill: var(--accent); opacity: .12; }
.lc-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.lc-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.lc-last { fill: var(--accent); }
.lc-val { font-size: 11px; font-weight: 800; fill: var(--text); font-variant-numeric: tabular-nums; }
.lc-axis { stroke: var(--line); stroke-width: 1; }
.lc-date { font-size: 10px; fill: var(--muted); }
/* 記録の一覧: 1 行ずつ。押すとすぐ下に開く */
.ts-list { margin-top: 14px; border-top: 1px solid var(--line); }
.ts-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 0; } .ts-dot.is-self { background: #f59e0b; }
.ts-row .ts-best { margin-left: 6px; }
.ts-item .tsess { margin: 4px 0 10px; }
.ts-more { display: block; width: 100%; text-align: center; padding: 12px 0 4px; font-size: 14px; } .ts-more b { font-variant-numeric: tabular-nums; }
.as-member .ts-more { pointer-events: auto; opacity: 1; filter: none; }
/* 一覧は一段ずつ色を変える（10/14 ヨッシー「白と薄い緑とか」）。薄い色は店のテーマの背景色 */
.ts-item:nth-child(odd) > .ts-row { background: var(--bg); }
.ts-list .ts-row { padding: 11px 10px; border-bottom: 0; border-radius: 10px; }
.ts-list { border-top: 0; }
.tsess-wrap { min-width: 0; max-width: 100%; overflow: hidden; } /* 中身が画面より広がらない（10/14 iPhone で縮小表示になった） */
.ts-row { display: grid; overflow: hidden; box-sizing: border-box; grid-template-columns: 92px 1fr auto; gap: 8px; align-items: center; width: 100%; padding: 11px 0; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.ts-row b { font-size: 14px; font-variant-numeric: tabular-nums; } .ts-row b small { font-weight: 400; color: var(--muted); font-size: 11px; }
.ts-row-n { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ts-row-r { display: grid; justify-items: end; gap: 1px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; line-height: 1.2; }
.ts-row-r b { font-weight: 700; color: var(--text); } .ts-row-r small { font-size: 10px; white-space: nowrap; }
.ts-row.on b { color: var(--accent); }
/* 開いた 1 回分 */
.tsess { margin-top: 14px; padding: 14px 14px 10px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 16px; background: var(--surface); }
.tsess.is-self { border-left-color: #f59e0b; }
.tsess-top { display: flex; align-items: center; gap: 10px; }
.tsess-top b { font-size: 16px; }
.tsess-top .muted { font-size: 12px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsess-top .link { font-size: 13px; }
.tsess-top .ex-del { position: relative; margin: 0; width: 32px; height: 32px; } .tsess-top .mdel { position: static; }
.ts-close { font: inherit; font-size: 20px; line-height: 1; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--bg); color: var(--muted); cursor: pointer; flex: none; }
.tsess-stats { display: flex; gap: 0; margin: 12px 0 4px; flex-wrap: wrap; row-gap: 8px; }
.tsess-stats > div { display: grid; gap: 2px; padding: 0 14px 0 0; margin-right: 14px; border-right: 1px solid var(--line); line-height: 1; }
.tsess-stats > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.tsess-stats small { font-size: 10px; color: var(--muted); letter-spacing: .04em; }
.tsess-stats b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; } .tsess-stats b i { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); margin-left: 2px; }
.tsess-ex { list-style: none; margin: 8px 0 0; padding: 0; }
.tsess-ex li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; align-items: baseline; }
.tsess-ex li .n { font-weight: 700; min-width: 0; } .tsess-ex li .n em { font-style: normal; color: var(--muted); font-weight: 700; }
.tsess-ex li .v { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; } .tsess-ex li .v small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.tsess-ex li .note { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.ts-best { font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .12em; padding: 2px 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); margin-left: 6px; vertical-align: 2px; }
.tsess-note { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
/* トレーナーだけのメモ（会員には非表示）: 「非表示」の小さな札を付ける（10/14） */
.is-staff i { font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .1em; padding: 1px 5px; border-radius: 6px; border: 1px solid var(--muted); color: var(--muted); margin-right: 6px; vertical-align: 1px; }
.tform .staff-only textarea, .tform .staff-only { border-color: var(--line); }
.tform input.snote { margin-top: 6px; }
.tsess .tphotos { margin-top: 10px; }
.tsess-del { margin-top: 6px; }
/* 料理名を自分で直す（10/14） */
.fix-title-row { margin: -8px 0 10px; } .fix-title { font-size: 13px; }
.fixname-f { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; } .fixname-f input { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); min-width: 0; }
.add-text { font-size: 14px; }

/* トレーニングの履歴: 直す */
.sess-top .sess-edit { margin-left: auto; font-size: 14px; }
.center { text-align: center; }

/* 今日の合計: 目安に対する横棒（10/11 ヨッシー「calomeal のような見た目」） */
.kcal-now { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 6px 0 10px; }
.kcal-now .num { font-size: 46px; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.kcal-now .of { font-size: 17px; font-weight: 700; color: var(--muted); }
.nbar { height: 9px; border-radius: 99px; background: var(--line); overflow: hidden; }
.nbar.lg { height: 16px; margin: 0 0 18px; }
.nbar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--kcal1, #a6e2c6), var(--kcal2, #1e9e6a)); }
.nitem .nl small { color: var(--muted); }
.nbar i.near { background: linear-gradient(90deg, #a6e2c6, #74c46a 55%, #ebc23d); }
.nbar i.over { background: linear-gradient(90deg, #a6e2c6, #ebc23d 65%, #e2483a); }
.ngrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-bottom: 6px; }
.nitem .nl { font-size: 12px; font-weight: 700; color: var(--muted); }
.nitem .nv { display: block; text-align: right; font-size: 12px; color: var(--muted); margin: 0 0 4px; font-variant-numeric: tabular-nums; }
.nitem .nv b { font-size: 20px; font-weight: 800; color: var(--text); margin-right: 2px; }
.nitem .nv b.muted { color: var(--muted); }

/* 体重・体脂肪率 */
.circles { display: flex; justify-content: center; gap: 18px; margin: 8px 0 10px; }
.circ { width: 116px; height: 116px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--surface); border: 3px solid #f5a23a; box-shadow: 0 6px 18px -12px rgba(0, 0, 0, .4); }
.circ.f { border-color: #1e9e6a; }
.circ .cl { font-size: 11px; font-weight: 700; color: var(--muted); }
.circ b { font-size: 34px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.circ small { font-size: 12px; font-weight: 700; color: var(--muted); }
.body-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 0 0 6px; }
.body-stats dl { margin: 0; }
.body-stats dl div { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 2px 4px; }
.body-stats dd { margin: 0; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.bseg { margin: 12px 0 6px; }
.bseg label { text-align: center; padding: 8px 0; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; border: 1px solid var(--line); background: var(--bg); }
.bpane { display: none; }
#bspan-w:checked ~ .bpane-w, #bspan-m:checked ~ .bpane-m, #bspan-q:checked ~ .bpane-q { display: block; }
#bspan-w:checked ~ .bseg label[for="bspan-w"], #bspan-m:checked ~ .bseg label[for="bspan-m"], #bspan-q:checked ~ .bseg label[for="bspan-q"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.bchart { width: 100%; height: auto; display: block; }
.bchart .grid { stroke: var(--line); stroke-width: 1; }
.bchart .goal { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.bchart .lw { fill: none; stroke: #f5a23a; stroke-width: 2; }
.bchart .lf { fill: none; stroke: #1e9e6a; stroke-width: 2; }
.bchart .pw { fill: #f5a23a; }
.bchart .pf { fill: #1e9e6a; }
.bchart .ax { font-size: 9px; fill: var(--muted); }
.bchart .ax.f { text-anchor: end; }
.chart-empty { text-align: center; padding: 28px 0; }
.legend { font-size: 11px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 2px 0 8px; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.legend .lg-w { background: #f5a23a; } .legend .lg-f { background: #1e9e6a; } .legend .lg-g { background: none; border-top: 1px dashed var(--muted); height: 0; }
.body .wform input { width: 92px; }
/* 栄養のグラフ: 「この食事」と「目安」を分けて書く（10/11 ヨッシー「どっちがカロリー？」） */
.kcal-now .lbl { font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 4px; }
.kcal-target { text-align: right; font-size: 12px; color: var(--muted); margin: -12px 0 14px; }
.nitem .nl { display: flex; justify-content: space-between; align-items: baseline; }
.nitem .nl small { font-size: 11px; font-weight: 400; }
.nitem .nv { font-size: 13px; }
.portion-view { font-size: 14px; color: var(--muted); margin: 0 0 6px; }
.portion-view b { color: var(--text); }
.owner-who { font-size: 12px; margin: -4px 0 10px; }

/* 目安を超えても赤にしない（10/11 調査: 責める表示はライト層がやめる原因）。目安を超えたら黄、かなり多いと橙 */
.nbar i.near { background: linear-gradient(90deg, #a6e2c6, #8fcf6a 45%, #f3d04f 80%, #f0a040); }
.nbar i.over { background: linear-gradient(90deg, #a6e2c6, #f3d04f 45%, #f0a040 75%, #e2483a); }
.week-avg { font-size: 13px; color: var(--muted); margin: 4px 0 10px; line-height: 1.7; }
.week-avg b { color: var(--text); }
.member-status-bottom { margin: 40px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ===== 10/12 新しい見た目（他アプリの調査から）: 今週の帯・大きな輪・P/F/C の輪・1 タップの手直し・解析中・ふりかえり・お祝い・前と同じ ===== */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); white-space: nowrap; }
.chip.warm { background: color-mix(in srgb, #f0a040 24%, transparent); }
.wkdots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; margin-top: 6px; }
.wkdots span { font-size: 10px; color: var(--muted); display: block; }
.wkdots i { display: grid; place-items: center; width: 32px; height: 32px; margin: 2px auto 0; border-radius: 50%; font-style: normal; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; border: 1.5px dashed var(--faint); color: var(--muted); }
.wkdots i.part { border: 0; background: var(--part-bg, color-mix(in srgb, var(--accent) 22%, transparent)); color: var(--part-fg, var(--text)); }
.wkdots i.ok { border: 0; background: var(--accent); color: var(--accent-ink); }
.wkdots i.today { outline: 2px solid var(--text); outline-offset: 2px; }
.wkdots i.future { border-color: var(--line); color: var(--faint); }
.week-card .note { margin: 10px 0 0; }
.hero-card .hero { display: flex; align-items: center; gap: 14px; }
.ring { position: relative; width: 136px; height: 136px; flex: none; }
.ring svg, .mring svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.ring .bg, .mring .bg { fill: none; stroke: var(--line); }
.ring .fg, .mring .fg { fill: none; stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2, .7, .2, 1); }
.ring .fg { stroke: url(#ringGrad); } .ring.over .fg { stroke: url(#ringGradOver); }
.ring .bg, .ring .fg { stroke-width: 14; }
.ring.over .fg { stroke: #f0a040; }
.ring .in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.ring .rbig { font-size: 34px; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ring .u { font-size: 11px; color: var(--muted); font-weight: 700; }
.hstats { display: flex; flex-direction: column; gap: 5px; font-size: 13px; min-width: 0; flex: 1; }
.hstats div { display: flex; justify-content: space-between; gap: 8px; }
.hstats b { font-variant-numeric: tabular-nums; }
.hstats .small { font-size: 12px; color: var(--muted); }
.hstats .small a { color: var(--text); }
/* PFC バランスの円グラフ（10/19） */
.pfc-pie { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; margin-top: 14px; padding: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; }
.nutri .pfc-pie { margin: 14px 0 18px; } /* 食事 1 回の詳細: 下の糖質・食物繊維・塩分との間 */
.pie { position: relative; width: 150px; height: 150px; }
.pie svg { width: 100%; height: 100%; display: block; overflow: visible; }
.pie .pbg { fill: none; stroke: var(--line); stroke-width: 22; }
.pie .pseg { fill: none; stroke-width: 22; }
.pie .pseg.p, .plegend .p i { stroke: var(--pp, var(--p)); background: var(--pp, var(--p)); }
.pie .pseg.f, .plegend .f i { stroke: var(--pf, var(--f)); background: var(--pf, var(--f)); }
.pie .pseg.c, .plegend .c i { stroke: var(--pc, var(--c)); background: var(--pc, var(--c)); }
.pie .ppct { font-size: 10.5px; font-weight: 800; fill: #fff; text-anchor: middle; dominant-baseline: central; paint-order: stroke; stroke: rgba(0, 0, 0, .28); stroke-width: 2px; }
.pie .pin { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.pie .pin b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pie .pin span { font-size: 11px; color: var(--muted); font-weight: 700; }
.plegend { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.plegend li { display: grid; grid-template-columns: 10px 1fr auto; column-gap: 8px; align-items: baseline; }
.plegend i { width: 10px; height: 10px; border-radius: 3px; align-self: center; }
.plegend .pn { font-size: 13px; font-weight: 700; white-space: nowrap; }
.plegend b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.plegend b small { font-size: 12px; margin-left: 1px; color: var(--muted); }
.plegend .pr2 { grid-column: 2 / 4; font-size: 11px; color: var(--muted); }
@media (max-width: 380px) { .pfc-pie { grid-template-columns: 124px 1fr; gap: 12px; padding: 10px; } .pie { width: 124px; height: 124px; } .pie .pin b { font-size: 20px; } .plegend b { font-size: 18px; } }
.pfc-rings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.pr { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px 4px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.mring { width: 54px; height: 54px; position: relative; }
.mring .bg, .mring .fg { stroke-width: 6; }
.mring .fg.p { stroke: var(--p); } .mring .fg.f { stroke: var(--f); } .mring .fg.c { stroke: var(--c); }
.mring i { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pr b { font-size: 12px; }
.pr small { font-size: 11px; color: var(--muted); }
.hero-card .empty { margin: 10px 0 0; font-size: 14px; }
.nutri.compact .ngrid { margin-top: 4px; }
/* 1 タップの手直し */
.fix { margin: 12px 0 4px; }
.fixchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fixchips button { font: inherit; font-size: 13px; font-weight: 600; padding: 8px 13px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.fixchips button.on { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.fixchips button[disabled] { opacity: .6; }
.fix-out { display: block; margin-top: 6px; min-height: 1em; }
/* 解析中 */
.is-pending .photo { position: relative; }
.is-pending .photo img { filter: saturate(.6) brightness(.5); }
.beam { position: absolute; left: 0; right: 0; height: 36%; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .28), transparent); animation: beam 2.2s ease-in-out infinite; pointer-events: none; }
@keyframes beam { 0% { top: -40%; } 100% { top: 100%; } }
.scan-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.scan-over .prog { width: 88px; height: 88px; position: relative; }
.scan-over .prog svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.scan-over .prog .bg { fill: none; stroke: rgba(255, 255, 255, .3); stroke-width: 6; }
.scan-over .prog .fg { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .5s linear; }
.scan-over .prog i { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.scan-over b { font-size: 14px; }
.steps { display: grid; gap: 7px; font-size: 14px; margin: 6px 0 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.steps li .d { width: 18px; height: 18px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 11px; border: 1.5px solid var(--faint); }
.steps li.done { color: var(--text); } .steps li.done .d { background: var(--accent); color: var(--accent-ink); border: 0; }
.steps li.now { color: var(--text); font-weight: 700; } .steps li.now .d { border: 2px solid var(--accent); border-top-color: transparent; animation: spin 1s linear infinite; }
@media (prefers-reduced-motion: reduce) { .beam { animation: none; } .ring .fg, .mring .fg { transition: none; } }
/* 先週のふりかえり */
.wk3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin-top: 8px; }
.wk3 div { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; }
.wk3 .num { font-size: 22px; font-weight: 900; display: block; line-height: 1.2; font-variant-numeric: tabular-nums; }
.wk3 .num small { font-size: 12px; color: var(--muted); }
.wk3 > div > small { font-size: 11px; color: var(--muted); }
.bars7 { display: flex; align-items: flex-end; gap: 6px; height: 84px; padding-top: 10px; }
.bars7 div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 100%; }
.bars7 i { display: block; width: 100%; max-width: 28px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--bar1, var(--accent)), var(--bar2, var(--accent))); }
.bars7 i.hi { background: #f0a040; }
.bars7 i.no { background: transparent; border: 1.5px dashed var(--faint); }
.bars7 span { font-size: 10px; color: var(--muted); }
.rank { margin-top: 10px; font-size: 13px; }
.rank > b { display: block; font-size: 13px; margin-bottom: 2px; }
.rank a { display: flex; justify-content: space-between; gap: 10px; text-decoration: none; padding: 5px 0; border-top: 1px solid var(--line); }
.rank a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank a b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.review-text { margin: 10px 0 0; font-size: 14px; line-height: 1.7; padding-top: 10px; border-top: 1px solid var(--line); }
.review-card .trainer-msg { margin: 12px 0 0; }
/* お祝い（今週 5 日） */
.badge-card { position: relative; overflow: hidden; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 16px 16px; }
.medal { width: 88px; height: 88px; border-radius: 50%; background: conic-gradient(from 200deg, var(--ring1, var(--accent)), var(--f, var(--accent)), var(--ring2, var(--accent)), var(--p, var(--accent)), var(--ring1, var(--accent))); display: grid; place-items: center; box-shadow: 0 10px 30px -14px color-mix(in srgb, var(--accent) 80%, transparent); }
.medal span { width: 70px; height: 70px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 28px; font-weight: 900; }
.badge-card > b { font-size: 17px; }
.lock { display: flex; gap: 8px; justify-content: center; margin-top: 4px; }
.lock i { width: 40px; height: 40px; border-radius: 50%; border: 1.5px dashed var(--faint); display: grid; place-items: center; font-style: normal; font-size: 11px; color: var(--muted); }
.lock i.got { border: 0; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); font-weight: 700; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -14px; width: 7px; height: 12px; border-radius: 2px; animation: fall 3.4s linear 1 forwards; }
@keyframes fall { to { transform: translateY(420px) rotate(540deg); opacity: .2; } }
/* 前と同じ */
.repeat { margin: 2px 0 14px; }
.repeat .lead-line { display: flex; gap: 8px; align-items: baseline; margin: 0 4px 6px; }
.redo { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.redo::-webkit-scrollbar { display: none; }
.redo-item { flex: none; width: 112px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px; font: inherit; color: var(--text); text-align: left; cursor: pointer; display: grid; gap: 2px; }
.redo-item .th { display: block; height: 56px; border-radius: 10px; overflow: hidden; background: var(--line); }
.redo-item .th img { width: 100%; height: 100%; object-fit: cover; }
.redo-item .rn { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.redo-item b { font-size: 13px; font-variant-numeric: tabular-nums; }
.redo-item small { font-size: 10px; color: var(--muted); }
.redo-item[disabled] { opacity: .6; }
#repeatMsg { margin: 2px 4px 0; min-height: 1em; }
/* 次の一食の例 */
.sug-head { font-size: 12px; font-weight: 700; color: var(--muted); margin: 10px 0 0; }
.sug { display: grid; gap: 6px; margin-top: 6px; }
.sug .opt { display: flex; gap: 10px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: 13px; }
.sug .opt .ic { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 900; font-size: 12px; }
.sug .opt > div { min-width: 0; }
.sug .opt b { display: block; font-size: 13px; line-height: 1.4; }
.sug .opt small { color: var(--muted); font-size: 11px; }
/* 体重: 傾向線 */
.bchart .raw { fill: var(--faint); }
.bchart .trend { fill: none; stroke: #f5a23a; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.bchart .area { fill: #f5a23a; opacity: .12; }
.bchart .end { fill: var(--surface); stroke: #f5a23a; stroke-width: 3; }
.legend .lg-r { background: var(--faint); }
.proj { margin: 2px 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.proj .when { font-weight: 900; font-size: 16px; }
.proj .small { font-size: 12px; color: var(--muted); }

/* 店舗: 会員の目標（10/12 ヨッシー） */
.goal-line { margin: 4px 0 0; font-size: 14px; }
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 14px; margin: 10px 0 0; }
.goal-grid div { display: grid; gap: 1px; min-width: 0; }
.goal-grid dt { font-size: 11px; color: var(--muted); }
.goal-grid dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.goal-staff .note { margin: 10px 0 0; }

/* 食事の内容: 料理ごとに白い段組み（10/12 ヨッシー「1 色のベタ塗りじゃなくて白色と段組みに」） */
.breakdown { border-top: 0; padding-top: 0; }
.breakdown summary { padding: 10px 2px; font-size: 17px; }
.breakdown .dish { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px 6px; margin: 0 0 10px; }
.breakdown .dish h3 { margin: 0 0 6px; font-size: 14px; color: var(--text); }
.breakdown .dish li:last-child { border-bottom: 0; }
.breakdown .warn, .breakdown > .note { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin: 0 0 10px !important; }
.breakdown .warn li { padding: 2px 0 !important; }

/* 目標までの進み具合（10/12 ヨッシー 2） */
.prog { margin: 12px 0 0; }
.pbar { position: relative; height: 12px; border-radius: 99px; background: var(--faint); }
.pbar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .8s cubic-bezier(.2, .7, .2, 1); }
.pbar b { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); transform: translate(-50%, -50%); box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.pbar u { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--muted); opacity: .55; transform: translateX(-50%); }
.pends { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 5px; }
.pline { margin: 6px 0 0; font-size: 13px; line-height: 1.6; }
.pline .muted { font-size: 11px; }
/* 体の反応から見た目安（10/12 ヨッシー 1） */
.adapt { margin: 8px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); display: grid; gap: 2px; }
.adapt .al { font-size: 11px; font-weight: 700; color: var(--muted); }
.adapt b { font-size: 20px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.adapt .small { line-height: 1.6; }
/* 先週の食事の時刻（10/12 ヨッシー 3） */
.tline { margin-top: 12px; }
.tline .row { display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 8px; height: 18px; }
.tline .row > span { font-size: 10px; color: var(--muted); }
.tline .strip { position: relative; height: 10px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.tline .strip.no { border-style: dashed; background: transparent; }
.tline .strip em { position: absolute; top: 0; bottom: 0; right: 0; background: rgba(240, 160, 64, .18); }
.tline .strip b { position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transform: translate(-50%, -50%); }
.tline .axis { position: relative; height: 14px; margin: 3px 0 0 26px; font-size: 10px; color: var(--muted); }
.tline .axis span { position: absolute; top: 0; transform: translateX(-50%); }
.tl-sum { margin: 8px 0 0; font-size: 13px; }
/* 今月のカレンダー（10/12 ヨッシー 5） */
.mcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 10px; }
.mcal .wd { text-align: center; font-size: 10px; color: var(--muted); }
.mcal i, .mcal a { text-decoration: none; display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; font-style: normal; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); border: 1.5px dashed var(--faint); }
.mcal a:not(.part) { background: var(--accent); color: var(--accent-ink); border: 0; }
.mcal i.part, .mcal a.part { border: 0; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text); }
.mcal i.ok { border: 0; background: var(--accent); color: var(--accent-ink); }
.mcal i.future { border-color: transparent; color: var(--faint); }
h2.day { scroll-margin-top: 70px; }
.mcal i.today, .mcal a.today { box-shadow: 0 0 0 2px var(--text); }

/* ダッシュボードのカード: 押せる・良し悪しの一言（10/12 ヨッシー） */
a.kpi { text-decoration: none; color: inherit; position: relative; }
a.kpi::after { content: "→"; position: absolute; right: 14px; top: 12px; color: var(--muted); font-size: 14px; }
.kpi .judge { font-size: 12px; font-weight: 700; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.kpi .judge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.kpi .judge.ok { color: #1e9e6a; } .kpi .judge.warn { color: #c76e12; } .kpi .judge.bad { color: #d6453a; } .kpi .judge.na { color: var(--muted); }
.kpi .sub { font-size: 11px; color: var(--muted); }

/* 会社の追加の 3 列: スマホでは縦に並べ、入力欄がはみ出さないように（10/12 ヨッシー「テキストボックスが被ってる」） */
.row3 .field input { width: 100%; min-width: 0; box-sizing: border-box; }
@media (max-width: 640px) { .row3 { grid-template-columns: 1fr; } }

/* 多店舗（10/12 ヨッシー）: 店舗の切り替え・店舗の設定 */
.bchips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 12px; padding-bottom: 2px; }
.bchips::-webkit-scrollbar { display: none; }
.bchips a { flex: none; text-decoration: none; font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.bchips a.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.bchips a small { font-size: 10px; opacity: .8; margin-left: 2px; }
.branch-rows li { padding: 8px 0; border-top: 1px solid var(--line); }
.branch-edit, .branch-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.branch-edit input[name=name], .branch-add input[name=name] { flex: 1 1 160px; min-width: 0; font: inherit; font-size: 15px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); }
.branch-edit select, .branch-add select { font: inherit; font-size: 14px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); }
.branch-add { margin-top: 12px; }
.closed-branches { margin-top: 10px; font-size: 13px; }
.tbl.access td.c { text-align: center; } .tbl.access input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.branch-form { display: flex; gap: 8px; align-items: end; margin: 8px 0; }
.branch-form label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.branch-form select { font: inherit; font-size: 15px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); }

.enter-form { display: inline; margin-left: 10px; }

/* 会員の招待（QR・印刷。10/12 ヨッシー） */
.poster { text-align: center; padding: 10px 0 4px; }
.poster-store { margin: 0; font-size: 14px; color: var(--muted); }
.poster-title { margin: 2px 0 10px; font-size: 20px; font-weight: 900; letter-spacing: .04em; }
.qr-box { width: min(72vw, 320px); margin: 0 auto; background: #fff; padding: 10px; border-radius: 16px; border: 1px solid var(--line); }
.qr-box svg { display: block; width: 100%; height: auto; }
.poster-branch { margin: 10px 0 0; font-size: 18px; font-weight: 800; min-height: 1.2em; }
.poster-steps { text-align: left; display: inline-block; margin: 12px auto 0; padding-left: 1.4em; font-size: 14px; line-height: 1.8; }
.poster-url { margin: 8px 0 0; font-size: 11px; color: var(--muted); word-break: break-all; }
.qr-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.invite-mail { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.invite-mail input[type=email] { flex: 1 1 220px; min-width: 0; font: inherit; font-size: 16px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); }
@media print {
  body { background: #fff; color: #000; }
  header, .top, .no-print, .back, .staff-nav, .bchips, .qr-actions { display: none !important; }
  .card.qr-card { border: 0; box-shadow: none; padding: 0; }
  .poster { padding-top: 20mm; }
  .qr-box { width: 110mm; border: 0; }
  .poster-title { font-size: 26pt; } .poster-store { font-size: 14pt; color: #333; } .poster-branch { font-size: 20pt; } .poster-steps { font-size: 13pt; } .poster-url { font-size: 10pt; color: #333; }
}

/* スタッフの追加・削除（10/12 ヨッシー） */
.staff-rows li { padding: 8px 0; border-top: 1px solid var(--line); }
.staff-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.staff-row form.inline { margin: 0; }
.staff-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.staff-add input, .staff-add select { font: inherit; font-size: 15px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); min-width: 0; }
.staff-add input[type=email] { flex: 1 1 200px; } .staff-add input[name=name] { flex: 1 1 120px; }

/* 管理のシンプルな一覧（10/12 ヨッシー） */
.title-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.add-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; margin-bottom: 12px; }
.add-row input, .add-row select, .li select, .li-edit input { font: inherit; font-size: 15px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); min-width: 0; }
.add-row input { flex: 1 1 180px; }
.list-card { padding: 4px 14px; }
.li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.li:first-child { border-top: 0; }
.li > form { margin: 0; }
.li-main { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.li-main small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.li-edit { flex-direction: row; gap: 8px; }
.li-edit input { flex: 1 1 120px; }
.li-sub { flex: 1 1 100%; }
.pill { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.x { border: 0; background: none; font-size: 20px; line-height: 1; color: var(--muted); padding: 6px 8px; cursor: pointer; border-radius: 10px; }
.x:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chk { display: inline-flex; cursor: pointer; }
.chk input { position: absolute; opacity: 0; pointer-events: none; }
.chk span { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.chk input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chk input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip-on { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: var(--bg); color: var(--muted); }
.edit-box { margin: 6px 0 8px; }
.edit-box summary { display: inline-block; cursor: pointer; font-size: 13px; font-weight: 700; padding: 6px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); list-style: none; }
.edit-box summary::-webkit-details-marker { display: none; }
.edit-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-items: end; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.edit-form label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.edit-form input, .edit-form select { font: inherit; font-size: 15px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); min-width: 0; }

/* 表示のカロリー（10/13）: 合計の下に 1 行。入れたら保存 */
.truth-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; font-size: 14px; color: var(--muted); }
.truth-row fieldset { display: contents; border: 0; padding: 0; margin: 0; }
.truth-row input[type=number] { width: 90px; font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
.truth-row select { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }

.co-name { font-size: 20px; font-weight: 800; margin: 0; flex: 1 0 100%; }
.card-head:has(.co-name) { flex-wrap: wrap; gap: 4px 12px; }

/* 10/13 ヨッシー「テキストボックスを選ぶと画面が横に動く」: iPhone は 16px 未満の入力欄を選ぶと画面を拡大する。スマホでは入力欄を 16px に */
@media (max-width: 760px) { input, select, textarea { font-size: 16px !important; } }
.goal-edit { margin: 14px 0 0; text-align: center; }

tr.row-link { cursor: pointer; }
tr.row-link:active td { background: var(--faint); }

/* 10/13 ヨッシー「縦書きになってる」: 表の料理名が 1 文字ずつ折り返さないように */
.tbl td.nw { white-space: nowrap; }
.tbl td.dish { min-width: 12em; }

/* 記録のポイント（10/13） */
a.points-card { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: var(--text); }
.points-card .pt-big { margin-left: auto; }
.pt-big b { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }
.points-head .pt-big { margin: 6px 0 0; } .points-head .pt-big b { font-size: 40px; }
.pt-today { font-size: 13px; color: var(--muted); white-space: nowrap; }
.pt-rules, .pt-days { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.pt-rules li { display: flex; justify-content: space-between; gap: 10px; }
.pt-rules b { white-space: nowrap; }
.pt-days li { display: grid; grid-template-columns: 5.5em 1fr auto; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pt-days li:last-child { border-bottom: 0; }
.pt-date { color: var(--muted); font-size: 13px; }
.pt-lines { display: grid; gap: 2px; font-size: 13px; color: var(--muted); }
.pt-lines b { color: var(--text); }
.pt-sum { font-variant-numeric: tabular-nums; }
.redeem-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.redeem-form input { font: inherit; font-size: 15px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); min-width: 0; }
.redeem-form input[name=points] { width: 6em; } .redeem-form input[name=item] { flex: 1 1 10em; }

/* 「多い？ 量を減らす」（10/13） */
.less-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin: 10px 0 2px; }
.less-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 700; color: var(--text); cursor: pointer; }
.less-now { font-size: 13px; font-weight: 700; }
.less-row small { flex: 1 0 100%; text-align: center; font-size: 12px; color: var(--muted); }

/* 管理者・トレーナーの ± 補正（10/13） */
.kcal-now .corr { display: inline-flex; gap: 6px; margin-left: 8px; align-self: center; }
.corr-f { display: inline; margin: 0; }
.corr-b { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 20px; font-weight: 700; line-height: 1; padding: 0; cursor: pointer; }
.corr-b:disabled { opacity: .35; cursor: default; }
.corr-note { text-align: center; font-size: 13px; color: var(--muted); margin: -4px 0 10px; }
.corr-note b { color: var(--text); }
.corr-note .corr-f .link { font-size: 13px; padding: 0; margin-left: 10px; }

/* 運動の記録（10/13） */
.ex-list { list-style: none; margin: 12px 0 0; padding: 0; }
.ex-list li { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.ex-list .ex-main { font-size: 15px; } .ex-list .ex-main b { margin-right: 6px; }
.ex-list .ex-sub { grid-column: 1; font-size: 13px; }
.ex-list .ex-del { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin: 0; }

.advice[hidden] { display: none; }

/* 会員の傾向メモ（10/13） */
.insight p { margin: 8px 0 0; line-height: 1.8; }
.insight .insight-focus { padding-top: 10px; border-top: 1px solid var(--line); }
.insight .insight-focus b { margin-right: 8px; }

/* AI アドバイザーは 1 文ずつ改行（10/13） */
blockquote.advice { white-space: pre-line; }
blockquote.advice .eyebrow { white-space: normal; }

/* 会員の画面を見るだけ（10/13）: 一番上に帯。押す・入力する所は効かない（見た目はそのまま） */
.view-bar { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; padding: 10px 16px; background: var(--text); color: var(--bg); font-size: 14px; }
.view-bar .btn { padding: 8px 14px; font-size: 13px; }
.viewing main form:not(.corr-f), .viewing main button:not(.corr-b):not(.corr-note .link), .viewing main input:not([type=radio]), .viewing main select, .viewing main textarea, .viewing .tab-shoot, .viewing .lib-btn, .viewing .mdel { pointer-events: none; }
.viewing .tab-shoot { opacity: .45; filter: grayscale(1); } /* 見るだけ: 撮れない（10/15 タブバー） */
.view-bar .vb-links { display: flex; gap: 6px; flex-shrink: 0; }
.view-bar > span:first-child { white-space: nowrap; }
.view-bar .vb-links .btn { padding: 7px 12px; font-size: 12px; }

/* 会員詳細の「会員と同じ中身」（10/13）: 見た目はそのまま、会員だけの操作は押せない（タブの切り替えと食事を開くのは使える） */
.as-member form, .as-member button, .as-member input:not([type=radio]), .as-member select, .as-member a:not([href*="/staff/meal/"]) { pointer-events: none; opacity: .45; filter: grayscale(1); } /* 押せない物はグレーアウト（10/15 ヨッシー） */
.as-member { margin-bottom: 18px; }
/* 会員と同じ画面の中でも、管理者の操作（トレーニングを記録・直す・削除・開閉・タブ）は押せる（10/14 EXERCISE に統合） */
.as-member .coach-more a, .as-member a.staff-act, .as-member .tsess a.link, .as-member .tsess form, .as-member .tsess form button, .as-member .ts-open, .as-member .ts-close, .as-member .ts-tab { pointer-events: auto; opacity: 1; filter: none; }

/* 運動の月のグラフ（10/13）: 1 日 1 本。ジム（テーマ色）と自分で（青）を積み上げ */
.ex-chart { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; align-items: end; height: 110px; margin-top: 14px; }
.ex-col { display: flex; flex-direction: column; align-items: center; height: 100%; }
.ex-stack { flex: 1; width: 100%; display: flex; flex-direction: column-reverse; justify-content: flex-start; border-bottom: 1px solid var(--line); }
.ex-stack i { display: block; width: 100%; border-radius: 3px 3px 1px 1px; }
.ex-gym { background: var(--accent); }
.ex-self { background: #f59e0b; }
.ex-lbl { font-size: 10px; color: var(--muted); height: 14px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.ex-sum { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 10px; font-size: 13px; }
.ex-sum b { font-variant-numeric: tabular-nums; }
.ex-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ポイントのカード（10/13 ヨッシー「もっと派手に。アイコンとか」）: 金のコインと連続日数の炎。色は絵だけ、文字は黒のまま */
a.points-card { align-items: center; gap: 14px; }
.pt-coin { width: 52px; height: 52px; flex-shrink: 0; filter: drop-shadow(0 3px 6px rgba(224, 154, 18, .35)); }
.points-card .pt-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.points-card .pt-main .pt-big { margin-left: 0; }
.points-card .pt-big b { font-size: 34px; line-height: 1.1; }
.points-card .pt-side { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.pt-chip { font-size: 13px; font-weight: 800; padding: 5px 11px; border-radius: 999px; border: 1.5px solid #f5b82e; white-space: nowrap; }
.pt-chip.got { background: #f5b82e; color: #3a2a00; }
.pt-streak { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.pt-streak svg { width: 18px; height: 18px; }
/* 数字は真ん中（10/13 ヨッシー「左寄りになり過ぎ」）: アイコン・数字・バッジの 3 列 */
a.points-card { display: grid; grid-template-columns: 56px 1fr auto; }
.pt-coin { width: 56px; height: 56px; filter: none; }
.points-card .pt-main { align-items: center; }
.points-card .pt-side { margin-left: 0; }

/* ダッシュボードの「新しい写真」（10/13） */
.new-photos { margin: 18px 0 22px; }
.np-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.np-head h2 { font-size: 18px; margin: 0; }
.np-head .muted { font-size: 13px; }
.np-list { display: grid; gap: 10px; }
.np-card { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 10px; }
.np-photo { display: block; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--line); }
.np-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.np-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.np-who { font-size: 12px; color: var(--muted); }
.np-name { font-weight: 800; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-kcal { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.np-num { font-size: 24px; font-weight: 900; color: var(--text); font-variant-numeric: tabular-nums; }
.np-btns { margin-left: auto; display: inline-flex; gap: 6px; }
.np-state { display: flex; align-items: center; gap: 10px; }
.np-badge { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; border: 1.5px solid #e2574c; color: #c2392f; }
.np-card.is-checked .np-badge { border-color: var(--line); color: var(--muted); }
.np-ok { padding: 2px 0; font-size: 13px; }

/* GOAL（10/13 ヨッシー D 案）: 的のアイコン・目標を大きく・3 つの数字 */
.goal-top { display: flex; align-items: center; gap: 10px; }
.goal-icon { width: 34px; height: 34px; flex-shrink: 0; }
.goal-big { font-size: 30px; font-weight: 900; line-height: 1.15; margin-top: 10px; }
.goal-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.goal-3 > div { border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.goal-3 b { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.goal-3 span { font-size: 11px; color: var(--muted); }

/* 次の一食の根拠（10/13） */
.sug .opt small.why { display: block; margin-top: 2px; color: var(--text); font-size: 12px; }

/* 運営の会社一覧の並び替え（10/13）: 会社名を長押しで掴む */
.co-list { display: grid; gap: 16px; }
.co-list .co-name { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: grab; }
.co-grip { color: var(--muted); font-size: .7em; margin-right: 8px; letter-spacing: -2px; vertical-align: 2px; }
.co-card.co-dragging { outline: 2px solid var(--accent); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); position: relative; z-index: 5; }
/* 並び替え中は会社名だけに畳む（10/13「摘めるけど動かない」） */
.co-sorting .co-card > :not(.card-head) { display: none; }
.co-sorting .co-card .card-head > :not(.co-name) { display: none; }
.co-sorting .co-card { padding-block: 14px; }
.co-card.co-dragging { transition: none; transform-origin: center; }
.np-new { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: #3b82f6; color: #fff; margin-right: 6px; }

/* AI トレーナーへの質問（10/13） */
.qa-form { display: grid; gap: 8px; margin-top: 10px; }
.qa-form textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 14px; padding: 12px; font: inherit; resize: vertical; background: var(--surface); color: var(--text); }
.qa-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qa-left { font-size: 13px; }
.qa-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.qa-list li { border-top: 1px solid var(--line); padding-top: 12px; }
.qa-q { font-weight: 800; margin: 0 0 6px; }
.qa-a { margin: 0; white-space: pre-line; line-height: 1.75; }
.qa-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.qa-filter a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: 13px; }
.qa-filter a.on { background: var(--text); color: var(--bg); }
.qa-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.qa-meta { font-size: 12px; margin: 0 0 6px; }
.qa-tag { display: inline-block; font-weight: 800; padding: 1px 8px; border-radius: 999px; margin-right: 6px; border: 1px solid var(--line); }
.qa-answered { border-color: #22a06b; } .qa-referred { border-color: #3b82f6; } .qa-declined { border-color: #e2574c; } .qa-error { border-color: #999; }

/* 質問欄を目立たせる（10/13 ヨッシー「UI が目立たない」）: 枠に青の線・吹き出しのアイコン・大きな見出し */
.card.qa { border: 2px solid #3b82f6; }
.qa-top { display: flex; align-items: center; gap: 14px; }
.qa-icon { width: 52px; height: 52px; flex-shrink: 0; }
.qa-top .eyebrow { color: #3b82f6; }
.qa-title { font-size: 21px; font-weight: 900; margin: 2px 0 2px; }
.qa-sub { font-size: 13px; color: var(--muted); }
.qa-form textarea { border-width: 1.5px; border-color: #9cc3f8; min-height: 72px; }
.qa-form .btn.primary { background: #3b82f6; border-color: #3b82f6; }

/* 質問はたたむ（10/13）: 前の分は質問 1 行。押すと答えが開く */
.qa-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.qa-item summary::-webkit-details-marker { display: none; }
.qa-item summary::after { content: "＋"; color: var(--muted); font-weight: 400; flex-shrink: 0; }
.qa-item[open] summary::after { content: "−"; }
.qa-item:not([open]) summary { margin-bottom: 0; }
.qa-form textarea::placeholder { color: #b6c2bd; }
/* 質問欄 B 案（10/13）: 上を青い帯にして、白でアイコンと見出し */
.card.qa { padding: 0; overflow: hidden; }
.qa-band { background: #3b82f6; color: #fff; padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.qa-band .qa-icon { width: 50px; height: 50px; }
.qa-ask { display: block; font-size: 12px; font-weight: 800; letter-spacing: .22em; opacity: .9; }
.qa-band .qa-title { color: #fff; margin: 2px 0 0; }
.qa-body { padding: 4px 20px 20px; }
/* 質問と答えを吹き出しに（10/13 ヨッシー「B で吹き出し」）: 質問は右の青い吹き出し、答えは左にトレーナーのアイコン付き */
.qa-list li { border-top: 0; padding-top: 0; }
.qa-item { display: grid; gap: 8px; }
.qa-item summary.qa-q { justify-self: end; max-width: 82%; background: #3b82f6; color: #fff; font-weight: 700; padding: 10px 14px; border-radius: 18px 18px 4px 18px; margin: 0; line-height: 1.6; }
.qa-item summary.qa-q::after { content: ""; }
.qa-item:not([open]) summary.qa-q { opacity: .75; }
.qa-item:not([open]) summary.qa-q::after { content: " ▾"; font-weight: 400; }
.qa-item .qa-a { position: relative; justify-self: start; max-width: calc(92% - 42px); margin-left: 42px; background: #dbe9fe; color: #1d2b25; padding: 10px 14px; border-radius: 18px 18px 18px 4px; line-height: 1.75; }
.qa-item .qa-a::before { content: ""; position: absolute; left: -42px; bottom: 0; width: 34px; height: 34px; border-radius: 50%; background: #dbe9fe url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='9' r='4.5' fill='%233b82f6'/%3E%3Cpath d='M3.5 21c1-4.2 4.5-6.5 8.5-6.5s7.5 2.3 8.5 6.5z' fill='%233b82f6'/%3E%3C/svg%3E") center / 22px no-repeat; }
.qa-item .qa-a.muted { color: var(--muted); }
/* 押せることを文字で（10/13 ヨッシー「吹き出しを押すことは普通はわからない」） */
.qa-item:not([open]) summary.qa-q { opacity: 1; }
.qa-item:not([open]) summary.qa-q::after { content: "答えを見る ▾"; display: block; margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .45); font-size: 12px; font-weight: 800; text-align: right; }
/* 「答えを見る」を読めるように（10/13「読めない」）: 吹き出しの中で改行して白い文字に */
.qa-item summary.qa-q { display: block; }
.qa-item:not([open]) summary.qa-q::after { color: #fff; opacity: 1; flex-shrink: initial; }

/* 吹き出しをやめて、今の質問と答えだけを素直に（10/13） */
.qa-list li { border-top: 1px solid var(--line); padding-top: 12px; }
.qa-list .qa-q { font-weight: 800; margin: 0 0 6px; }
.qa-list .qa-a { margin: 0; white-space: pre-line; line-height: 1.8; }
.qa-a .qa-p { display: block; margin: 0 0 .45em; } .qa-a .qa-p:last-child { margin-bottom: 0; } /* 10/14 段落の間を空行 1 行分より狭く */
/* パーソナルデータ（トレーナーの会員詳細。10/13） */
.insight .facts { margin-top: 12px; }
.insight .facts b { font-size: 12px; letter-spacing: .08em; }
.insight .facts ul { margin: 4px 0 0; padding-left: 1.2em; line-height: 1.8; }
.insight .fact-cert { font-size: 11px; color: var(--muted, #888); margin-left: 4px; }

/* 画面の中のカメラ（10/13 ヨッシー「ボタンでカメラを起動させて」「左下から過去画像の選択」）。カメラアプリと同じ形: 映像・シャッター・左下に過去の写真 */
.cam { position: fixed; inset: 0; z-index: 1000; background: #000; color: #fff; display: flex; flex-direction: column; }
.cam[hidden] { display: none; }
.cam video { flex: 1; width: 100%; min-height: 0; object-fit: cover; background: #000; }
.cam-close { position: absolute; top: calc(env(safe-area-inset-top) + 12px); left: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.cam-close svg { width: 22px; height: 22px; }
.cam-msg { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 132px); margin: 0; text-align: center; font-size: 13px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.cam-bar { flex: 0 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 18px 28px calc(env(safe-area-inset-bottom) + 26px); background: #000; }
.cam-lib { justify-self: start; width: 52px; height: 52px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.7); background: rgba(255,255,255,.12); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.cam-lib svg { width: 26px; height: 26px; }
.cam-shot { justify-self: center; width: 76px; height: 76px; border-radius: 50%; border: 4px solid #fff; background: #fff; box-shadow: inset 0 0 0 3px #000; cursor: pointer; }
.cam-shot:active { transform: scale(.94); }
.cam-bc { justify-self: end; min-width: 52px; height: 52px; padding: 0 10px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.7); background: rgba(255,255,255,.12); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; text-decoration: none; -webkit-tap-highlight-color: transparent; } /* 右下: バーコードで記録（10/16） */
.cam-bc svg { width: 24px; height: 24px; }
.cam-bc span { font-size: 9px; font-weight: 600; letter-spacing: .02em; line-height: 1; }
.cam-bc:active { transform: scale(.96); }
.cam-text { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 132px); margin: 0 auto; width: max-content; padding: 6px 14px; border-radius: 999px; background: rgba(0,0,0,.45); color: #fff; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; -webkit-tap-highlight-color: transparent; } /* 文字で記録（10/16）。カメラのメッセージと同じ高さ: 出ている時はメッセージを上に */
.cam-msg:not(:empty) ~ .cam-text { bottom: calc(env(safe-area-inset-bottom) + 166px); }
body.cam-open { overflow: hidden; }

/* 質問の例（10/13）: 押すと入力欄に入る */
/* 「例えば」の行の下に 1 つずつ縦に並べる（10/13 ヨッシー「並びが変」）*/
.qa-ex { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: -2px 0 2px; }
.qa-ex-label { font-size: 12px; color: var(--muted); }
.qa-ex-head { align-self: stretch; width: 100%; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.qa-ex-head .btn { margin-left: auto; } /* iPhone の Safari で右に寄らなかったので幅と margin でも押す（10/16） */ /* 例えば … 質問する（10/16 ヨッシー） */
.qa-ex-b { font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; text-align: left; }
.qa-ex-b:active { opacity: .7; }
.qa-list:empty { display: none; }
.qa-form.no-send .qa-ex-head { display: none; } /* 質問するは文字を打った時だけ（10/28） */
/* 考え中（10/28 ヨッシー「考え中の何か動くのがあると分かりやすい」）: 青い点 3 つが順に弾む。視差効果を減らす設定でも動かす（10/15 の決まり） */
.qa-a.thinking { display: flex; align-items: center; gap: 10px; }
.qa-dots { display: inline-flex; gap: 5px; flex: none; }
.qa-dots i { width: 8px; height: 8px; border-radius: 50%; background: #3b82f6; animation: qa-dot 1.1s ease-in-out infinite; }
.qa-dots i:nth-child(2) { animation-delay: .15s; } .qa-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes qa-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-6px); opacity: 1; } } .qa-more { margin-top: 12px; } /* 答えは質問するのすぐ下（10/28） */
/* 質問の回数を使い切った時の案内（10/13） */
.qa-limit { margin: 2px 0 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--text) 8%, transparent); font-size: 13px; line-height: 1.6; }
.qa-limit[hidden] { display: none; }
.qa-form .btn[disabled] { opacity: .45; }

/* 料理名を直した結果（写真のすぐ下。#fixmsg に飛んでも写真の下の方が見えるように。10/14） */
#fixmsg{margin:12px 0 0;scroll-margin-top:40vh}
/* 吹き出しを指で動かす（10/14 ヨッシー「吹き出しを掴んで移動」）。動かした吹き出しは短い棒の代わりに点まで線を引く */
.spot .tag { pointer-events: auto; touch-action: none; -webkit-user-select: none; user-select: none; }
.spot.moved::after { display: none; }
.spot.moved { z-index: 2; }
.spot-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.spot-lines line { stroke: rgba(255,255,255,.9); stroke-width: 2; }
/* 吹き出しを動かせる案内（10/14）: 一番大きい吹き出しを揺らし、写真の下の方に一言 */
@keyframes spot-nudge { 0%, 100% { rotate: 0deg; } 15% { rotate: -5deg; } 30% { rotate: 5deg; } 45% { rotate: -4deg; } 60% { rotate: 3deg; } 75% { rotate: 0deg; } }
.spot .tag.nudge { animation: spot-nudge 1.2s ease-in-out 2; }
.spot-tip { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 4; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.72); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; pointer-events: none; animation: spot-tip-in .3s ease-out; }
@keyframes spot-tip-in { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .spot .tag.nudge, .spot-tip { animation: none; } }

/* 毎日の見直しの報告（10/14） */
.review summary { cursor: pointer; line-height: 1.6; }
.review .review-body { margin-top: 10px; font-size: 13px; line-height: 1.7; white-space: normal; overflow-wrap: anywhere; }

/* 一覧の前へ／次へ（10/14 ヨッシー: どの一覧も 50 件ずつ） */
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 16px 0 8px; }
.pager .muted { font-size: 13px; }
.head-ico { display: inline-flex; align-items: center; gap: 10px; } .head-ico svg { width: 34px; height: 34px; flex-shrink: 0; } .card-head:has(.head-ico) { align-items: center; } /* 10/15: TOTAL / BODY icon beside the heading, same size as GOAL */
.wkdots div.sun span, .wkdots div.sun i:not(.ok):not(.part) { color: #d64545; border-color: #d64545; } .wkdots div.sat span, .wkdots div.sat i:not(.ok):not(.part) { color: #3b82f6; border-color: #3b82f6; } .wkdots div.sun i.future, .wkdots div.sat i.future { opacity: .55; } /* 10/15: Sunday red, Saturday blue (label and empty circle; recorded days keep the store color) */
/* COACH: total-level coaching note at the top of the home (10/15) */
.coach .coach-body { margin-top: 6px; }
.coach .coach-head { font-size: 17px; font-weight: 800; line-height: 1.55; margin: 6px 0 8px; }
.coach .coach-reasons { margin: 0 0 10px; padding-left: 1.2em; font-size: 14px; line-height: 1.7; color: var(--text); }
.coach .coach-reasons li { margin: 2px 0; }
.coach .coach-step { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-top: 8px; }
.coach .coach-step b { display: block; font-size: 11px; letter-spacing: .18em; color: var(--accent); margin-bottom: 4px; }
.coach .coach-step.is-alt b { color: var(--muted); }
.coach .coach-step p { margin: 0; font-size: 14px; line-height: 1.7; }
.coach .coach-close { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
/* meal page: date bar with prev/next, swipeable (10/15) */
.daynav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.daynav .dn-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; flex-shrink: 0; }
.daynav .dn-btn svg { width: 20px; height: 20px; }
.daynav .dn-btn.is-off { color: var(--faint); border-style: dashed; }
.daynav .dn-date { text-align: center; line-height: 1.2; }
.daynav .dn-date b { display: block; font-size: 17px; font-weight: 800; }
.daynav .dn-date small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
@keyframes dn-hint { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-10px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-4px); } }
.daynav.is-hint .dn-date { animation: dn-hint 1.1s ease-out .6s 1; }
@keyframes dn-bump-l { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-8px); } }
@keyframes dn-bump-r { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(8px); } }
.daynav.is-bump-l { animation: dn-bump-l .25s ease-out 1; } .daynav.is-bump-r { animation: dn-bump-r .25s ease-out 1; }
/* 10/15: 視差効果を減らす の設定でも帯の合図は出す（ヨッシーの端末が ON で何も動かなかった） */
.coach .coach-step.is-future { background: transparent; border-style: dashed; } .coach .coach-step.is-future b { color: var(--text); }
/* notebook page curl on the meal page (10/15) */
body.is-turning { overflow-x: hidden; }
.pg-stage { position: absolute; z-index: 60; pointer-events: none; overflow: hidden; }
.pg-track { position: absolute; top: 0; left: 0; width: 100%; height: 100%; will-change: transform; }
.pg-panel { position: absolute; top: 0; left: 0; background: var(--bg); }
.pg-paper { position: absolute; inset: 0; min-height: 300px; background: var(--surface); }
.pg-clone { pointer-events: none; }
.sw-dbg { position: fixed; left: 0; right: 0; bottom: 0; max-height: 40vh; overflow: auto; margin: 0; padding: 6px 8px; font: 11px/1.4 monospace; background: rgba(0,0,0,.8); color: #9f9; z-index: 9999; white-space: pre-wrap; }
.daynav .dn-date { cursor: default; -webkit-user-select: none; user-select: none; }
.daynav .dn-date { cursor: pointer; }
.daynav { position: relative; }

/* これまでの COACH の一言（10/15） */
.coach .coach-more { margin: 10px 0 0; font-size: 13px; text-align: right; }
.coach-history .coach-past { padding: 14px 0 6px; border-top: 1px solid var(--line); }
.coach-history .coach-past:first-of-type { border-top: 0; padding-top: 6px; }
.coach-history .coach-date { margin: 0; font-size: 12px; color: var(--muted); letter-spacing: .06em; }

/* トレーナーからのメッセージ一覧（10/15） */
.trainer-msg { position: relative; }
.trainer-msg .msg-all { position: absolute; right: 18px; top: 16px; font-size: 13px; }
.messages .msg-item { padding: 14px 0 10px; border-top: 1px solid var(--line); }
.messages .msg-item:first-of-type { border-top: 0; padding-top: 6px; }
.messages .msg-item.is-new { background: color-mix(in srgb, var(--accent) 6%, transparent); margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
.messages .msg-date { margin: 0 0 4px; font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.messages .msg-new { color: var(--accent); font-weight: 800; letter-spacing: .12em; }
.messages .msg-item b { font-size: 13px; }
.messages .msg-item p { margin: 2px 0 4px; }

/* 管理者が開く会員の食事の画面: 押せない部品はグレー（10/15 ヨッシー「押せないボタンはグレーアウトして」。会員ページと揃える） */
.detail fieldset:disabled, .detail .seg5[inert], .detail .fix[inert], .detail button:disabled { opacity: .45; filter: grayscale(1); }

/* 右上の歯車 → 設定（10/15 ヨッシー「タブは今のまま 5 つ、右上に小さな歯車」） */
.top .gear { margin-left: auto; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--muted); text-decoration: none; }
.top .gear svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.top .gear.on { color: var(--text); } /* 背景は付けない（10/16 ヨッシー「背景色が違う」） */
.settings .kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin: 0; }
.settings .kv span { color: var(--muted); }
.settings .kv b { font-weight: 600; word-break: break-all; text-align: right; }
.settings select, .settings input[type=number] { width: 100%; font: inherit; font-size: 17px; padding: 13px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); }
.settings .goal-now { font-size: 16px; font-weight: 700; margin: 4px 0 10px; }
.settings .btn[disabled], .settings .btn.disabled { opacity: .4; pointer-events: none; }
.settings .mem-list { list-style: none; margin: 4px 0 0; padding: 0; }
.settings .mem { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; padding: 8px 0; border-top: 1px solid var(--line); }
.settings .mem small { display: block; font-size: 11px; color: var(--muted); }
.settings .mem form { margin: 0; }
.settings .mem .link { padding: 4px 0; white-space: nowrap; }
.settings .mem .link[disabled] { opacity: .4; pointer-events: none; }
.top .gear + .gear { margin-left: -2px; } /* 虫眼鏡と歯車を並べる（10/16） */
.settings .mem-add { display: flex; gap: 8px; margin-top: 12px; }
.settings .mem-add input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); }
.settings .mem-add .btn { width: auto; padding: 10px 14px; white-space: nowrap; font-size: 14px; }
.messages .msg-item.notice b { color: var(--muted); }
.messages .msg-item.notice strong { font-weight: 700; }
.field textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); resize: vertical; }
.exercise .btn.self-btn { background: #f59e0b; border-color: #f59e0b; color: #fff; } /* 自分でやった運動は凡例と同じ橙（10/16） */
.messages .card-head .sub.plain { text-decoration: none; } /* 連絡タブの見出し（リンクではない。10/16） */
.settings .mem-sum { font-size: 14px; line-height: 1.7; margin: 4px 0 8px; }
.settings .mem-focus { font-size: 14px; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.settings .mem-focus span { display: block; font-size: 11px; color: var(--muted); letter-spacing: .06em; margin-bottom: 2px; }
.settings .mem small .tag { display: inline-block; font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--bg); color: var(--muted); margin-right: 6px; }
.settings .mem small .tag.good { color: var(--accent); } .settings .mem small .tag.bad { color: #d9534f; }
.settings .mem .acts { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.settings .mem .acts form { margin: 0; }
.settings .mem small .tag.ok { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.goal-form .int-track { position: relative; height: 40px; margin: 6px 0 0; }
.goal-form .int-track .line { position: absolute; left: 14px; right: 14px; top: 50%; height: 4px; margin-top: -2px; border-radius: 99px; background: var(--line); }
.goal-form .int-track .line .fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 99px; background: var(--accent); }
.goal-form .int-ticks { position: absolute; left: 8px; right: 8px; top: 50%; height: 0; display: flex; justify-content: space-between; }
.goal-form .int-ticks i { width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); box-sizing: border-box; }
.goal-form .int-ticks i.on { background: var(--accent); border-color: var(--accent); }
.goal-form .int-track input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; z-index: 2; }
.goal-form .int-track input[type=range]::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.goal-form .int-track input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -12px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.goal-form .int-track input[type=range]::-moz-range-track { height: 4px; background: transparent; }
.goal-form .int-track input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.goal-form .int-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); padding: 0 2px; }
.goal-form .int-now { margin: 8px 0 0; display: flex; align-items: baseline; gap: 10px; }
.goal-form .int-now b { font-size: 16px; } .goal-form .int-now small { font-size: 12px; color: var(--muted); }
/* 設定の目標カード（10/16） */
.goal-card .goal-now { margin-bottom: 10px; }
.goal-card .goal-kpi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.goal-card .goal-kpi div { background: var(--bg); border-radius: 12px; padding: 10px 10px 8px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.goal-card .goal-kpi span { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.goal-card .goal-kpi b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; white-space: nowrap; }
.goal-card .goal-kpi b small { font-size: 12px; font-weight: 700; color: var(--muted); }
.goal-card .goal-kpi > div > small { font-size: 11px; color: var(--muted); }
.goal-card .goal-prog { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.goal-card .goal-prog i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.goal-card .goal-progtxt { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); margin: 6px 0 12px; }
.goal-card .goal-meta { margin: 0 0 14px; display: grid; gap: 8px; }
.goal-card .goal-meta div { display: flex; gap: 12px; align-items: baseline; font-size: 14px; }
.goal-card .goal-meta dt { flex: none; width: 56px; font-size: 12px; color: var(--muted); }
.goal-card .goal-meta dd { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.goal-card .goal-meta dd.quote { color: var(--text); font-weight: 600; }
.goal-card .int-dots { display: inline-flex; gap: 4px; }
.goal-card .int-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.goal-card .int-dots i.on { background: var(--accent); }
/* 目的（複数回答のチップ。10/16） */
.goal-form .purpose-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.goal-form .pick { position: relative; }
.goal-form .pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.goal-form .pick span { display: inline-block; font-size: 14px; padding: 8px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--text); line-height: 1.3; }
.goal-form .pick input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.goal-form .pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== 管理ページ（10/16 ヨッシー「管理者ページを分かりやすく」） ===== */
.tabbar.staff { grid-template-columns: repeat(5, 1fr); }
.tabbar.staff a { position: relative; }
.tabbar .tab-badge { position: absolute; top: 2px; left: calc(50% + 6px); }
.todo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.todo { display: grid; gap: 2px; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 12px 12px; text-decoration: none; color: var(--text); min-width: 0; }
.todo .todo-n { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--accent); }
.todo b { font-size: 14px; font-weight: 800; }
.todo .todo-sub { font-size: 11px; color: var(--muted); line-height: 1.4; }
.todo.done .todo-n { color: var(--muted); }
.todo.done { background: var(--bg); }
@media (max-width: 420px) { .todo-grid { gap: 8px; } .todo { padding: 12px 10px 10px; } .todo .todo-n { font-size: 28px; } .todo b { font-size: 13px; } }
.kpi-fold summary { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; cursor: pointer; list-style: none; }
.kpi-fold summary::-webkit-details-marker { display: none; }
.kpi-fold summary .sub { font-size: 12px; color: var(--muted); }
.kpi-fold[open] summary { margin-bottom: 12px; }
.kpi-fold .kpis { margin-bottom: 0; }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li a { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "t go" "s go"; column-gap: 12px; padding: 12px 2px; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); align-items: center; }
.menu-list li:first-child a { border-top: 0; }
.menu-list li a b { grid-area: t; font-size: 15px; }
.menu-list li a span { grid-area: s; font-size: 12px; color: var(--muted); }
.menu-list li a i { grid-area: go; font-style: normal; color: var(--muted); }
/* 連絡（トーク一覧） */
.inbox-list { list-style: none; margin: 6px 0 0; padding: 0; }
.inbox-item { border-top: 1px solid var(--line); }
.inbox-item:first-child { border-top: 0; }
.inbox-link { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; text-decoration: none; color: var(--text); }
.inbox-body { display: grid; gap: 2px; min-width: 0; }
.inbox-who { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.inbox-dish { font-size: 14px; }
.inbox-link .go { font-size: 12px; color: var(--accent); white-space: nowrap; }
.chat-list { list-style: none; margin: 6px 0 0; padding: 0; }
.chat-list li a { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 11px 2px; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); }
.chat-list li:first-child a { border-top: 0; }
.chat-list .avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-weight: 800; color: var(--accent); font-size: 18px; }
.chat-list .chat-main { display: grid; gap: 2px; min-width: 0; }
.chat-list .chat-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.chat-list .chat-top small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.chat-list .chat-snip { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-list .chat-snip em { font-style: normal; color: var(--text); }
.chat-list a.is-unread .chat-snip { color: var(--text); font-weight: 600; }
.chat-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--danger, #d9534f); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
/* トーク（吹き出し） */
.chat-head .title-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.chat-head .title-row .btn { width: auto; padding: 8px 14px; font-size: 13px; }
.chat { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 12px; }
.chat-day { align-self: center; margin: 6px 0 2px; }
.chat-day span { font-size: 11px; color: var(--muted); background: var(--bg); padding: 3px 10px; border-radius: 99px; }
.bubble-row { display: flex; flex-direction: column; max-width: 84%; }
.bubble-row.them { align-self: flex-start; align-items: flex-start; }
.bubble-row.me { align-self: flex-end; align-items: flex-end; }
.bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 10px 12px; font-size: 15px; line-height: 1.55; }
.bubble-row.me .bubble { background: var(--accent); border-color: var(--accent); color: #fff; border-radius: 16px 16px 4px 16px; }
.bubble-row.memo .bubble { background: var(--bg); border-style: dashed; color: var(--text); }
.bubble p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.bubble-tag { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.bubble-row.me .bubble-tag { color: rgba(255, 255, 255, .8); }
.bubble-row.memo .bubble-tag { color: var(--muted); }
.bubble-meal { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; text-decoration: none; color: inherit; font-size: 12px; }
.bubble-meal img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.bubble-meta { font-size: 11px; color: var(--muted); margin: 3px 4px 0; }
.bubble-row.is-new .bubble { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.notice-row { align-self: center; max-width: 92%; display: flex; flex-direction: column; align-items: center; }
.notice-bubble { background: var(--bg); border-radius: 12px; padding: 10px 14px; font-size: 13px; text-align: center; }
.notice-bubble b { display: block; }
.notice-bubble p { margin: 4px 0 0; color: var(--muted); }
.chat-end { display: block; height: 1px; scroll-margin-bottom: calc(var(--tabbar-h, 64px) + env(safe-area-inset-bottom) + 96px); } /* 入力欄とタブバーの下に隠れない所で止まる（10/16） */
.chat-compose { position: sticky; bottom: calc(var(--tabbar-h, 64px) + env(safe-area-inset-bottom)); background: var(--bg); padding: 8px 0 6px; margin-top: 4px; }
.chat-compose.in-card { position: static; background: transparent; padding: 12px 0 0; border-top: 1px solid var(--line); margin-top: 8px; }
.chat-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-row textarea { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); resize: none; max-height: 120px; }
.chat-row .btn { width: auto; padding: 10px 16px; white-space: nowrap; }
.chat-memo { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
.chat-focus { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.chat-focus > span { flex: 1; min-width: 0; }
.chat-focus > .thumb { flex: none; } /* 写真は正方形のまま（10/18 ヨッシー「画像が潰れてる」: 上の flex: 1 で横に伸びていた） */
.chat-focus .link { margin-left: auto; font-size: 12px; white-space: nowrap; flex: none; } /* 「やめる」が 2 行に割れない（10/16） */
/* トークの画面（10/16 ヨッシー「表示がおかしい」）: やり取りが少なくても入力欄は画面の下に。吹き出しは下から積む */
.tpl-staff-chat .wrap { display: flex; flex-direction: column; min-height: calc(100dvh - 190px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.tpl-staff-chat .chat { flex: 1; justify-content: flex-end; }
.tpl-staff-chat .chat-empty { margin: auto 0; line-height: 1.8; }
.chat-row textarea { max-height: 120px; }
.viewing .chat-compose { display: none; }
/* 会員一覧 カルテ風（10/16） */
.sort-chips { margin-top: 10px; }
.sort-chips .chip-on { text-decoration: none; }
.sort-chips .chip-on.on { background: var(--accent); color: #fff; }
.legend-line { font-size: 11px; color: var(--muted); margin: 8px 0 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.st { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--line); vertical-align: middle; margin-right: 4px; }
.st.ok { background: var(--accent); } .st.warn { background: #f5a23a; } .st.bad { background: #d9534f; } .st.na { background: var(--line); }
.mrows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mrow a { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left-width: 4px; border-radius: 14px; padding: 12px 12px 12px 10px; text-decoration: none; color: var(--text); }
.mrow.st-ok a { border-left-color: var(--accent); } .mrow.st-warn a { border-left-color: #f5a23a; } .mrow.st-bad a { border-left-color: #d9534f; } .mrow.st-na a { border-left-color: var(--line); }
.mrow .thumb.sm .avatar { display: grid; place-items: center; width: 100%; height: 100%; font-weight: 800; color: var(--accent); background: var(--bg); }
.mrow-main { display: grid; gap: 4px; min-width: 0; }
.mrow-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; }
.mrow-state { font-size: 12px; color: var(--muted); }
.mrow-kpi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 8px; margin-top: 2px; }
.mrow-kpi .mrow-goal { grid-column: span 2; }
.mrow-kpi > span { display: grid; gap: 1px; min-width: 0; }
.mrow-kpi small { font-size: 10px; color: var(--muted); letter-spacing: .04em; white-space: nowrap; }
.mrow-kpi b { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow-kpi b i { font-style: normal; font-size: 10px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.mrow-bar { display: block; height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 2px; }
.mrow-bar i { display: block; height: 100%; background: var(--accent); }
.mrow .go { color: var(--muted); }
@media (max-width: 400px) { .mrow a { grid-template-columns: 40px 1fr auto; gap: 8px; } .mrow-kpi { gap: 4px; } }
/* 会員詳細 ひとめで分かる（10/16） */
.glance .glance-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 4px 0 10px; }
.glance .glance-kpi > span { background: var(--bg); border-radius: 12px; padding: 8px 10px; display: grid; gap: 2px; min-width: 0; }
.glance .glance-kpi small { font-size: 10px; color: var(--muted); letter-spacing: .04em; }
.glance .glance-kpi b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.glance .glance-kpi b i { font-style: normal; font-size: 10px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.glance .glance-goal { margin: 0 0 8px; font-size: 14px; }
.glance .glance-sum { font-size: 14px; line-height: 1.7; margin: 0 0 8px; }
.glance .glance-focus { font-size: 14px; margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.glance .glance-focus span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.glance .glance-acts { display: flex; gap: 8px; margin: 0; }
.glance .glance-acts .btn { width: auto; padding: 9px 14px; font-size: 13px; }
/* 週のふりかえり（10/16） */
.weekly-kpis .kpi b { font-size: 30px; }
.cols.two { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .cols.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 音声で入力（10/16 ヨッシー「音声入力」）: 入力欄の右端のマイク。聞いている間は赤く脈打つ */
.mic-wrap { position: relative; display: block; }
.mic-wrap textarea, .mic-wrap input { padding-right: 54px !important; }
.mic { position: absolute; right: 8px; top: 8px; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid #9cc3f8; background: var(--surface); color: #3b82f6; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.mic[hidden] { display: none; }
.mic svg { width: 20px; height: 20px; }
.mic.on { background: #e2574c; border-color: #e2574c; color: #fff; animation: micpulse 1.2s ease-in-out infinite; }
@keyframes micpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(226, 87, 76, .5); } 50% { box-shadow: 0 0 0 9px rgba(226, 87, 76, 0); } }
.add-form .mic { top: 50%; transform: translateY(-50%); }
@media (prefers-reduced-motion: reduce) { .mic.on { animation: none; } }
/* 質問欄で読み取った食事・運動の確認の札（10/16） */
.qa-rec { margin-top: 12px; padding: 14px; border: 1.5px solid #9cc3f8; border-radius: 14px; background: var(--surface); }
.qa-rec-h { margin: 0 0 10px; font-weight: 800; }
.qa-rec .seg3 { margin-bottom: 0; }
.qa-rec .field input, .qa-rec .field select { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); width: 100%; box-sizing: border-box; }
.qa-rec-row { display: flex; align-items: center; gap: 16px; }
.qa-rec-row .link { font: inherit; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; }
.qa-rec-msg { margin: 0; font-size: 14px; line-height: 1.6; }
.qa-rec-msg:empty { display: none; }
.qa-rec-msg.ok { color: #22a06b; font-weight: 700; }
/* BODY のグラフのタップ（10/23）: 縦線＋丸、下の行に数字。横になぞれるよう縦のスクロールだけブラウザに任せる */
.bchart[data-pts] { touch-action: pan-y; cursor: pointer; }
.bchart .cur line { stroke: var(--text); stroke-width: 1; stroke-dasharray: 2 3; opacity: .6; }
.bchart .cur .cw { fill: #f5a23a; stroke: var(--surface); stroke-width: 2; }
.bchart .cur .cf { fill: #1e9e6a; stroke: var(--surface); stroke-width: 2; }
.bread { font-size: 13px; margin: 2px 0 6px; min-height: 1.4em; color: var(--text); line-height: 1.5; }
.bread.muted { font-size: 11px; color: var(--muted); }
.bchart .tip rect { fill: var(--surface); stroke: var(--line); stroke-width: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.15)); }
.bchart .tip text { font-size: 9px; fill: var(--text); font-weight: 700; }
.bchart .tip .t2 { font-weight: 500; }
.bread b { font-weight: 800; }
.bread small { font-size: 11px; color: var(--muted); margin-left: 2px; }
/* AI トレーナーのアドバイスの強さ（10/24）: 見出しの右の小さなラジオボタン（10/24 ヨッシー「スライダー辞めてラジオボタンに」）。モノクロ */
.coach .card-head { align-items: center; }
.coach .cm-radio { display: inline-flex; align-items: center; gap: 10px; margin: 0; }
.coach .cm-radio label { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.coach .cm-radio input { accent-color: var(--text); width: 14px; height: 14px; margin: 0; cursor: pointer; }
.coach .cm-radio label:has(input:checked) { color: var(--text); font-weight: 800; }
.coach .cm-radio.ro label, .coach .cm-radio.ro input { cursor: default; }
.coach .cm-radio.ro input { opacity: .6; }
.coach .cm-radio.saving { opacity: .5; pointer-events: none; }
@media (max-width: 360px) { .coach .cm-radio { gap: 6px; } .coach .cm-radio label { font-size: 11px; } }

/* LINE の中のブラウザの案内（10/26）。モノクロの細い帯 */
.line-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--text); color: var(--surface); font-size: 12px; line-height: 1.5; }
.line-bar span { flex: 1; }
.line-bar .btn { flex: none; background: var(--surface); color: var(--text); border: 0; font-size: 12px; font-weight: 800; padding: 6px 12px; white-space: nowrap; }
/* 横に動く対策（10/27 ヨッシー「横に動く。動かない様にして」設定ページ）: 選択欄は一番長い選択肢の幅に広がり、grid の .field ごと画面からはみ出していた。
   欄は画面の幅に収め（長い選択肢は欄の中で切れる。開けば全文）、念のためページ全体も横に動かさない（clip はスクロールの箱を作らないので sticky に影響しない） */
.field { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.field > select, .field > input { min-width: 0; max-width: 100%; box-sizing: border-box; }
html, body { overflow-x: clip; } /* 10/27 WebKit で確認: 選択欄の中の長い選択肢の文が欄の外までページの幅に数えられる（設定ページ 390 → 462）。html だけでは効かず body にも要る */
/* 10/30 BODY のグラフ: 体重・体脂肪率の 2 段。目盛りは各段の左、見出しと目標の数字はグラフの中に書く */
.bchart .ax { font-size: 10px; font-variant-numeric: tabular-nums; }
.bchart .ax:not(.d) { text-anchor: end; }
.bchart .ttl { font-size: 11px; font-weight: 700; fill: var(--text); }
.bchart .ttl tspan { font-weight: 500; fill: var(--muted); }
.bchart .gl { font-size: 10px; fill: var(--muted); text-anchor: end; font-weight: 700; }
.bchart .goal { stroke-width: 1.2; }
.bchart .pf { stroke: var(--surface); stroke-width: 1.5; }
/* 10/30 先週のふりかえりのグラフ: 見出し・数字・目安の線・凡例を付け、色は意味だけ（曜日ごとの色はやめた） */
.g-ttl { font-size: 13px; font-weight: 700; margin: 14px 0 6px; }
.g-ttl small { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 2px; }
/* 棒・目安の線・数字はどれも余白なしの 96px を基準に（Codex: 余白込みの高さと食い違って線と棒がずれる・数字の分だけ棒が縮む）。数字は棒の上に絶対配置 */
.k7-plot { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 96px; margin-top: 30px; border-bottom: 1px solid var(--line); }
.k7-col { position: relative; height: 100%; }
.k7-col i { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 30px; border-radius: 4px 4px 0 0; background: var(--accent); }
.k7-col i.hi { background: #f0a040; }
.k7-col .v { position: absolute; left: 0; right: 0; text-align: center; font-size: 10px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.k7-col .v.no { bottom: 4px; font-weight: 500; color: var(--muted); line-height: 1.2; white-space: normal; }
.k7-goal { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--muted); z-index: 1; pointer-events: none; }
.k7-goal span { position: absolute; right: 0; bottom: 2px; font-size: 10px; font-weight: 700; color: var(--muted); background: var(--surface); padding: 0 3px; border-radius: 3px; }
.k7-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; margin-top: 3px; }
.k7-days span { font-size: 11px; color: var(--text); line-height: 1.25; }
.k7-days small { display: block; font-size: 9px; color: var(--muted); }
.g-key { font-size: 11px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 6px 0 0; }
.g-key i { display: inline-block; width: 12px; height: 10px; border-radius: 2px; margin-right: -8px; vertical-align: middle; }
.g-key .k-ok { background: var(--accent); } .g-key .k-hi { background: #f0a040; }
.g-key .k-goal { height: 0; border-top: 1.5px dashed var(--muted); border-radius: 0; }
.g-key .k-dot { width: 10px; border-radius: 50%; background: var(--accent); }
.g-key .k-late { background: rgba(240, 160, 64, .35); }
.g-key .k-none { border: 1px dashed var(--faint); background: transparent; }
.tline .strip b { background: var(--accent); }
.bchart .raw { fill: #b9c4bf; }
.legend .lg-r { background: #b9c4bf; height: 8px; width: 8px; border-radius: 50%; }
/* 10/30 カロリーの棒を PFC の 3 色に（ホームの PFC 円グラフと同じ色）。区切りは 2px の隙間。数字は目安の点線に重なっても読めるよう地の色で抜く */
.k7-col i.stk { display: flex; flex-direction: column; gap: 2px; background: transparent; overflow: hidden; }
.k7-col i.stk b { display: block; min-height: 2px; flex-basis: 0; }
.k7-col i.stk b.p, .g-key .k-p { background: var(--pp, var(--p)); }
.k7-col i.stk b.f, .g-key .k-f { background: var(--pf, var(--f)); }
.k7-col i.stk b.c, .g-key .k-c { background: var(--pc, var(--c)); }
.k7-col i.stk b.n { background: var(--faint); }
.k7-col .v { z-index: 2; } .k7-col .v:not(.no) { left: 50%; right: auto; transform: translateX(-50%); background: var(--surface); padding: 0 2px; border-radius: 3px; }
.g-key .k-p, .g-key .k-c { border: 1px solid rgba(0, 0, 0, .12); }
