/* ============================================================
   減脂共同追蹤 — 樣式
   ============================================================ */
:root {
  --bg: #eaeeec;
  --card: #ffffff;
  --ink: #16211e;
  --muted: #7c8a86;
  --line: #e7ece9;
  --brand: #0f766e;
  --brand-2: #14b8a6;
  --water: #2563eb;
  --cal: #ea580c;
  --danger: #dc2626;
  --shadow: 0 1px 2px rgba(15,40,36,.04), 0 10px 26px rgba(15,40,36,.06);
  --shadow-lg: 0 2px 6px rgba(15,40,36,.05), 0 20px 44px rgba(15,40,36,.13);
  --radius: 22px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Noto Sans TC", "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* 數字對齊、緊排,更精緻 */
.hero-cur, .ov-weight, .tile-val, .comp-big-val, .comp-val, .cid-val,
.ovc b, .today-cal-note b, .hero-togo, .comp-big b {
  font-variant-numeric: tabular-nums; letter-spacing: -0.015em;
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
small { font-size: .6em; font-weight: 500; color: var(--muted); margin-left: 2px; }

/* ---- 登入 ---- */
.screen { min-height: 100vh; min-height: 100dvh; }
.login-screen {
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(120% 120% at 50% 0%, #16897e 0%, #0f766e 45%, #0c4d46 100%);
}
.login-card {
  background: #fff; border-radius: 26px; padding: 40px 28px; width: 100%;
  max-width: 360px; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.25);
}
.login-logo { font-size: 52px; }
.login-card h1 { font-size: 24px; margin: 10px 0 4px; font-weight: 900; }
.login-sub { color: var(--muted); margin: 0 0 22px; }
.login-card input {
  width: 100%; padding: 15px 16px; font-size: 16px; border: 2px solid var(--line);
  border-radius: 14px; margin-bottom: 12px; outline: none;
}
.login-card input:focus { border-color: var(--brand-2); }
.login-error { color: var(--danger); font-size: 14px; margin: 10px 0 0; }

.btn-primary {
  width: 100%; padding: 15px; font-size: 16px; font-weight: 700; color: #fff;
  background: linear-gradient(160deg, #13938a, #0f766e); border: none; border-radius: 14px; cursor: pointer;
  box-shadow: 0 8px 20px rgba(15,118,110,.26); transition: transform .12s;
}
.btn-primary:active { transform: scale(.985); }
.btn-primary:disabled { opacity: .6; }
.btn-danger {
  padding: 14px 18px; font-weight: 700; color: var(--danger);
  background: #fff0f0; border: none; border-radius: 14px; cursor: pointer;
}
.btn-ghost {
  width: 100%; padding: 13px; font-weight: 700; color: var(--brand);
  background: #e9f6f4; border: none; border-radius: 14px; cursor: pointer; margin-top: 6px;
}

/* ---- 主框架 ---- */
.app-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 14px) 18px 13px;
  background: linear-gradient(180deg, #108178 0%, #0d635b 100%);
  color: #fff; box-shadow: 0 2px 16px rgba(15,40,36,.14);
}
.app-title { font-weight: 900; font-size: 18px; letter-spacing: .2px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.18); color: #fff; font-size: 22px; line-height: 1;
}

.tabs {
  position: sticky; top: 0; z-index: 15; display: flex; gap: 8px;
  padding: 12px 16px; background: var(--bg); overflow-x: auto;
}
.tab {
  flex: 0 0 auto; padding: 9px 19px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); font-weight: 700; font-size: 15px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(15,40,36,.04); transition: transform .12s, box-shadow .2s;
}
.tab:active { transform: scale(.97); }
.tab.active {
  background: linear-gradient(160deg, #14a094, var(--brand)); color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px rgba(15,118,110,.3);
}

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

/* ---- 卡片通用 ---- */
.card {
  background: var(--card); border-radius: var(--radius); padding: 17px 17px 19px;
  box-shadow: var(--shadow); border: 1px solid rgba(15,40,36,.045); margin-bottom: 14px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 800; margin-bottom: 13px; letter-spacing: .2px;
}
.link-btn { border: none; background: none; color: var(--brand); font-weight: 700; font-size: 14px; cursor: pointer; }
.hint { color: var(--muted); font-size: 13px; text-align: center; margin: 12px 4px 0; }

/* 進度條 */
.bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar.big { height: 12px; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-2), var(--brand)); transition: width .4s; }

/* ---- 總覽 ---- */
.overview { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.ov-card {
  background: var(--card); border-radius: var(--radius); padding: 19px 18px 17px;
  box-shadow: var(--shadow); cursor: pointer; border: 1px solid rgba(15,40,36,.045);
  transition: transform .12s, box-shadow .2s;
}
.ov-card:active { transform: scale(.99); box-shadow: var(--shadow-lg); }
.ov-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ov-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px;
}
.ov-name { font-weight: 800; font-size: 17px; flex: 1; }
.ov-lost { font-size: 13px; font-weight: 700; color: var(--brand); }
.ov-weight { font-size: 34px; font-weight: 900; line-height: 1.1; }
.ov-target { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.ov-pct { text-align: right; font-size: 12px; color: var(--muted); margin-top: 4px; }
.ov-spark { margin: 10px 0 6px; }
.ov-spark .spark { width: 100%; height: 70px; display: block; }
.ov-nochart { font-size: 12.5px; color: var(--muted); text-align: center; padding: 16px 0 10px; }
.spark-line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: rgba(20,184,166,.14); stroke: none; }
.spark-dot { fill: var(--brand); }
.spark-target { stroke: var(--cal); stroke-width: 1.3; stroke-dasharray: 4 4; }
.ov-cal {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 4px;
  margin-top: 12px; background: #f6f9f8; border-radius: 14px; padding: 12px 10px;
}
.ovc { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.ovc b { font-size: 20px; font-weight: 900; }
.ovc small { font-size: 11px; color: var(--muted); }
.ovc-op { font-size: 16px; color: var(--muted); font-weight: 700; padding-bottom: 8px; }
.ovc.rem b { color: var(--brand); }
.ovc.rem.neg b { color: var(--danger); }
.ov-today { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.today-cal-note { font-size: 13px; color: #47565a; margin-top: 12px; }
.today-cal-note b { font-size: 15px; color: var(--brand); }
.today-cal-note b.neg { color: var(--danger); }

/* 即時通知橫幅 */
.toast {
  position: fixed; left: 50%; transform: translate(-50%, -20px); z-index: 90;
  top: calc(env(safe-area-inset-top) + 66px); max-width: 92%;
  background: #14342f; color: #fff; padding: 12px 18px; border-radius: 14px;
  font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.3);
  opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.mini {
  font-size: 12.5px; font-weight: 600; color: #3a4a46; background: #eef4f2;
  padding: 6px 10px; border-radius: 10px;
}
.mini.over { background: #fff2ea; color: var(--cal); }

/* ---- 個人:進度卡 ---- */
.hero {
  background: radial-gradient(135% 130% at 88% 0%, #16897e 0%, #0f766e 46%, #0a4f48 100%);
  color: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-lg);
  margin: 6px 0 14px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; top: -40%; right: -10%; width: 60%; height: 120%;
  background: radial-gradient(circle, rgba(255,255,255,.10), transparent 60%); pointer-events: none;
}
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.hero-cur { font-size: 42px; font-weight: 900; line-height: 1; }
.hero-cur small { color: rgba(255,255,255,.7); }
.hero-sub { color: rgba(255,255,255,.75); font-size: 13px; margin-top: 4px; }
.hero-right { text-align: right; }
.hero-target { font-size: 14px; color: rgba(255,255,255,.85); }
.hero-togo { font-size: 18px; font-weight: 800; margin-top: 4px; }
.hero .bar { background: rgba(255,255,255,.25); }
.hero .bar-fill { background: #fff; }
.hero-foot { display: flex; justify-content: space-between; font-size: 13px; margin-top: 8px; color: rgba(255,255,255,.9); }

/* 今天三格 */
.today-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { background: #f6f9f8; border-radius: 14px; padding: 12px 8px; text-align: center; }
.tile-icon { font-size: 20px; }
.tile-val { font-size: 22px; font-weight: 900; margin-top: 2px; }
.tile-label { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.tile-bar { height: 5px; border-radius: 999px; background: #e1e8e6; margin-top: 8px; overflow: hidden; }
.tile-bar-fill { height: 100%; background: var(--brand-2); }

.water-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.water-quick.inline { margin-top: 12px; align-items: center; }
.wq-label { font-size: 13px; color: var(--muted); }
.wq {
  padding: 8px 14px; border-radius: 10px; border: 1.5px solid var(--line);
  background: #fff; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--water);
}
.wq-zero { color: var(--muted); }

/* 目標格 */
.goal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.goal-item {
  display: flex; justify-content: space-between; align-items: baseline;
  background: #f6f9f8; border-radius: 12px; padding: 10px 12px;
}
.goal-item span { font-size: 13px; color: var(--muted); }
.goal-item b { font-size: 15px; }

/* 歷史 */
.hist { display: flex; flex-direction: column; }
.hist-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  border-top: 1px solid var(--line); cursor: pointer;
}
.hist-row:first-child { border-top: none; }
.hist-date { width: 60px; font-weight: 700; font-size: 14px; flex: 0 0 auto; }
.hist-date small { display: block; font-size: 11px; margin: 0; }
.hist-main { flex: 1; min-width: 0; }
.hist-weight { font-size: 15px; }
.hist-note { font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-side { font-size: 13px; color: #47565; text-align: right; flex: 0 0 auto; color: #556; }

/* 圖表 */
.chart-card .chart { width: 100%; height: 120px; display: block; }
.chart-line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--brand); }
.chart-target { stroke: var(--cal); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart-legend { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.dot-target { width: 16px; height: 0; border-top: 2px dashed var(--cal); display: inline-block; }

/* 報告照片 */
.report-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.report-thumb {
  position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden;
  background: #eef4f2; cursor: pointer; border: 1px solid var(--line);
}
.report-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-fail { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 12px; color: var(--muted); }
.report-date {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; font-size: 11px;
  color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); text-align: center;
}
.cmt-badge {
  position: absolute; top: 6px; right: 6px; font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(15,40,36,.72); padding: 2px 7px; border-radius: 999px;
}
.more-btn {
  display: block; width: 100%; margin-top: 12px; padding: 11px; border: 1.5px dashed var(--line);
  background: #f6f9f8; border-radius: 12px; color: var(--brand); font-weight: 700; font-size: 14px; cursor: pointer;
}

/* 照片留言 */
.comments-wrap { margin-top: 6px; }
.photo-comments { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; max-height: 34vh; overflow-y: auto; }
.cmt { background: #f4f7f6; border-radius: 12px; padding: 9px 12px; }
.cmt-author { font-weight: 800; font-size: 13px; color: var(--brand); margin-right: 8px; }
.cmt-body { font-size: 14px; color: var(--ink); }
.cmt-time { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.cmt-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 10px 0; }
.comment-input { display: flex; gap: 8px; align-items: center; }
.comment-who {
  flex: 0 0 auto; padding: 10px 10px; border-radius: 12px; border: 1.5px solid var(--line);
  background: #eef4f2; color: var(--brand); font-weight: 700; font-size: 12.5px; cursor: pointer; white-space: nowrap;
}
.comment-input input {
  flex: 1; min-width: 0; padding: 11px 12px; font-size: 16px; border: 2px solid var(--line);
  border-radius: 12px; outline: none; background: #fbfdfc;
}
.comment-input input:focus { border-color: var(--brand-2); }
.comment-send {
  flex: 0 0 auto; padding: 11px 16px; border: none; border-radius: 12px; background: var(--brand);
  color: #fff; font-weight: 700; font-size: 14px; cursor: pointer;
}
.comment-send:disabled { opacity: .6; }
.report-viewer { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.report-viewer img { width: 100%; max-height: 68vh; object-fit: contain; display: block; border-radius: 14px; background: #f2f5f4; }
.photo-note { background: #f6f9f8; border-radius: 12px; padding: 12px 14px; margin: 8px 0 0; font-size: 14px; color: #3a4a46; }

/* 餐點照片 */
.meal-day { margin-bottom: 14px; }
.meal-day:last-child { margin-bottom: 0; }
.meal-day-head { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.report-thumb.no-photo { background: #f6f9f8; }
.report-thumb.no-photo .thumb-fail { padding: 8px; color: #3a4a46; font-size: 12.5px; line-height: 1.5; }
.meal-type {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 6px; font-size: 11px;
  color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); text-align: center; font-weight: 600;
}
.meal-suggest { margin-bottom: 14px; }
.suggest-label { font-size: 13px; font-weight: 800; color: var(--brand); margin-bottom: 8px; }
.suggest-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.suggest-chip {
  padding: 9px 13px; border-radius: 12px; border: 1.5px solid var(--line); background: #f6f9f8;
  font-size: 13px; font-weight: 600; color: #35443f; cursor: pointer; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.suggest-chip:active { background: #e4f4f0; border-color: var(--brand-2); }
.suggest-hint { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.meal-preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.mp-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; }
.mp-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-del {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; line-height: 1; cursor: pointer;
}
.photo-count {
  position: absolute; top: 6px; left: 6px; font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(15,40,36,.72); padding: 2px 7px; border-radius: 999px;
}
.photo-meta { background: #eef4f2; border-radius: 12px; padding: 10px 14px; margin: 8px 0 0; font-size: 14px; font-weight: 700; color: var(--brand); }

/* 上傳中 */
.uploading {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  background: rgba(10,20,18,.4);
}
.uploading-box { background: #fff; padding: 20px 30px; border-radius: 16px; font-weight: 700; box-shadow: var(--shadow); }

/* InBody 體組成 */
.comp-highlight { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.comp-big { border-radius: 16px; padding: 16px 14px; text-align: center; color: #fff; }
.comp-big.fat { background: linear-gradient(160deg, #f97316, #ea580c); }
.comp-big.muscle { background: linear-gradient(160deg, #14b8a6, #0f766e); }
.comp-big-label { font-size: 13px; opacity: .9; }
.comp-big-val { font-size: 32px; font-weight: 900; line-height: 1.1; margin-top: 2px; }
.comp-big-val small { color: rgba(255,255,255,.8); }
.comp-big-hint { font-size: 13px; font-weight: 800; opacity: .98; margin-top: 2px; }
.comp-big-range { font-size: 11px; opacity: .8; margin-top: 2px; }
.comp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.comp-item { background: #f6f9f8; border-radius: 12px; padding: 10px 8px; text-align: center; }
.comp-label { font-size: 12px; color: var(--muted); }
.comp-val { font-size: 20px; font-weight: 900; margin-top: 2px; }
.comp-range { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.comp-tag { display: inline-block; font-size: 11px; font-weight: 800; margin-top: 4px; padding: 1px 8px; border-radius: 999px; }
.comp-tag.ok { background: #dcf3ea; color: #0f766e; }
.comp-tag.warn { background: #fff1dc; color: #c2680c; }
.comp-tag.bad { background: #ffe1e1; color: #d33; }

/* CID 肌肉脂肪分析圖 */
.cid-card { padding-top: 18px; }
.cid-sub { font-size: 13px; color: var(--muted); font-weight: 700; }
.cid-title { font-size: 22px; font-weight: 900; margin: 2px 0 16px; }
.cid-bars { display: flex; flex-direction: column; gap: 14px; }
.cid-row { display: flex; align-items: center; gap: 10px; }
.cid-left { width: 78px; flex: 0 0 auto; }
.cid-label { font-size: 13px; font-weight: 700; color: #47565a; }
.cid-val { font-size: 17px; font-weight: 900; color: var(--ink); }
.cid-val small { font-size: 11px; }
.cid-std { width: 58px; flex: 0 0 auto; font-size: 10.5px; line-height: 1.3; color: var(--muted); text-align: right; }
.cid-track { position: relative; flex: 1; height: 26px; background: #eef1f0; border-radius: 6px; overflow: hidden; }
.cid-band { position: absolute; left: 42%; width: 13%; top: 0; bottom: 0; background: #c9d1ce; }
.cid-fill { position: absolute; left: 0; top: 0; bottom: 0; background: #5cb894; border-right: 3px solid #2f9e78; border-radius: 6px 0 0 6px; }
.cid-desc { font-size: 14px; line-height: 1.8; color: #3a4a46; margin: 16px 0 0; }

.inbody-more { margin: 4px 0 8px; }
.inbody-more summary { cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--brand); padding: 8px 0; list-style: none; }
.inbody-more summary::-webkit-details-marker { display: none; }
.inbody-more[open] summary { margin-bottom: 8px; }
.calc-hint { font-size: 13px; color: var(--brand); font-weight: 700; margin: 4px 2px 0; min-height: 16px; }
.field select {
  width: 100%; padding: 13px 14px; font-size: 16px; border: 2px solid var(--line);
  border-radius: 12px; outline: none; background: #fbfdfc; -webkit-appearance: none; appearance: none;
}
.field select:focus { border-color: var(--brand-2); }

/* 空狀態 */
.empty-state { text-align: center; color: var(--muted); padding: 48px 20px; line-height: 1.8; }
.empty-state.small { padding: 28px 20px; }

/* FAB */
.fab {
  position: fixed; right: 20px; bottom: calc(env(safe-area-inset-bottom) + 22px);
  width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(160deg, #16b3a3, #0f766e); color: #fff; font-size: 30px;
  box-shadow: 0 12px 28px rgba(15,118,110,.45); z-index: 30; transition: transform .12s;
}
.fab:active { transform: scale(.94); }

/* ---- 視窗 ---- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10,20,18,.4); }
.modal-sheet {
  position: relative; width: 100%; max-width: 560px; margin: 0 auto;
  background: #fff; border-radius: 26px 26px 0 0; padding: 10px 20px calc(env(safe-area-inset-bottom) + 24px);
  max-height: 92vh; overflow-y: auto; animation: slideUp .25s ease;
}
.modal-sheet.tall { max-height: 94vh; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-handle { width: 42px; height: 5px; border-radius: 3px; background: #d8e0dd; margin: 6px auto 14px; }
.modal-sheet h2 { font-size: 19px; margin: 0 0 16px; font-weight: 800; }

.section-label { font-size: 13px; font-weight: 800; color: var(--brand); margin: 18px 0 8px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field input {
  width: 100%; padding: 13px 14px; font-size: 16px; border: 2px solid var(--line);
  border-radius: 12px; outline: none; background: #fbfdfc;
}
.field input:focus { border-color: var(--brand-2); }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 16px; border-radius: 999px; background: #eef4f2; color: #3a4a46;
  font-size: 14px; font-weight: 600; cursor: pointer; border: 1.5px solid transparent;
}
.chip.active { background: var(--brand); color: #fff; }

.modal-actions { display: flex; gap: 12px; margin-top: 20px; }
.modal-actions .btn-primary { flex: 1; }

.menu-item {
  display: block; width: 100%; text-align: left; padding: 16px 14px; font-size: 16px;
  border: none; background: none; border-radius: 12px; cursor: pointer; color: var(--ink);
}
.menu-item:active { background: #f0f4f3; }
.menu-note { font-size: 13px; color: var(--muted); margin: 12px 4px 0; line-height: 1.6; }

/* 設定警告 */
.config-warning { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); z-index: 100; }
.config-warning-box { background: #fff; border-radius: 20px; padding: 28px; max-width: 400px; box-shadow: var(--shadow); }
.config-warning-box h2 { margin-top: 0; }
.config-warning-box code { background: #eef4f2; padding: 2px 6px; border-radius: 6px; }
