:root {
  color-scheme: light;
  --bg: #f5f6f2;
  --card: #ffffff;
  --ink: #18201b;
  --muted: #6b756f;
  --line: #e6e9e3;
  --accent: #23845b;
  --accent-2: #2fa36f;
  --accent-ink: #ffffff;
  --accent-soft: #e5f3eb;
  --p: #23845b;
  --c: #e0a93b;
  --f: #d4704f;
  --warn-bg: #fff4e0;
  --warn-ink: #7a4b00;
  --danger-bg: #fde8e6;
  --danger-ink: #8c1d12;
  --info-bg: #eaf1f8;
  --info-ink: #24476b;
  --shadow: 0 1px 2px rgba(20, 32, 25, .04), 0 6px 20px rgba(20, 32, 25, .06);
  --shadow-lg: 0 2px 6px rgba(20, 32, 25, .06), 0 16px 40px rgba(20, 32, 25, .10);
  --radius: 20px;
  --glass: rgba(245, 246, 242, .82);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { overflow-x: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 16px; line-height: 1.6; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
h1 { font-size: 17px; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 19px; margin: 0 0 14px; letter-spacing: -0.02em; }
h2 small, h3 small { font-weight: 400; color: var(--muted); font-size: 13px; }
h3 { font-size: 15px; margin: 18px 0 8px; }
button { font: inherit; cursor: pointer; color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- 상단 ---------- */
.top { background: var(--glass); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top > .wrap:first-child { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; padding-bottom: 4px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, var(--accent-2), var(--accent)); box-shadow: 0 4px 12px rgba(35, 132, 91, .3); }
.logo svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.top p { margin: 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tabs-in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs button { display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 12px 14px 11px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; transition: color .15s; }
.tabs svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
.tabs button:disabled { opacity: .35; cursor: not-allowed; }
.onboarding #printBtn, .onboarding .foot { display: none; }
.onboarding .top { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }

main { padding-top: 20px; padding-bottom: 24px; overflow-x: clip; }
.card { background: var(--card); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card h2:not(:first-child) { margin-top: 26px; }
.muted { color: var(--muted); font-size: 15px; }
.hint { color: var(--muted); font-size: 15px; margin: 0 0 8px; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.primary { background: var(--accent); color: var(--accent-ink); border: 0; padding: 12px 20px; border-radius: 14px; font-weight: 700; transition: transform .1s, filter .15s; }
.primary:hover { filter: brightness(1.06); }
.primary:active { transform: scale(.98); }
.ghost { background: var(--card); border: 1px solid var(--line); color: var(--ink); padding: 11px 16px; border-radius: 12px; }
.ghost:hover { border-color: var(--muted); }
.small { padding: 6px 12px; font-size: 13px; }
.link { background: none; border: 0; color: var(--muted); padding: 10px; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 로그인 ---------- */
.topright { display: flex; gap: 6px; align-items: center; flex: none; }
.acct { position: relative; }
.topright .small { padding: 5px 11px; font-size: 12px; border-radius: 999px; }
#acctBtn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
#acctBtn { display: inline-flex; align-items: center; gap: 5px; }
#acctBtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#acctBtn.on.here { background: var(--accent); color: var(--accent-ink); }
.modes[hidden] { display: none; }
.acct-card { max-width: 520px; margin-left: auto; margin-right: auto; }
.acct-card h2.acct-sub { margin-top: 22px; }
.acct-me { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.acct-me div { display: grid; gap: 2px; }
.acct-me small { color: var(--muted); font-size: 13px; }
.acct-av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 18px; flex: none; }
.acct-card .ghost.danger { color: var(--danger-ink); }
.ex-today .meal-hero { margin-bottom: 12px; }
.acctpop { position: absolute; right: 0; top: calc(100% + 8px); width: 236px; background: var(--card); border-radius: 16px; padding: 14px; box-shadow: var(--shadow-lg); z-index: 20; animation: pop .16s ease-out; }
.acctpop[hidden] { display: none; }
.acctpop form { display: grid; gap: 8px; }
.acctpop input { width: 100%; padding: 10px 12px; font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
.acctpop input:focus { outline: none; border-color: var(--accent); }
.acctpop form button { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 10px; font-weight: 700; }
.acctpop p { margin: 0 0 8px; font-size: 14px; }
.acctpop .muted { color: var(--muted); font-size: 12px; }
.acctpop .err { color: #c0392b; font-size: 12px; margin: 0; min-height: 1em; }
.acctpop .ghost { margin: 4px 4px 0 0; border-radius: 10px; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* ---------- 설문 (한 화면 한 질문) ---------- */
.wiz { max-width: 520px; margin: 0 auto; padding: 4px 0 24px; min-height: min(620px, calc(100vh - 120px)); min-height: min(620px, calc(100dvh - 120px)); display: flex; flex-direction: column; }
.wiz form { display: flex; flex-direction: column; flex: 1; }
.anim-next { animation: slideL .32s cubic-bezier(.2, .8, .2, 1); }
.anim-prev { animation: slideR .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes slideL { from { opacity: 0; transform: translateX(28px); } }
@keyframes slideR { from { opacity: 0; transform: translateX(-28px); } }
.wiz-top { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.wiz-back { width: 38px; height: 38px; border-radius: 12px; border: 0; background: var(--card); box-shadow: var(--shadow); font-size: 24px; line-height: 1; padding-bottom: 3px; flex: none; }
.progress { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .4s cubic-bezier(.2, .8, .2, 1); }
.wiz-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; font-weight: 600; }
.wiz-q { font-size: 26px; line-height: 1.3; margin: 0 0 8px; word-break: keep-all; letter-spacing: -0.03em; }
.wiz-sub { color: var(--muted); margin: 0 0 24px; font-size: 15px; word-break: keep-all; }
.wiz-q + .cal, .wiz-q + .bignum, .wiz-q + .opts { margin-top: 16px; }
.wiz-main { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 8px 0; }
.wiz-main .opt-box { text-align: left; }
.wiz-foot { padding-top: 24px; display: grid; gap: 4px; justify-items: center; }
.primary.big { width: 100%; padding: 17px; font-size: 17px; border-radius: 16px; box-shadow: 0 6px 18px rgba(35, 132, 91, .28); }

.opts { display: grid; gap: 10px; }
.opts.grid { grid-template-columns: 1fr 1fr; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt-box { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); border: 2px solid transparent; cursor: pointer; transition: border-color .15s, background .15s, transform .1s; }
.opt-box:hover { border-color: var(--line); }
.opt-box:active { transform: scale(.985); }
.opt-ico { font-size: 26px; width: 44px; height: 44px; border-radius: 13px; background: var(--bg); display: grid; place-items: center; flex: none; }
.opt-txt { flex: 1; min-width: 0; }
.opt-txt b { display: block; font-size: 16px; }
.opt-txt small { display: block; color: var(--muted); font-size: 13px; margin-top: 1px; }
.opt-mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; transition: all .15s; }
.opt input[type=checkbox] + .opt-box .opt-mark { border-radius: 7px; }
.opt input:checked + .opt-box { border-color: var(--accent); background: var(--accent-soft); }
.opt input:checked + .opt-box .opt-mark { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat; }
.opt input:focus-visible + .opt-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.opts.grid .opt-box { padding: 14px; gap: 10px; }
.opts.grid .opt-ico { width: 38px; height: 38px; font-size: 21px; }
.opts.grid .opt-txt b { font-size: 15px; }

.bignum { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 14px; border: 2px solid transparent; transition: border-color .15s; }
.bignum:focus-within { border-color: var(--accent); }
.bignum label { flex: 1; display: flex; align-items: baseline; justify-content: center; gap: 6px; min-width: 0; }
.bignum input { width: 3ch; max-width: 100%; border: 0; background: none; color: var(--ink); font: inherit; font-size: 48px; font-weight: 800; text-align: center; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; padding: 4px 0; -moz-appearance: textfield; }
.bignum input::-webkit-outer-spin-button, .bignum input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bignum input:focus { outline: none; }
.bignum input::placeholder { color: var(--line); }
.bignum em { font-style: normal; color: var(--muted); font-size: 20px; font-weight: 600; flex: none; }
.stepper { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--bg); font-size: 24px; font-weight: 500; flex: none; transition: background .15s; }
.stepper:hover { background: var(--accent-soft); color: var(--accent); }
.shake { animation: shake .35s; border-color: #d9534f; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.wiz-err { color: #c0392b; font-size: 13px; text-align: center; min-height: 1.3em; margin: 10px 0 0; }
.bigdate input { width: 100%; padding: 18px; font: inherit; font-size: 22px; font-weight: 700; border: 2px solid transparent; border-radius: 20px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.bigdate input:focus { outline: none; border-color: var(--accent); }
.cal { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 16px 14px 14px; width: 100%; max-width: 380px; margin: 0 auto; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head b { font-size: 18px; letter-spacing: -0.02em; }
.cal-head button { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--bg); font-size: 22px; line-height: 1; padding-bottom: 3px; }
.cal-head button:disabled { opacity: .3; cursor: default; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.cal-week span { font-size: 13px; color: var(--muted); padding: 4px 0 8px; font-weight: 600; }
.cal-grid { row-gap: 4px; }
.cal-grid button { aspect-ratio: 1; width: 100%; max-width: 46px; margin: 0 auto; border: 0; background: none; border-radius: 50%; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; position: relative; transition: background .12s; }
.cal-grid button:hover { background: var(--bg); }
.cal .sun { color: #d9534f; } .cal .sat { color: #3b7dd8; }
.cal-grid button.range { background: var(--accent-soft); border-radius: 10px; color: var(--ink); }
.cal-grid button.end { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-grid button.today::after { content: ''; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.cal-grid button.on { background: var(--accent); color: var(--accent-ink); font-weight: 800; border-radius: 50%; box-shadow: 0 4px 12px rgba(35, 132, 91, .35); }
.cal-grid button.on::after { background: var(--accent-ink); }
.cal-sum { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.cal-sum b { color: var(--ink); }
.cal-sum span { margin: 0 4px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.presets button { border: 1px solid var(--line); background: var(--card); padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; }
.presets button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }

.review { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.review button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 14px 18px; }
.review button:last-child { border-bottom: 0; }
.review button:hover { background: var(--bg); }
.review span { flex: 1; color: var(--muted); font-size: 13px; min-width: 0; }
.review b { font-size: 14px; text-align: right; max-width: 55%; }
.review i { font-style: normal; color: var(--muted); font-size: 18px; }

.intro { text-align: center; justify-content: center; padding-top: 12px; }
.intro-art { display: flex; justify-content: center; gap: 10px; margin-bottom: 28px; }
.intro-art span { width: 64px; height: 64px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; font-size: 32px; animation: float 3s ease-in-out infinite; }
.intro-art span:nth-child(2) { animation-delay: .3s; } .intro-art span:nth-child(3) { animation-delay: .6s; } .intro-art span:nth-child(4) { animation-delay: .9s; }
@keyframes float { 50% { transform: translateY(-6px); } }
.intro h2 { font-size: 28px; line-height: 1.3; letter-spacing: -0.03em; margin-bottom: 12px; }
.intro p { color: var(--muted); margin: 0 auto 28px; max-width: 380px; }
.intro-list { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.intro-list li { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 8px; font-size: 12px; color: var(--muted); }
.intro-list b { display: block; font-size: 22px; color: var(--accent); letter-spacing: -0.02em; }
.intro .primary.big { margin-top: 0; }

/* ---------- 분석·플랜·기록 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--bg); border-radius: 14px; padding: 14px 16px; }
.stat span { display: block; font-size: 13px; color: var(--muted); }
.stat strong { display: block; font-size: 23px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat em { font-style: normal; font-size: 12px; color: var(--muted); }

.macrobar { display: flex; height: 32px; border-radius: 10px; overflow: hidden; margin-top: 14px; gap: 2px; }
.seg { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.seg.p { background: var(--p); } .seg.c { background: var(--c); } .seg.f { background: var(--f); }

.alert { border-radius: 12px; padding: 11px 14px; margin: 8px 0; font-size: 14px; }
.alert.warn { background: var(--warn-bg); color: var(--warn-ink); }
.alert.danger { background: var(--danger-bg); color: var(--danger-ink); }
.alert.info { background: var(--info-bg); color: var(--info-ink); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
td { font-variant-numeric: tabular-nums; }
.ci input, .ci select { width: 90px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit; }
.muted-row td { color: var(--muted); }

.weektabs, .daytabs { display: grid; gap: 8px; margin-bottom: 16px; }
.weektabs { grid-template-columns: repeat(4, 1fr); }
.daytabs { grid-template-columns: repeat(7, 1fr); }
.weektabs button, .daytabs button { background: var(--card); border: 2px solid transparent; box-shadow: var(--shadow); border-radius: 14px; padding: 8px 4px; color: var(--ink); font-weight: 700; transition: border-color .15s, background .15s; }
.weektabs small, .daytabs small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.weektabs button.on, .daytabs button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.week-head p { margin: 0 0 8px; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pill { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 4px 11px; font-size: 13px; font-weight: 600; }

.grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.grid2 .card { margin-bottom: 0; }
.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.fastbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; background: var(--bg); border-radius: 10px; padding: 8px 12px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }

.meal { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.meal:last-of-type { border-bottom: 0; }
.meal-time b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.meal-time span { font-size: 12px; color: var(--muted); }
.meal-name { font-weight: 700; }
.meal-name small { color: var(--accent); font-weight: 500; }
.meal ul { list-style: none; padding: 0; margin: 6px 0; }
.meal li { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; padding: 2px 0; }
.meal li em { font-style: normal; color: var(--muted); font-size: 12px; text-align: right; }
.meal-sum { font-size: 13px; color: var(--accent); font-weight: 600; }

.daytotal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 14px; font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.daytotal b { color: var(--ink); font-size: 16px; font-variant-numeric: tabular-nums; }
.daytotal .over b { color: var(--f); }

.ex-title { font-weight: 700; font-size: 16px; }
.ex ol { padding-left: 20px; margin: 12px 0; }
.ex li { padding: 3px 0; }
.ex li em { font-style: normal; color: var(--muted); font-size: 12px; margin-left: 4px; }
.habits, .rules { padding-left: 20px; margin: 0; font-size: 14px; }
.habits li, .rules li { padding: 2px 0; }

.shop { list-style: none; padding: 0; margin: 0; }
.shop li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); gap: 8px; }
.shop label { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.shop input { width: 20px; height: 20px; accent-color: var(--accent); }
.shop input:checked + span { text-decoration: line-through; color: var(--muted); }
.shop em { font-style: normal; color: var(--muted); font-size: 13px; white-space: nowrap; }

.chart { margin: 16px 0 0; max-width: 680px; }
.chart svg { width: 100%; height: auto; }
.chart .grid { stroke: var(--line); }
.chart .tick { fill: var(--muted); font-size: 11px; }
.chart .band { fill: var(--accent-soft); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.chart .dot { fill: var(--card); stroke: var(--accent); stroke-width: 2.5; }
.chart figcaption { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lg { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.band-lg { background: var(--accent-soft); }
.line-lg { background: var(--accent); height: 3px; margin-left: 10px; }

.foot { color: var(--muted); font-size: 15px; line-height: 1.6; padding-top: 8px; padding-bottom: 32px; text-align: center; word-break: keep-all; }

.side { display: grid; gap: 16px; }
.ex-big { font-size: 24px; font-weight: 800; padding: 20px; border-radius: 16px; background: linear-gradient(135deg, var(--accent-soft), var(--bg)); color: var(--accent); text-align: center; letter-spacing: -0.02em; }
.ex-big.rest { background: var(--bg); color: var(--muted); }
.loggrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; padding-top: 22px; }
.check input, .logtable input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.logtable input[type=number] { width: 76px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit; }
.today-row td { background: var(--accent-soft); }
.daytabs button span { font-weight: 400; font-size: 12px; }
.daytabs button.today:not(.on) { border-color: var(--accent); }
.bar { height: 6px; border-radius: 3px; background: var(--line); width: 90px; margin-bottom: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.rules.big li { padding: 4px 0; font-size: 15px; }
.filebtn { display: inline-flex; align-items: center; cursor: pointer; }

/* 예전 설문 입력 칸 (기록 화면 등에서 사용) */
.nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 8px; }
.num span { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.num div { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 0 12px; }
.num input { border: 0; background: none; color: var(--ink); font: inherit; font-size: 17px; padding: 10px 0; width: 100%; min-width: 0; }
.num input:focus { outline: none; }
.num div:focus-within { border-color: var(--accent); }
.num em { font-style: normal; color: var(--muted); }

/* ---------- 분석 로딩 ---------- */
.loading-view { max-width: 480px; margin: 0 auto; min-height: min(640px, calc(100dvh - 100px)); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12px 0 32px; }
.ring { position: relative; width: 132px; height: 132px; margin-bottom: 22px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring-bg { stroke: var(--line); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.loading-view h2 { font-size: 24px; margin: 0 0 6px; }
.load-sub { color: var(--muted); margin: 0 0 22px; font-size: 16px; }
.load-msg { background: var(--card); box-shadow: var(--shadow); border-radius: 20px; padding: 20px; width: 100%; min-height: 150px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.load-msg.in { animation: msgIn .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes msgIn { from { opacity: 0; transform: translateY(12px); } }
.load-ico { font-size: 38px; line-height: 1; }
.load-msg p { margin: 0; font-size: 17px; line-height: 1.6; word-break: keep-all; }
.load-steps { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 8px; width: 100%; text-align: left; }
.load-steps li { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--muted); }
.load-steps i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; transition: all .2s; }
.load-steps li.now { color: var(--ink); font-weight: 700; }
.load-steps li.now i { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.load-steps li.done { color: var(--ink); }
.load-steps li.done i { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 결과 ---------- */
.result-hero { text-align: center; padding: 18px 8px 22px; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 15px; margin: 0 0 8px; }
.result-hero h2 { font-size: 28px; line-height: 1.35; margin: 0 0 10px; word-break: keep-all; }
.result-hero h2 em { font-style: normal; color: var(--accent); }
.result-hero p { color: var(--muted); margin: 0; font-size: 16px; }
.tiles3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.tile { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 16px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.tile span { font-size: 26px; }
.tile small { font-size: 14px; color: var(--muted); }
.tile b { font-size: 26px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tile b i { font-style: normal; font-size: 15px; margin-left: 1px; color: var(--muted); }
.tile em { font-style: normal; font-size: 14px; font-weight: 600; color: var(--muted); word-break: keep-all; }
.tile.bad em { color: var(--f); } .tile.mid em { color: var(--c); } .tile.good em { color: var(--accent); }
.rules3, .roadmap { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.rules3 li, .roadmap li { display: flex; gap: 14px; align-items: center; }
.rules3 li > span, .roadmap li > span { width: 50px; height: 50px; border-radius: 15px; background: var(--bg); display: grid; place-items: center; font-size: 26px; flex: none; }
.rules3 b, .roadmap b { display: block; font-size: 17px; word-break: keep-all; }
.rules3 small, .roadmap small { display: block; font-size: 15px; color: var(--muted); }
details.card > summary { cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; display: flex; align-items: center; gap: 8px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: '⌄'; margin-left: auto; color: var(--muted); font-size: 20px; transition: transform .2s; }
details.card[open] > summary::after { transform: rotate(180deg); }
details.card[open] > summary { margin-bottom: 14px; }
.warnbox { background: var(--warn-bg); color: var(--warn-ink); box-shadow: none; }
.warnbox summary b { background: var(--warn-ink); color: var(--warn-bg); border-radius: 999px; padding: 0 9px; font-size: 14px; }
.warnbox ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 16px; }
.cta { margin: 8px 0 16px; }
/* 식단 분석 로딩 */
.meal-load { max-width: 560px; }
.plate { position: relative; width: 210px; height: 210px; margin: 0 auto 18px; }
.plate-in { position: absolute; inset: 30px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #fff 0 55%, #eef5f0 56% 100%); box-shadow: var(--shadow-lg), inset 0 0 0 10px #f5faf7; animation: plateSpin 6s linear; }
@keyframes plateSpin { from { transform: rotate(-30deg) scale(.9); opacity: .4; } 15% { opacity: 1; transform: rotate(-10deg) scale(1); } to { transform: rotate(0); } }
.plate > span { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; font-size: 30px; opacity: 0; transform: translate(0, 0) scale(.3); animation: foodIn .7s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes foodIn { to { opacity: 1; transform: translate(var(--x), var(--y)) scale(1); } }
.plate-kcal { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 88px; font-size: 26px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.plate-kcal i { font-style: normal; font-size: 13px; margin-left: 2px; }
.ml-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 4px; }
.ml-card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 14px; text-align: left; animation: msgIn .6s cubic-bezier(.2, .8, .2, 1) both; }
.ml-card + .ml-card { animation-delay: .25s; }
.ml-title { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--muted); }
.donut { position: relative; width: 120px; height: 120px; margin: 0 auto 8px; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 16; }
.dbg { stroke: var(--bg); }
.dseg { stroke-dasharray: 0 999; stroke-dashoffset: var(--off); animation: dfill .9s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes dfill { to { stroke-dasharray: var(--len) var(--gap); } }
.dseg.c, .dlegend i.c { stroke: #e0a93b; background: #e0a93b; }
.dseg.p, .dlegend i.p { stroke: #23845b; background: #23845b; }
.dseg.f, .dlegend i.f { stroke: #d4704f; background: #d4704f; }
.donut > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut b { font-size: 22px; letter-spacing: -0.02em; }
.donut small { font-size: 13px; color: var(--muted); }
.dlegend { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; font-size: 14px; }
.dlegend li { display: flex; align-items: center; gap: 6px; }
.dlegend i { width: 10px; height: 10px; border-radius: 3px; }
.dlegend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.mlbars { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.mlbars li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 14px; }
.mlbars li > div { grid-column: 1 / -1; height: 10px; border-radius: 5px; background: var(--bg); overflow: hidden; order: 3; }
.mlbars i { display: block; height: 100%; width: 0; border-radius: 5px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); animation: barw .9s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes barw { to { width: var(--w); } }
.mlbars b { font-variant-numeric: tabular-nums; color: var(--accent); }
.ml-ok { margin: 0; font-size: 14px; font-weight: 700; color: var(--accent); }
.ml-ok.warn { color: var(--f); }
.ml-ok small { font-weight: 500; color: var(--muted); }
.ml-progress { width: 100%; height: 6px; border-radius: 3px; background: var(--line); margin-top: 18px; overflow: hidden; }
.ml-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 3px; }
.reveal-plan > * { opacity: 0; animation: rise .8s cubic-bezier(.16, 1, .3, 1) forwards; }
.reveal-plan > :nth-child(1) { animation-delay: .05s; } .reveal-plan > :nth-child(2) { animation-delay: .2s; } .reveal-plan > :nth-child(3) { animation-delay: .35s; }
.reveal-plan > :nth-child(4) { animation-delay: .5s; } .reveal-plan > :nth-child(5) { animation-delay: .65s; } .reveal-plan > :nth-child(6) { animation-delay: .8s; }
.reveal-plan .food { opacity: 0; animation: rise .7s cubic-bezier(.16, 1, .3, 1) forwards; }
.reveal-plan .foods li:nth-child(1) .food { animation-delay: .7s; } .reveal-plan .foods li:nth-child(2) .food { animation-delay: .82s; }
.reveal-plan .foods li:nth-child(3) .food { animation-delay: .94s; } .reveal-plan .foods li:nth-child(4) .food { animation-delay: 1.06s; }
@media (prefers-reduced-motion: reduce) { .reveal-plan > *, .reveal-plan .food, .plate > span { opacity: 1 !important; } .plate > span { transform: translate(var(--x), var(--y)); } }
@media (max-width: 760px) { .ml-grid { grid-template-columns: 1fr 1fr; gap: 8px; } .ml-card { padding: 12px 10px; } .donut { width: 104px; height: 104px; } }
/* 결과 화면 등장: 위에서부터 한 칸씩, 살짝 떠오르며 선명해지게 */
.reveal > *, .reveal .tile { opacity: 0; animation: rise .9s cubic-bezier(.16, 1, .3, 1) forwards; }
.reveal > :nth-child(1) { animation-delay: .1s; }
.reveal > :nth-child(2) { animation: none; opacity: 1; }
.reveal .tile:nth-child(1) { animation-delay: .45s; }
.reveal .tile:nth-child(2) { animation-delay: .6s; }
.reveal .tile:nth-child(3) { animation-delay: .75s; }
.reveal > :nth-child(3) { animation-delay: 1s; }
.reveal > :nth-child(4) { animation-delay: 1.25s; }
.reveal > :nth-child(5) { animation-delay: 1.5s; }
.reveal > :nth-child(6) { animation-delay: 1.75s; }
.reveal > :nth-child(7) { animation-delay: 2s; }
.reveal > :nth-child(8) { animation-delay: 2.25s; }
.reveal .result-hero h2 em { background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 2.4s ease-out .3s 1 both; }
@keyframes rise { from { opacity: 0; transform: translateY(22px) scale(.985); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .reveal > *, .reveal .tile { opacity: 1 !important; } }

/* ---------- 식단: 한 끼씩 ---------- */
.dayview { max-width: 560px; margin: 0 auto; }
.daynav { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.daynav > div { flex: 1; text-align: center; }
.daynav b { display: block; font-size: 20px; letter-spacing: -0.02em; }
.daynav small { color: var(--muted); font-size: 15px; }
.daynav button { width: 46px; height: 46px; border-radius: 14px; border: 0; background: var(--card); box-shadow: var(--shadow); font-size: 24px; padding-bottom: 3px; flex: none; }
.daynav button:disabled { opacity: .3; }
.today-btn { display: block; margin: 0 auto 10px; border: 1px solid var(--accent); color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 6px 16px; font-size: 15px; font-weight: 600; }
.mealsteps { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; padding: 8px 2px 2px; }
.mealsteps button { flex: 1 0 auto; min-width: 60px; border: 2px solid transparent; background: var(--card); box-shadow: var(--shadow); border-radius: 14px; padding: 8px 6px; font-size: 14px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; }
.mealsteps button span { font-size: 22px; }
.mealsteps button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.mealsteps button.done::after { content: '✓'; position: absolute; top: -7px; right: -3px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; display: grid; place-items: center; font-weight: 800; }
.mealcard { background: var(--card); border-radius: 24px; box-shadow: var(--shadow); padding: 22px 18px; touch-action: pan-y; }
.meal-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.meal-emoji { font-size: 44px; width: 70px; height: 70px; border-radius: 22px; background: var(--bg); display: grid; place-items: center; flex: none; }
.meal-hero small { color: var(--muted); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.meal-hero h2 { margin: 0; font-size: 26px; word-break: keep-all; }
.meal-kcal { margin-left: auto; font-size: 24px; font-weight: 800; color: var(--accent); white-space: nowrap; }
.meal-kcal i { font-style: normal; font-size: 14px; margin-left: 2px; }
.fast-note { background: var(--info-bg); color: var(--info-ink); border-radius: 14px; padding: 12px 14px; margin: 0 0 14px; font-size: 16px; font-weight: 600; }
.foods { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.food { background: var(--bg); border-radius: 18px; padding: 16px 10px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.food-emoji { font-size: 46px; line-height: 1.1; margin-bottom: 4px; }
.food b { font-size: 17px; word-break: keep-all; }
.food small { font-size: 16px; color: var(--accent); font-weight: 700; }
.food em { font-style: normal; font-size: 13px; color: var(--muted); }
.foods li { display: flex; }
.food { width: 100%; border: 2px solid transparent; font: inherit; color: inherit; cursor: pointer; position: relative; transition: background .2s, border-color .2s, transform .12s; }
.food:hover { border-color: var(--line); }
.food:active { transform: scale(.96); }
.food-check { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); color: transparent; font-size: 14px; font-weight: 900; display: grid; place-items: center; transition: all .2s; }
.food.got { background: var(--accent-soft); border-color: var(--accent); }
.food.got .food-check { background: var(--accent); border-color: var(--accent); color: #fff; animation: pop2 .35s cubic-bezier(.2, 1.6, .4, 1); }
.food.got .food-emoji { animation: pop2 .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop2 { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.food-hint { text-align: center; color: var(--muted); font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.eat-btn { width: 100%; border: 2px dashed var(--accent); background: none; color: var(--accent); border-radius: 18px; padding: 16px; font-size: 18px; font-weight: 800; transition: all .15s; }
.eat-btn.done { border-style: solid; background: var(--accent); color: var(--accent-ink); }
.eat-btn.small-eat { margin-top: 10px; padding: 12px; font-size: 16px; border-width: 1px; border-style: solid; border-color: var(--line); color: var(--muted); font-weight: 600; }
.eat-btn.small-eat.done { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.fast-btn, .wo-btn { width: 100%; margin-top: 12px; border: 0; border-radius: 18px; padding: 16px; font-size: 18px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #3a4a8c, #6b5bd6); box-shadow: 0 8px 20px rgba(80, 70, 180, .3); }
.wo-btn { background: linear-gradient(135deg, var(--accent-2), var(--accent)); box-shadow: 0 8px 20px rgba(35, 132, 91, .3); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px; }
.wo-btn span { font-size: 30px; line-height: 1; }
.wo-btn b { font-size: 21px; }
.wo-btn small { font-size: 15px; font-weight: 500; opacity: .9; }
.swap { display: block; margin: 10px auto 0; font-size: 15px; }
.ex-tip { font-size: 17px; color: var(--muted); margin: 0 0 16px; word-break: keep-all; }
.all-done { text-align: center; font-weight: 800; font-size: 18px; color: var(--accent); margin: 14px 0 0; }
.mealnav { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin: 16px 0 8px; }
.mealnav button:disabled { opacity: .35; }

/* ---------- 단식·운동 공통 ---------- */
.fastview, .woview { max-width: 560px; margin: 0 auto; }
.fbanner { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; margin: 0 auto 14px; border: 0; border-radius: 16px; padding: 12px 16px; background: linear-gradient(135deg, #3a4a8c, #6b5bd6); color: #fff; text-align: left; font-size: 16px; }
.fbanner b { font-variant-numeric: tabular-nums; font-size: 18px; }
.fbanner em { font-style: normal; opacity: .9; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fbanner i { font-style: normal; font-size: 20px; }
.fintro, .fdone { text-align: center; padding: 12px 4px 20px; }
.fintro > span, .fdone > span { font-size: 56px; display: block; margin-bottom: 8px; }
.fintro h2, .fdone h2 { font-size: 26px; margin: 0 0 8px; }
.fintro p, .fdone p { color: var(--muted); font-size: 17px; margin: 0 auto; max-width: 420px; word-break: keep-all; }
.logged { color: var(--accent) !important; font-weight: 700; margin-top: 10px !important; }
.ftargets { display: flex; gap: 8px; justify-content: center; margin: 16px 0; }
.ftargets button { border: 2px solid var(--line); background: var(--card); border-radius: 14px; padding: 10px 18px; font-size: 17px; font-weight: 700; }
.ftargets button.on { border-color: #6b5bd6; color: #5848c8; background: #efedff; }
.fpick-bg { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(20, 20, 40, .5); animation: rise .2s ease both; }
.fpick { width: 100%; max-width: 400px; background: var(--card); border-radius: 22px; padding: 22px 18px 12px; text-align: center; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.fpick h2 { font-size: 22px; margin: 0 0 4px; }
.fpick-sub { color: var(--muted); font-size: 15px; margin: 0; }
.fpick .ftargets { margin: 16px 0 12px; }
.fp-custom { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; font-weight: 700; }
.fp-custom input { width: 90px; font: inherit; font-size: 18px; text-align: center; padding: 8px; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); color: inherit; }
.fp-custom input:focus { outline: none; border-color: #6b5bd6; }
.fp-end { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 16px 0; padding: 12px; border-radius: 14px; background: #efedff; color: #3a3280; }
.fp-end b { font-size: 22px; font-variant-numeric: tabular-nums; }
.fp-end small { font-size: 14px; }
.fpick .primary.big { width: 100%; }
.fpick .primary.big:disabled { opacity: .4; }
.fwarn { background: var(--danger-bg); color: var(--danger-ink); border-radius: 14px; padding: 14px; font-size: 16px; }
.fsafe { background: var(--danger-bg); color: var(--danger-ink); border-radius: 14px; padding: 12px 14px; font-size: 15px; margin: 14px 0; line-height: 1.6; }
.fring { position: relative; width: 230px; height: 230px; margin: 4px auto 6px; }
.fring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.fring circle { fill: none; stroke-width: 12; }
.fr-bg { stroke: var(--line); }
.fr-fg { stroke: #6b5bd6; stroke-linecap: round; stroke-dasharray: 553; transition: stroke-dashoffset 1s linear; }
.fring.wo .fr-fg { stroke: var(--accent); }
.fring > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 30px; }
.fring small { font-size: 15px; color: var(--muted); font-weight: 600; }
.fring b { font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; line-height: 1.2; }
.fring em { font-style: normal; font-size: 14px; color: var(--muted); word-break: keep-all; }
.fend { text-align: center; color: var(--muted); font-size: 15px; margin: 0 0 10px; }
.fadj { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-width: 420px; margin: 0 auto 18px; }
.fadj button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 9px 4px; font-weight: 700; font-size: 14px; min-height: 42px; }
.fadj button:hover { border-color: var(--accent); color: var(--accent); }
.fadj button:disabled { opacity: .35; cursor: default; }
.fnow h2, .wo-content h2, .wo-move h2 { display: flex; align-items: center; gap: 10px; font-size: 22px; word-break: keep-all; }
.fnow h2 span, .wo-content h2 span, .wo-move h2 span { font-size: 32px; }
.fnow > p, .wo-content > p, .wo-move > p { font-size: 17px; line-height: 1.65; margin: 0 0 12px; word-break: keep-all; }
.fnow .eyebrow { color: #5848c8; }
.fref { display: inline-block; font-size: 14px; color: var(--muted); text-decoration: none; background: var(--bg); border-radius: 10px; padding: 6px 10px; margin-top: 4px; }
.fref:hover { color: var(--ink); }
.fnext { font-size: 15px; color: var(--muted); margin: 12px 0 0 !important; padding-top: 12px; border-top: 1px solid var(--line); }
.hungry { width: 100%; border: 2px solid #f0c27a; background: var(--warn-bg); color: var(--warn-ink); border-radius: 16px; padding: 14px; font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.hungry-tips { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 16px; }
.hungry-tips[hidden] { display: none; }
.hungry-tips p { margin: 0 0 10px; font-size: 16px; line-height: 1.6; }
.hungry-tips p:last-child { margin: 0; }
.hungry-tips a { color: var(--muted); font-size: 14px; }
.fchart { margin: 0; }
.fchart svg { width: 100%; height: auto; display: block; }
.fchart .grid { stroke: var(--line); }
.fchart .tick { fill: var(--muted); font-size: 12px; }
.fchart .zone { fill: #efedff; }
.fchart .zone-t { fill: #5848c8; font-size: 12px; font-weight: 700; }
.fchart .cv { fill: none; stroke-width: 3; stroke-linecap: round; }
.cv.glu { stroke: #e0a93b; } i.glu { background: #e0a93b; }
.cv.ins { stroke: #d4704f; } i.ins { background: #d4704f; }
.cv.fat { stroke: #23845b; } i.fat { background: #23845b; }
.cv.ket { stroke: #6b5bd6; } i.ket { background: #6b5bd6; }
.fchart .now { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 4 3; }
.fchart .now-dot { fill: var(--ink); }
.fchart figcaption { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 14px; margin-top: 6px; }
.fchart figcaption i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.fnote { font-size: 13px !important; color: var(--muted); text-align: center; margin: 6px 0 0 !important; }
.ftimeline { list-style: none; padding: 0; margin: 0; }
.ftimeline li { display: grid; grid-template-columns: 80px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ftimeline li:last-child { border-bottom: 0; }
.ftimeline time { font-size: 14px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 2px; }
.ftimeline b { font-size: 16px; }
.ftimeline p { margin: 4px 0 0; font-size: 15px; color: var(--muted); line-height: 1.55; }
.ftimeline li.now { background: #efedff; border-radius: 12px; padding: 10px; margin: 2px -10px; border-bottom: 0; }
.ftimeline li.now time { color: #5848c8; }
.ftimeline li.next { opacity: .5; }
.big-ghost { width: 100%; padding: 15px; font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.frefs ol { padding-left: 20px; margin: 0; display: grid; gap: 8px; }
.frefs a { color: var(--muted); font-size: 14px; word-break: break-word; }
.wo-kind { text-align: center; font-size: 18px; font-weight: 700; margin: 4px 0 0; }
.wo-ctrl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 14px; }
.wo-blocks { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; }
.wo-blocks i { flex: 1; max-width: 52px; height: 8px; border-radius: 4px; background: var(--line); }
.wo-blocks i.done { background: var(--accent); }
.wo-blocks i.now { background: var(--accent); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.wo-content { animation: msgIn .45s cubic-bezier(.2, .8, .2, 1); }
.wbars { display: grid; gap: 10px; margin: 6px 0 12px; }
.wbar span { display: block; font-size: 15px; margin-bottom: 4px; }
.wbar div { height: 14px; border-radius: 7px; background: var(--bg); overflow: hidden; }
.wbar i { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); animation: grow 1s cubic-bezier(.2, .8, .2, 1); }
@keyframes grow { from { width: 0; } }
.wbar b { display: block; font-size: 14px; color: var(--accent); margin-top: 2px; }
.wtable { width: 100%; margin: 6px 0 12px; border-radius: 14px; overflow: hidden; background: var(--bg); }
.wtable th, .wtable td { white-space: normal; padding: 10px 12px; font-size: 15px; border-bottom: 1px solid var(--line); }
.wtable th { background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; }
.wtable tr:last-child td { border-bottom: 0; }
.wline { width: 100%; height: auto; margin: 6px 0 12px; }
.wline .base { stroke: var(--line); stroke-dasharray: 4 3; }
.wline .ln { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.wline .pt { fill: var(--card); stroke: var(--accent); stroke-width: 3; }
.wline .val { fill: var(--accent); font-size: 13px; font-weight: 800; }
.wline .lab { fill: var(--muted); font-size: 12px; }
.wo-past ol { padding-left: 20px; margin: 0; display: grid; gap: 10px; }
.wo-past b { font-size: 16px; }
.wo-past p { margin: 2px 0 0; font-size: 15px; color: var(--muted); }

/* ---------- 모바일 ---------- */
@media (max-width: 760px) {
  /* 글자: 본문 16px, 보조 글자도 14px 아래로 내리지 않음 */
  body { font-size: 16px; }
  h1 { font-size: 18px; }
  h2 { font-size: 20px; }
  h3 { font-size: 17px; }
  h2 small, h3 small { font-size: 14px; }
  .muted, .hint, .stat span, .stat em, .meal-time span, .meal li em, .meal-sum, .ex li em, .shop em,
  .fastbar, .chart figcaption, .pill, .alert, .daytotal, th, .week-head p, .foot, .acctpop .muted, .acctpop .err { font-size: 15px; }
  td, .meal li, .habits, .rules, .shop li, table { font-size: 15px; }
  .chart .tick { font-size: 13px; }
  .stat strong { font-size: 24px; }
  .meal-name { font-size: 17px; }
  .meal-time b { font-size: 17px; }
  .daytotal b { font-size: 18px; }

  /* 상단: blur가 있으면 하단 탭바(fixed)가 헤더 기준으로 붙으므로 모바일에서는 끔 */
  .top { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; padding-top: env(safe-area-inset-top); }
  .top > .wrap:first-child { padding-top: 10px; padding-bottom: 10px; }
  .top p { display: none; }
  .topright .small { font-size: 14px; padding: 8px 14px; min-height: 38px; }
  .onboarding #printBtn, #printBtn { display: none; }
  .acctpop { width: min(280px, calc(100vw - 32px)); }
  .acctpop p { font-size: 15px; }
  .acctpop input, .acctpop form button { font-size: 16px; padding: 12px; }

  /* 하단 탭바 */
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 10; box-shadow: 0 -4px 20px rgba(20, 32, 25, .06); }
  .tabs-in { padding: 0 4px; gap: 0; }
  .tabs button { flex: 1; flex-direction: column; gap: 3px; padding: 9px 2px 8px; font-size: 13px; border-bottom: 0; min-height: 62px; justify-content: center; }
  .tabs svg { width: 24px; height: 24px; }
  body:not(.onboarding) main { padding-bottom: 8px; }
  /* 하단 탭바가 늘 있으므로 바닥글이 없는 화면(설문·먹은 것 기록)도 탭바만큼 띄움 */
  .onboarding main, .diary-mode main { padding-bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
  body:not(.onboarding) .foot { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }

  /* 카드·레이아웃 */
  main { padding-top: 12px; }
  .card { padding: 20px 18px; border-radius: 20px; margin-bottom: 12px; }
  .grid2 { grid-template-columns: 1fr; gap: 12px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .weektabs { gap: 6px; }
  .weektabs button { padding: 10px 4px; font-size: 16px; }
  .weektabs small { font-size: 13px; }
  .daytabs { position: relative; display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; margin: 0 -16px 16px; padding: 2px 16px 4px; scroll-snap-type: x proximity; }
  .daytabs button { flex: 0 0 64px; border-radius: 14px; padding: 10px 4px; font-size: 16px; scroll-snap-align: start; }
  .daytabs button span { display: block; font-size: 14px; }
  .daytabs small { font-size: 13px; }
  .ex-big { font-size: 22px; }
  .meal { grid-template-columns: 60px 1fr; }
  .primary, .ghost { min-height: 48px; font-size: 16px; }
  .small { min-height: 40px; font-size: 14px; }
  .loggrid { grid-template-columns: 1fr; }
  [data-reroll] { white-space: nowrap; flex: none; }
  .logtable input[type=number], .ci input, .ci select, .num input { font-size: 16px; }
  .logtable input[type=number] { width: 84px; padding: 9px 10px; }
  .check { font-size: 16px; padding-top: 8px; }
  .shop li { padding: 13px 0; }
  .shop input, .check input, .logtable input[type=checkbox] { width: 24px; height: 24px; }

  /* 설문 */
  .wiz { min-height: calc(100vh - 170px); min-height: calc(100dvh - 170px); padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  body:not(.onboarding) .wiz { min-height: calc(100vh - 170px); min-height: calc(100dvh - 170px); }
  .wiz-top { margin-bottom: 24px; }
  .wiz-back { width: 44px; height: 44px; }
  .wiz-count { font-size: 15px; }
  .wiz-q { font-size: 25px; }
  .wiz-sub { font-size: 16px; margin-bottom: 24px; }
  .opt-box { padding: 16px; min-height: 76px; }
  .opt-txt b { font-size: 17px; }
  .opt-txt small { font-size: 14px; }
  .opts.grid { grid-template-columns: 1fr; }
  .tiles3 { gap: 8px; }
  .tile b { font-size: 22px; }
  .result-hero h2 { font-size: 26px; }
  .foods { grid-template-columns: 1fr 1fr; }
  .meal-hero h2 { font-size: 24px; }
  .fring { width: 210px; height: 210px; }
  .fring b { font-size: 36px; }
  .opts.grid .opt-txt b { font-size: 17px; }
  .bignum { padding: 12px; }
  .bignum input { font-size: 44px; }
  .bignum em { font-size: 20px; }
  .stepper { width: 52px; height: 52px; }
  .wiz-err { font-size: 15px; }
  .presets button { font-size: 15px; padding: 10px 18px; }
  .cal { padding: 14px 10px 12px; }
  .cal-grid button { font-size: 17px; }
  .cal-week span { font-size: 14px; }
  .cal-sum { font-size: 15px; }
  .review button { padding: 16px; min-height: 56px; }
  .review span { font-size: 15px; }
  .review b { font-size: 16px; }
  .link { font-size: 15px; }
  .intro h2 { font-size: 27px; }
  .intro p { font-size: 16px; }
  .intro-list li { font-size: 14px; }
  .intro-list b { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .tabs, .topright, .roundtabs, .rdots, .restart, .roundend, [data-reroll], .actions { display: none !important; }
  .top { position: static; background: #fff; }
  body { background: #fff; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
}
.num-hint { text-align: center; margin-top: 12px; font-size: 16px; font-weight: 700; color: var(--accent); }
.foods li { flex-direction: column; gap: 6px; }
.food-edit { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.food-edit.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.food.swapped { border-style: dashed; border-color: var(--accent); }
.food .swap-tag { color: var(--accent); font-weight: 700; font-size: 12px; }
.swap-pick { background: var(--bg); border-radius: 18px; padding: 14px; margin: -6px 0 18px; animation: rise .3s ease both; }
.swap-pick > p { margin: 0 0 10px; text-align: center; font-size: 15px; }
.swap-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.swap-opts button { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 2px solid transparent; background: var(--card); border-radius: 14px; padding: 10px 6px; font: inherit; color: inherit; cursor: pointer; }
.swap-opts button:hover { border-color: var(--accent); }
.swap-opts span { font-size: 30px; line-height: 1.1; }
.swap-opts b { font-size: 15px; word-break: keep-all; }
.swap-opts small { font-size: 13px; color: var(--muted); }
.swap-foot { display: flex; justify-content: center; gap: 16px; margin-top: 10px; }
@media (max-width: 420px) { .swap-opts { grid-template-columns: 1fr 1fr; } }

/* ---------- 작심삼일: 3일 도전 ---------- */
.roundhead { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; margin-bottom: 12px; }
.rh-title { flex: 1; min-width: 0; }
.rh-title b { display: block; font-size: 17px; }
.rh-title small { color: var(--muted); font-size: 13px; }
.rdots { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.rdots button { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg); color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.rdots button.ok { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rdots button.on { border-color: var(--accent); color: var(--accent); }
.rdots button.ok.on { color: var(--accent-ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.fire { font-weight: 800; color: #e0632b; white-space: nowrap; }
.day-tip { text-align: center; color: var(--muted); font-size: 14px; margin: -4px 0 10px; }
.roundtabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; padding: 2px; }
.roundtabs button { flex: none; min-width: 88px; background: var(--card); border: 2px solid transparent; box-shadow: var(--shadow); border-radius: 14px; padding: 8px 10px; color: var(--ink); font-weight: 700; }
.roundtabs small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.roundtabs button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.roundend { margin-top: 16px; text-align: center; }
.roundend h2 { margin: 4px 0 12px; }
.roundend .stats { text-align: left; }
.roundend .actions { justify-content: center; }
.roundend .rinv { margin-top: 14px; }
.modepick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 14px; }
.modepick button { border: 2px solid var(--line); background: var(--card); border-radius: 14px; padding: 12px 8px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.modepick button small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px; }
.modepick button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.restart { text-align: center; margin: 14px 0 0; }
.restart .link { font-size: 14px; color: var(--muted); }
.next-goal { background: var(--accent-soft); color: var(--accent); border-radius: 14px; padding: 10px 14px; margin: 12px 0 4px; font-weight: 600; }
.next-goal small { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }

/* 음식 칸: 모두 같은 크기 (줄 구성 고정 + 행 높이 통일) */
.foods { grid-auto-rows: 1fr; }
.foods li { min-width: 0; }
.food { flex: 1; min-height: 172px; justify-content: center; min-width: 0; }
.food b, .food small, .food em { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.food em { min-height: 1.4em; }
.food .swap-tag { position: absolute; top: 8px; left: 8px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 7px; }
.swap-opts { grid-auto-rows: 1fr; }
.swap-opts button { justify-content: center; min-width: 0; }
.swap-opts b, .swap-opts small { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 즐겨찾기 메뉴 */
.fav-btn { flex: none; width: 40px; height: 40px; margin-left: 8px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.fav-btn.on { color: #f2b01e; border-color: #f2b01e; background: #fff7e0; }
.fav-note { text-align: center; font-size: 14px; color: var(--accent); margin: -4px 0 10px; }
.fav-note .link { font-size: 13px; margin-left: 6px; }
.meal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-top: 10px; }
.meal-links .swap { margin: 0; }
.fav-pick { background: var(--bg); border-radius: 18px; padding: 14px; margin: 12px 0 0; animation: rise .3s ease both; }
.fav-pick > p { margin: 0 0 10px; text-align: center; font-size: 15px; font-weight: 700; }
.fav-pick > p small { font-weight: 400; color: var(--muted); margin-left: 4px; }
.fav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fav-list li { display: flex; align-items: stretch; gap: 6px; }
.fav-use { flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; border: 2px solid transparent; background: var(--card); border-radius: 14px; padding: 10px 12px; font: inherit; color: inherit; cursor: pointer; }
.fav-use:hover:not(:disabled) { border-color: var(--accent); }
.fav-use:disabled { opacity: .6; cursor: default; }
.fav-emo { grid-row: span 2; font-size: 20px; letter-spacing: -2px; max-width: 96px; overflow: hidden; white-space: nowrap; }
.fav-use b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-use small { font-size: 13px; color: var(--muted); }
.fav-del { flex: none; width: 40px; border: 1px solid var(--line); background: var(--card); border-radius: 14px; color: var(--muted); font-size: 20px; cursor: pointer; }
@media print { .fav-btn, .meal-links, .fav-pick, .fav-note .link { display: none !important; } }
/* 즐겨찾기 별은 끼니 머리 오른쪽 위 모서리에 (제목 줄바꿈 방지) */
.meal-hero { position: relative; }
.meal-hero h2 { white-space: nowrap; }
.meal-hero .fav-btn { position: absolute; top: -10px; right: -10px; width: 36px; height: 36px; margin: 0; font-size: 19px; }
.meal-hero .meal-kcal { margin-right: 26px; }
/* 즐겨찾기 목록: 이모지 줄 → 이름 → 끼니·칼로리 */
.fav-use { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.fav-emo { font-size: 18px; letter-spacing: 0; max-width: 100%; }
.fav-use b { max-width: 100%; }
.fav-list { grid-template-columns: minmax(0, 1fr); }
.fav-list li { min-width: 0; }
.fav-use b { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.35; }

/* ---------- 응원 ---------- */
.tabs button { position: relative; }
.nav-badge { position: absolute; top: 4px; right: 50%; transform: translateX(18px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ff5a7a; color: #fff; font-size: 11px; font-weight: 800; font-style: normal; line-height: 18px; text-align: center; animation: pop2 .4s cubic-bezier(.2, 1.6, .4, 1); }
.cheer-hero { text-align: center; padding: 8px 4px 14px; }
.cheer-hero h2 { margin: 4px 0 6px; font-size: 22px; }
.cheer-hero p { margin: 0; color: var(--muted); }
.cheer-empty { text-align: center; padding: 28px 18px; }
.cheer-empty .big { font-size: 52px; display: block; }
.bounce { animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-6deg); } }
.inbox h2 small { color: var(--muted); font-weight: 400; font-size: 13px; }
.inbox ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.inbox li { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 16px; padding: 10px 12px; }
.inbox li.new { background: #fff0f4; box-shadow: 0 0 0 2px #ffb3c4 inset; animation: pop2 .5s cubic-bezier(.2, 1.6, .4, 1); }
.inbox .ib-st { font-size: 30px; line-height: 1; }
.inbox li div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.inbox li b { font-size: 14px; }
.inbox li span { font-size: 15px; word-break: keep-all; }
.inbox li em { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; }
.fcards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.fcard { position: relative; background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 16px; overflow: hidden; }
.fc-head { display: flex; align-items: center; gap: 12px; }
.fc-ava { position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #ffd6e0, #d9f2e6); display: grid; place-items: center; font-size: 22px; font-weight: 800; color: #5b4a52; }
.fc-ava i { position: absolute; right: -6px; bottom: -4px; font-style: normal; font-size: 22px; animation: bob 2.4s ease-in-out infinite; }
.fc-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fc-who b { font-size: 18px; }
.fc-who small { color: var(--muted); font-size: 13px; }
.fc-time { font-style: normal; font-size: 12px; color: var(--muted); align-self: flex-start; white-space: nowrap; }
.fc-bar { height: 8px; border-radius: 999px; background: var(--bg); margin: 12px 0 10px; overflow: hidden; }
.fc-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffb3c4, var(--accent)); transition: width .6s; }
.fc-chips { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.fc-chips li { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 12px; padding: 7px 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.fc-chips li span { font-size: 17px; }
.fc-chips li.ok { background: var(--accent-soft); color: var(--accent); }
.fc-chips li.live { background: #fff4e0; color: #b46a00; }
.fc-chips li.live span { animation: bob 1.4s ease-in-out infinite; }
.fc-send { width: 100%; border: 0; border-radius: 14px; padding: 12px; font: inherit; font-weight: 800; color: #fff; background: linear-gradient(135deg, #ff7a9a, #ff9f6e); cursor: pointer; transition: transform .12s; }
.fc-send:active { transform: scale(.97); }
.fc-send.on { background: var(--bg); color: var(--muted); }
.sticker-pick { margin-top: 10px; animation: rise .3s ease both; }
.sticker-pick input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; background: var(--bg); color: var(--ink); margin-bottom: 8px; }
.stickers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stickers button { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 2px solid transparent; background: var(--bg); border-radius: 14px; padding: 8px 2px; font: inherit; cursor: pointer; transition: transform .12s, border-color .12s; min-width: 0; }
.stickers button:hover { border-color: #ffb3c4; transform: translateY(-2px) rotate(-3deg); }
.stickers button:active { transform: scale(.9); }
.stickers span { font-size: 28px; line-height: 1.1; }
.stickers small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fcard.sent { box-shadow: 0 0 0 3px #ffb3c4, var(--shadow); }
.fly { position: absolute; inset: 0; pointer-events: none; }
.fly span { position: absolute; left: 50%; bottom: 20px; font-size: 30px; animation: flyup 1.4s ease-out forwards; }
.fly span:nth-child(2) { left: 35%; animation-delay: .15s; }
.fly span:nth-child(3) { left: 65%; animation-delay: .3s; }
@keyframes flyup { 0% { opacity: 0; transform: translateY(0) scale(.5); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-140px) scale(1.4) rotate(20deg); } }
.cheer-foot { text-align: center; margin-top: 14px; }
.cheer-toast { position: fixed; left: 0; right: 0; margin: 0 auto; bottom: 90px; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 700; z-index: 60; animation: rise .3s ease both; width: max-content; max-width: calc(100vw - 32px); box-sizing: border-box; text-align: center; line-height: 1.45; }
@media (prefers-reduced-motion: reduce) { .bounce, .fc-ava i, .fc-chips li.live span, .fly span { animation: none; } }

/* ---------- 단식만 하는 날 ---------- */
.daymode { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 5px; margin: 0 0 12px; }
.daymode button { border: 0; background: none; border-radius: 12px; padding: 10px 6px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.daymode button.on { background: var(--accent-soft); color: var(--accent); }
.daymode button:last-child.on { background: #ece8ff; color: #5b47c7; }
.fo-time { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.fo-time > div { flex: 1; background: var(--bg); border-radius: 16px; padding: 12px; text-align: center; }
.fo-time > div.fo-fast { background: #ece8ff; }
.fo-time b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.fo-time small { color: var(--muted); font-size: 13px; }
.fo-time i { font-style: normal; color: var(--muted); }
.fo-tips { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.fo-tips li { background: var(--bg); border-radius: 12px; padding: 10px 12px; font-size: 15px; word-break: keep-all; }
@media print { .daymode { display: none !important; } }

/* ---------- 프로필 사진 ---------- */
.fc-ava.photo { background-size: cover; background-position: center; color: transparent; }
.fc-ava.big { width: 76px; height: 76px; font-size: 30px; }
.fc-ava.mini { width: 22px; height: 22px; font-size: 11px; display: inline-grid; vertical-align: -6px; margin-right: 6px; }
.mecard { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; }
.ava-btn { position: relative; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.ava-btn .cam { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; font-size: 15px; }
.ava-btn:active { transform: scale(.95); }
.me-who { display: flex; flex-direction: column; min-width: 0; }
.me-who b { font-size: 19px; }
.me-who b small { font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 7px; vertical-align: 3px; }
.me-who > span { color: var(--muted); font-size: 13px; }
.me-acts { display: flex; gap: 12px; margin-top: 4px; }
.me-acts .link { font-size: 13px; }
.me-chips { grid-column: 1 / -1; margin: 8px 0 0; }
.me-note { grid-column: 1 / -1; margin: 0; text-align: right; font-size: 12px; color: var(--muted); }
/* ---------- 음식 양 조절 ---------- */
.qty-step { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 8px; }
.qty-step button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 24px; font-weight: 700; color: var(--accent); cursor: pointer; }
.qty-step button:disabled { opacity: .35; cursor: default; }
.qty-step div { min-width: 120px; text-align: center; display: flex; flex-direction: column; }
.qty-step b { font-size: 20px; }
.qty-step small { color: var(--muted); font-size: 13px; }
.qty-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 0 0 14px; }
.qty-chips button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 11px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.qty-chips button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* ---------- 모드: 식단 짜주기 / 먹은 것 기록 ---------- */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding-top: 4px; padding-bottom: 8px; }
.modes button { display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 8px 10px; font-weight: 700; font-size: 15px; color: var(--muted); transition: background .15s, color .15s, border-color .15s; }
.modes img { width: 28px; height: 28px; transition: transform .2s; }
.modes button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.modes button.on img { transform: scale(1.12) rotate(-6deg); }
.diary-mode #printBtn, .diary-mode .foot { display: none; }

/* ---------- 먹은 것 기록 ---------- */
.diary { max-width: 560px; margin: 0 auto; }
.d-date { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.d-date > div { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.d-date .pill { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; }
.d-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 24px; line-height: 1; color: var(--ink); }
.d-arrow:disabled { opacity: .3; cursor: default; }

.d-meals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.d-meals button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 8px; border-radius: 18px; border: 2px solid transparent; background: var(--card); box-shadow: var(--shadow); transition: transform .15s, border-color .15s, background .15s; }
.d-meals img { width: 40px; height: 40px; filter: grayscale(.6); opacity: .7; transition: filter .2s, opacity .2s, transform .2s; }
.d-meals span { font-weight: 800; font-size: 15px; }
.d-meals small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.d-meals button.done img { filter: none; opacity: 1; }
.d-meals button.done small { color: var(--accent); font-weight: 700; }
.d-meals button.on { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.d-meals button.on img { filter: none; opacity: 1; transform: scale(1.1); }

.d-card { background: var(--card); border-radius: 26px; padding: 20px 18px; box-shadow: var(--shadow-lg); margin-bottom: 12px; }
.d-card.slide-next { animation: d-in-r .28s ease-out; }
.d-card.slide-prev { animation: d-in-l .28s ease-out; }
@keyframes d-in-r { from { opacity: 0; transform: translateX(40px); } }
@keyframes d-in-l { from { opacity: 0; transform: translateX(-40px); } }
.d-hero { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.d-hero-img { width: 64px; height: 64px; animation: d-float 3s ease-in-out infinite; }
@keyframes d-float { 50% { transform: translateY(-5px) rotate(4deg); } }
.d-hero h2 { margin: 0; font-size: 26px; }
.d-hero p { margin: 0; color: var(--muted); font-size: 15px; }
.d-hero > div:nth-child(2) { flex: 1; min-width: 0; }
.d-kcal { text-align: right; line-height: 1.1; }
.d-kcal b { display: block; font-size: 28px; color: var(--accent); font-variant-numeric: tabular-nums; }
.d-kcal small { color: var(--muted); font-size: 13px; }

.d-plate { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border-radius: 20px; background: var(--bg); border: 2px dashed var(--line); min-height: 86px; margin-bottom: 16px; }
.d-plate.empty { align-items: center; justify-content: center; }
.d-plate.empty p { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; }
.d-plate.empty img { width: 36px; height: 36px; opacity: .5; }
.d-eaten { position: relative; display: flex; flex-direction: column; align-items: center; width: 76px; padding: 8px 4px 6px; border: 0; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.d-eaten img { width: 44px; height: 44px; }
.d-eaten b { font-size: 12px; font-weight: 600; line-height: 1.25; margin-top: 3px; word-break: keep-all; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.d-eaten { border: 2px solid transparent; }
.d-eaten small { font-size: 11px; color: var(--accent); font-weight: 700; }
.d-eaten em { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 600; }
.d-eaten.on { border-color: var(--accent); background: var(--accent-soft); }
.d-eaten .d-badge { top: -6px; right: -6px; }
.d-skip { display: block; width: 100%; margin: -6px 0 16px; padding: 12px; border: 2px dashed var(--line); border-radius: 16px; background: none; color: var(--muted); font-weight: 700; font-size: 15px; }
.d-skip:hover { border-color: var(--muted); color: var(--ink); }
.d-skip.on { border-style: solid; }
.d-plate.skipped { border-style: solid; background: var(--info-bg); }
.d-plate.skipped p { color: var(--info-ink); }
.d-plate.skipped img { opacity: 1; width: 44px; height: 44px; }
.d-meals button.skip img { filter: grayscale(1); opacity: .45; }
.d-meals button.skip small { color: var(--info-ink); font-weight: 700; }
.d-tip { margin: -8px 0 14px; text-align: center; color: var(--muted); font-size: 13px; }
.d-done { margin: 0 0 18px; }
.d-done b, .d-done small { word-break: keep-all; }
.d-plate.done { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.d-plate.done .d-eaten:disabled { opacity: 1; cursor: default; }
.d-more { display: block; width: 100%; margin: -4px 0 4px; padding: 14px; border: 2px solid var(--accent); border-radius: 16px; background: var(--card); color: var(--accent); font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; }
.d-more:hover { background: var(--accent-soft); }
.d-body { margin: 16px 0 4px; padding: 16px; border-radius: 20px; background: linear-gradient(160deg, #f3efff, var(--card) 70%); border: 1px solid var(--line); }
.d-body-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.d-body-top b { font-size: 16px; }
.d-body-top span { font-size: 13px; color: var(--muted); }
.d-body-top em { font-style: normal; font-weight: 800; color: #5848c8; font-variant-numeric: tabular-nums; }
.d-body-top .d-at-btn { margin-left: 4px; font-size: 13px; }
.d-at-tag { margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: #f0edff; color: #5848c8; font-size: 11px; font-weight: 800; }
.d-at-edit { margin: 0 0 12px; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.d-at-edit p { margin: 0 0 8px; font-weight: 800; font-size: 14px; }
.d-at-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.d-at-chips button { padding: 8px 12px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; }
.d-at-chips button.on { border-color: #5848c8; background: #f0edff; color: #5848c8; }
.d-at-in { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--muted); }
.d-at-preview { margin: 10px 0 0 !important; font-size: 13px !important; font-weight: 700 !important; color: #5848c8; word-break: keep-all; }
.d-at-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.d-at-foot button { min-width: 84px; }
.d-at-in input { padding: 8px 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); font: inherit; font-weight: 700; color: var(--ink); }
.d-body-stage { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 19px; word-break: keep-all; }
.d-body-stage span { font-size: 26px; }
.d-body-desc { margin: 6px 0 12px; font-size: 14px; line-height: 1.55; color: var(--ink); word-break: keep-all; }
.d-body .ftank { margin-top: 4px; }
.d-body-next { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-size: 13px; color: var(--muted); word-break: keep-all; }
.d-body-next b { color: var(--ink); }
.d-body .d-body-fast { margin-top: 12px; }
.d-body .fnote { margin: 10px 0 0; }
.d-body-note { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 4px; padding: 12px 14px; border-radius: 14px; background: var(--bg); font-size: 14px; }
.d-body-note span { font-size: 20px; }
.d-body-note p { margin: 0; word-break: keep-all; }
.d-body-note .link { display: block; margin-top: 4px; }

/* 담은 음식 양·칼로리 고치기 */
.d-edit { background: var(--accent-soft); border-radius: 20px; padding: 14px; margin: -6px 0 16px; animation: d-pop .3s ease-out; }
.d-edit-top { display: flex; align-items: center; gap: 10px; }
.d-edit-top img { width: 44px; height: 44px; }
.d-edit-top > div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.d-edit-top small { color: var(--muted); font-size: 13px; }
.d-edit-top .primary { min-height: 38px; padding: 6px 14px; }
.d-edit-q { margin: 12px 0 6px; font-weight: 700; font-size: 15px; }
.d-qty { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.d-qty button { border: 2px solid transparent; background: var(--card); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 14px; }
.d-qty button.on { border-color: var(--accent); color: var(--accent); }
.d-half { display: block; width: 100%; margin-top: 10px; padding: 10px; border: 2px dashed var(--line); border-radius: 14px; background: none; font-weight: 700; font-size: 14px; color: var(--ink); }
.d-half small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.d-half:disabled { opacity: .4; }
.d-step { display: flex; align-items: center; justify-content: center; gap: 10px; }
.d-step button { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 22px; line-height: 1; font-weight: 700; }
.d-step button:disabled { opacity: .35; }
.d-step label { display: flex; align-items: baseline; gap: 6px; background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 4px 12px; }
.d-step label:focus-within { border-color: var(--accent); }
.d-step input { width: 72px; border: 0; background: none; font: inherit; font-size: 24px; font-weight: 800; text-align: right; color: var(--ink); outline: none; }
.d-step span { font-size: 15px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.d-kin { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 14px; font-weight: 600; }
.d-kin span { flex: 1; min-width: 0; color: var(--muted); }
.d-kin input { width: 100px; padding: 8px 10px; border: 2px solid var(--line); border-radius: 12px; font: inherit; font-size: 17px; font-weight: 700; text-align: right; background: var(--card); color: var(--ink); }
.d-kin.total span { color: var(--ink); font-weight: 700; }
.d-kin.total input { color: var(--accent); }
.d-kin input:focus { border-color: var(--accent); outline: none; }
.d-edit-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.d-edit-foot .link { padding: 8px 0; font-size: 13px; }
.d-edit .danger { color: var(--danger-ink); }
.d-eaten.pop { animation: d-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes d-pop { from { transform: scale(.3) translateY(30px); opacity: 0; } }

.d-search { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 2px solid var(--line); border-radius: 18px; padding: 6px 14px; transition: border-color .15s; }
.d-search:focus-within { border-color: var(--accent); }
.d-search img { width: 28px; height: 28px; flex: none; }
.d-search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 17px; padding: 8px 0; color: var(--ink); outline: none; }
.d-res-head { font-size: 15px; color: var(--muted); font-weight: 700; margin: 14px 2px 8px; }
.d-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.d-food { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px 10px; border: 2px solid transparent; border-radius: 18px; background: var(--bg); transition: transform .12s, border-color .15s; }
.d-food:hover { border-color: var(--line); }
.d-food:active { transform: scale(.94); }
.d-food img { width: 56px; height: 56px; margin-bottom: 4px; transition: transform .2s; }
.d-food:hover img { transform: scale(1.08) rotate(-4deg); }
.d-food b { font-size: 14px; line-height: 1.3; word-break: keep-all; text-align: center; }
.d-food small { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.3; }
.d-food.have { border-color: var(--accent); background: var(--accent-soft); }
.d-food.custom { border: 2px dashed var(--line); background: none; }
.d-badge { position: absolute; top: 6px; right: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-style: normal; font-size: 12px; font-weight: 800; line-height: 22px; }

.d-next { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; }
.d-next .primary { flex: 1; max-width: 70%; margin-left: auto; }

.d-total { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 20px; padding: 12px 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.d-total > img { width: 42px; height: 42px; flex: none; }
.d-total > div { flex: 1; min-width: 0; }
.d-prot { display: flex; align-items: center; gap: 12px; width: 100%; margin: -4px 0 12px; padding: 12px 16px; border: 0; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.d-prot-ic { width: 42px; flex: none; font-size: 30px; text-align: center; }
.d-prot > div { flex: 1; min-width: 0; }
.d-prot p { margin: 0; font-size: 15px; }
.d-prot p b { font-size: 17px; }
.d-prot > div > small { display: block; word-break: keep-all; margin-top: 2px; font-size: 13px; color: var(--muted); }
.d-prot > em { flex: none; font-style: normal; font-size: 13px; color: var(--accent); font-weight: 700; }
.d-bar.p i { background: linear-gradient(90deg, #f5a524, #e8590c) !important; }
.d-prot.full .d-bar.p i, .if-m.done .d-bar.p i { background: linear-gradient(90deg, #3fbf7f, #22a06b) !important; }
.d-prot-more { word-break: keep-all; margin: -4px 0 12px; padding: 4px 16px 14px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.d-prot-more h3 { margin: 14px 0 8px; font-size: 14px; color: var(--muted); }
.pm-list, .pm-top, .pm-pick { list-style: none; margin: 0; padding: 0; }
.pm-list li { display: grid; grid-template-columns: 44px 1fr 48px; align-items: center; gap: 10px; padding: 4px 0; font-size: 14px; }
.pm-list b { text-align: right; font-variant-numeric: tabular-nums; }
.pm-bar { display: block; height: 8px; border-radius: 8px; background: var(--bg); overflow: hidden; }
.pm-bar > i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #f5a524, #e8590c); }
.pm-top li, .pm-pick li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }
.pm-top img, .pm-pick img { width: 28px; height: 28px; flex: none; }
.pm-top span, .pm-pick span { flex: 1; min-width: 0; }
.pm-pick small { display: block; font-size: 12px; color: var(--muted); }
.pm-top b, .pm-pick b { font-variant-numeric: tabular-nums; }
.pm-pick b { color: #e8590c; }
.pm-goal { display: flex; align-items: center; gap: 8px; }
.pm-goal > button { white-space: nowrap; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.pm-goal > button:disabled { opacity: .4; cursor: default; }
.pm-goal > span { flex: 1; min-width: 0; text-align: center; }
.pm-goal > span b { display: block; font-size: 18px; }
.pm-goal > span small { display: block; font-size: 12px; color: var(--muted); word-break: keep-all; }
.pm-reset { display: block; margin: 8px auto 0; }
.pm-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); word-break: keep-all; }
.d-kcal em { display: block; margin-top: 4px; font-style: normal; font-size: 12px; font-weight: 700; color: #e8590c; }
.d-pbadge { font-style: normal; font-size: 11px; font-weight: 700; color: #e8590c; }
.d-total p { margin: 0; font-size: 15px; }
.d-total p b { font-size: 19px; }
.d-total p small, .d-total > div > small { color: var(--muted); font-size: 14px; }
.d-bar { height: 10px; border-radius: 999px; background: var(--bg); overflow: hidden; margin: 6px 0 4px; }
.d-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .4s; }
.d-bar i.over { background: linear-gradient(90deg, var(--c), var(--f)); }

@media (max-width: 760px) {
  .modes button { min-height: 48px; }
  .d-meals { gap: 6px; }
  .d-meals img { width: 36px; height: 36px; }
  .d-card { padding: 18px 14px; }
  .d-hero-img { width: 56px; height: 56px; }
  .d-hero h2 { font-size: 24px; }
}
@media (max-width: 360px) { .d-grid { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) { .d-card, .d-eaten.pop, .d-hero-img { animation: none !important; } }
@media print { .modes { display: none !important; } }

/* ---------- 단식: 내 몸 연료 탱크 ---------- */
.ftank-card h2 { margin-bottom: 4px; }
.ftank-card > .muted { margin: 0 0 10px; font-size: 14px; }
.ftank { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: center; }
.fbody { width: 100%; height: auto; display: block; }
.fbody .b-body { fill: #fdebdc; stroke: #efcfb4; stroke-width: 2; }
.fbody .b-emo { font-size: 30px; }
.fbody .tk { fill: #fff; stroke: #e4d6c8; stroke-width: 2; }
.fbody .tk-liver { fill: #f0a35e; transition: y .25s, height .25s; }
.fbody .tk-stomach { fill: #fff8ef; }
.fbody .tk-fat { fill: #ffe9a8; stroke: #f1cf6a; stroke-width: 2; }
.fbody .tk-t { font-size: 12px; font-weight: 800; fill: #7a5a3c; }
.fbody .tk-t.sm { font-size: 10px; fill: #b0927a; }
.fbody .flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flick 1.1s ease-in-out infinite alternate; }
@keyframes flick { from { transform: scale(1) rotate(-3deg); } to { transform: scale(1.08) rotate(3deg); } }
.fbody .drop { fill: #5aa9e6; animation: ketoneUp 2.4s ease-in infinite; opacity: 0; }
@keyframes ketoneUp { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translate(14px, -58px); opacity: 0; } }
.ftank-side { min-width: 0; }
.fphase { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 18px; }
.fphase span { font-size: 26px; }
.fphase-d { margin: 4px 0 10px; font-size: 14px; color: var(--muted); word-break: keep-all; line-height: 1.5; }
.fmeters { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fmeters li { display: grid; grid-template-columns: 22px 1fr auto; gap: 6px; align-items: center; }
.fmeters span { font-size: 17px; }
.fmeters b { display: block; font-size: 12px; font-weight: 700; margin-bottom: 3px; }
.fmeters i { display: block; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.fmeters em { display: block; height: 100%; border-radius: 99px; transition: width .25s; }
.fmeters em.m-food { background: #9ccc9c; }
.fmeters em.m-liver { background: #f0a35e; }
.fmeters em.m-fat { background: #f2b630; }
.fmeters em.m-ket { background: #5aa9e6; }
.fmeters small { font-size: 12px; font-weight: 700; color: var(--muted); min-width: 48px; text-align: right; }
.fstage { grid-column: 1 / -1; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--info-bg); color: var(--info-ink); font-size: 14px; line-height: 1.55; word-break: keep-all; }
.fstage b { display: block; margin-bottom: 2px; font-size: 15px; }
.fscrub { margin-top: 14px; }
.fscrub-top { display: flex; justify-content: space-between; align-items: center; min-height: 28px; }
.fscrub-top b { font-size: 16px; color: var(--accent); }
.fscrub-top .link { font-size: 14px; }
.fscrub input[type=range] { width: 100%; margin: 8px 0 2px; accent-color: var(--accent); height: 28px; }
.fscrub-ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.fmore summary { cursor: pointer; font-weight: 700; }
.fmore[open] summary { margin-bottom: 10px; }
@media (max-width: 480px) {
  .ftank { grid-template-columns: 1fr; }
  .fbody { max-width: 200px; margin: 0 auto; }
}

/* ---------- 단식: 배고픔 파도 ---------- */
.hwave h2 { margin-bottom: 6px; }
.hwave.due { box-shadow: 0 0 0 3px #f0c27a, var(--shadow); }
.hq { margin: 4px 0 10px; font-weight: 700; font-size: 16px; }
.hscale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 8px; }
.hscale button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px; border: 2px solid var(--line); border-radius: 14px; background: var(--card); }
.hscale button:hover { border-color: var(--accent); }
.hscale span { font-size: 28px; line-height: 1; }
.hscale small { font-size: 11px; font-weight: 700; color: var(--muted); word-break: keep-all; text-align: center; line-height: 1.25; }
.hchart { width: 100%; height: auto; display: block; margin: 6px 0 2px; }
.hchart .grid { stroke: var(--line); stroke-dasharray: 3 4; }
.hchart .hk { font-size: 14px; }
.hchart .harea { fill: rgba(90, 169, 230, .18); }
.hchart .hline { fill: none; stroke: #3d8fd1; stroke-width: 3; stroke-linecap: round; }
.hchart .hdot { fill: #fff; stroke: #3d8fd1; stroke-width: 3; }
.hchart .tick { font-size: 11px; fill: var(--muted); }
.hmsg { margin: 6px 0 4px; font-size: 15px; line-height: 1.55; word-break: keep-all; }
.hfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: 14px; color: var(--muted); }
.hfoot b { color: var(--ink); font-variant-numeric: tabular-nums; }
.htips { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.htips summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.htips p { margin: 8px 0 0; font-size: 15px; line-height: 1.6; }
.htips a { color: var(--muted); font-size: 13px; }

/* ---------- 단식: 잠든 사이 일어난 일 ---------- */
.frecap { background: linear-gradient(160deg, #eef3ff, #fff 60%); }
.frecap h2 { font-size: 21px; margin-bottom: 10px; }
.frecap-fuel { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.frecap-fuel li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.frecap-fuel b { margin-left: auto; font-size: 14px; }
.frecap-cards { display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.frecap-cards article { scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.frecap-cards small { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }
.frecap-cards span { display: block; font-size: 32px; margin: 6px 0 2px; }
.frecap-cards b { display: block; font-size: 17px; }
.frecap-cards p { margin: 6px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); word-break: keep-all; }
.frecap-hint { margin: 4px 0 10px; font-size: 12px; color: var(--muted); text-align: right; }
.frecap .primary { width: 100%; }

/* ---------- 단식: 카드 모으기 ---------- */
.fcards-card h2 small, .fquiz h2 small, .ffriends h2 small { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.fcards-card > .muted { margin: 4px 0 10px; font-size: 14px; }
.fcd-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-bottom: 12px; }
.fcd-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f2b630, #f0a35e); border-radius: 99px; }
.fcd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
.fcd { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 6px; border-radius: 12px; border: 2px solid #f1d58a; background: #fffaf0; }
.fcd span { font-size: 22px; line-height: 1.1; }
.fcd small { font-size: 10px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.fcd.on { border-color: var(--accent); background: var(--accent-soft); }
.fcd.lock { border: 2px dashed var(--line); background: none; }
.fcd.lock span { font-size: 16px; opacity: .45; padding: 3px 0; }
.fcd-detail { display: flex; gap: 12px; margin-top: 12px; padding: 14px; border-radius: 16px; background: #fffaf0; border: 2px solid #f1d58a; animation: pop .2s ease-out; }
.fcd-detail > span { font-size: 36px; line-height: 1; }
.fcd-detail small { font-size: 12px; color: var(--muted); font-weight: 700; }
.fcd-detail b { display: block; font-size: 17px; margin: 2px 0 4px; }
.fcd-detail p { margin: 0; font-size: 14px; line-height: 1.55; word-break: keep-all; }
.fnew { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: #fff1c9; color: #8a5a00; font-size: 12px; font-weight: 800; animation: pop .3s ease-out; }

/* ---------- 단식: OX 퀴즈 ---------- */
.fq-q { font-size: 18px; font-weight: 800; line-height: 1.45; margin: 8px 0 12px; word-break: keep-all; }
.fq-ox { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fq-ox button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; font-size: 34px; border-radius: 18px; border: 2px solid var(--line); background: var(--card); line-height: 1; }
.fq-ox button small { font-size: 14px; font-weight: 700; color: var(--muted); }
.fq-ox .o:hover { border-color: #3d8fd1; }
.fq-ox .x:hover { border-color: #e06a5b; }
.fq-res { padding: 14px; border-radius: 16px; margin-bottom: 12px; font-size: 15px; animation: pop .2s ease-out; }
.fq-res.ok { background: #e7f4ec; }
.fq-res.no { background: #fdeceb; }
.fq-res p { margin: 6px 0 0; line-height: 1.55; word-break: keep-all; }
.fq-res .fref { display: inline-block; margin-top: 6px; }
.fquiz .primary { width: 100%; }
.fq-end { font-size: 16px; margin: 8px 0; }

/* ---------- 단식: 같이 단식 중인 친구 ---------- */
.ff-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.ff-list li { display: flex; align-items: center; gap: 10px; }
.ff-list li > div { flex: 1; min-width: 0; }
.ff-list b { display: block; font-size: 15px; }
.ff-list small { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.ff-list i { display: block; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.ff-list em { display: block; height: 100%; background: #7b6cd9; border-radius: 99px; }
.ff-send { flex: none; border: 2px solid #c9c1f2; background: #f3f0ff; color: #4b3cb0; border-radius: 99px; padding: 8px 12px; font-weight: 700; font-size: 13px; }
.ff-send.sent { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.ffriends > .muted { margin: 6px 0 0; font-size: 14px; }
.ff-got { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: #fff4f7; }
.ff-got b { font-size: 14px; }
.ff-got p { margin: 6px 0 4px; font-size: 24px; letter-spacing: 2px; }
.ff-got small { font-size: 13px; color: var(--muted); }

/* ---------- 운동 탭 ---------- */
.ex-hero { padding: 20px; }
.ex-hero.idle { display: flex; gap: 14px; align-items: center; }
.ex-hero.idle h2 { font-size: 18px; margin: 0 0 4px; }
.ex-hero.idle p { margin: 0; }
.ex-hero-top { display: flex; align-items: center; gap: 14px; }
.ex-emo { width: 64px; height: 64px; flex: none; display: grid; place-items: center; font-size: 38px; border-radius: 20px; background: var(--accent-soft); }
.ex-hero-top small { display: block; font-size: 13px; color: var(--muted); font-weight: 700; }
.ex-hero-top h2 { margin: 2px 0 0; font-size: 24px; letter-spacing: -0.02em; }
.ex-prog { display: flex; align-items: center; gap: 12px; margin: 16px 0 14px; }
.ex-prog-bar { flex: 1; height: 12px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.ex-prog-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .4s; }
.ex-prog span { font-size: 14px; color: var(--muted); white-space: nowrap; }
.ex-prog b { font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.ex-go { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; width: 100%; text-align: left; padding: 16px 18px; border: 0; border-radius: 18px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px rgba(33, 131, 91, .25); }
.ex-go span { grid-row: span 2; font-size: 30px; }
.ex-go b { font-size: 18px; }
.ex-go small { font-size: 13px; opacity: .85; }
.ex-go.live { background: #2f6fd6; }
.ex-quick { display: block; width: 100%; margin-top: 10px; padding: 13px; border: 2px solid var(--line); border-radius: 16px; background: var(--card); font-weight: 700; font-size: 15px; color: var(--ink); }
.ex-quick:hover { border-color: var(--accent); color: var(--accent); }
.ex-quick.sm { padding: 10px; font-size: 14px; margin-top: 8px; }
.ex-done { margin: 0; padding: 14px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); font-weight: 800; text-align: center; font-size: 16px; }
.ex-hero.done .link { display: block; margin: 8px auto 0; }
.ex-guide { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.ex-guide summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.ex-guide ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.ex-guide li { display: flex; gap: 10px; align-items: flex-start; }
.ex-guide li > span { font-size: 22px; width: 30px; text-align: center; flex: none; }
.ex-guide b { display: block; font-size: 15px; }
.ex-guide small { display: block; font-size: 13px; color: var(--muted); line-height: 1.5; }

.ex-days-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ex-days-head h2 { margin: 0; }
.ex-dots { display: flex; gap: 6px; }
.ex-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.ex-dots i.on { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ex-sum { margin: 6px 0 14px; font-size: 14px; color: var(--muted); }
.ex-sum b { color: var(--accent); }
.ex-day { border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin-bottom: 10px; background: var(--card); }
.ex-day.today { border: 2px solid var(--accent); box-shadow: 0 4px 16px rgba(33, 131, 91, .1); }
.ex-day.future { background: var(--bg); border-style: dashed; }
.ex-day.future header { opacity: .6; }
.ex-day header { display: flex; align-items: center; gap: 12px; }
.ex-day header > div { flex: 1; min-width: 0; }
.ex-day header b { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.ex-day header .pill { font-style: normal; background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 1px 8px; font-size: 11px; }
.ex-day header small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.ex-day header strong { font-size: 16px; color: var(--muted); white-space: nowrap; }
.ex-day.done header strong { color: var(--accent); }
.ex-check { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--bg); color: var(--muted); font-weight: 800; font-size: 14px; }
.ex-day.done .ex-check { background: var(--accent); color: var(--accent-ink); }
.ex-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.ex-lbl { font-size: 15px; font-weight: 700; }
.ex-lbl em { font-style: normal; font-size: 11px; color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 1px 7px; margin-left: 2px; vertical-align: 2px; }
.ex-step { display: flex; align-items: center; gap: 6px; }
.ex-step button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 22px; font-weight: 700; line-height: 1; color: var(--ink); }
.ex-step button:disabled { opacity: .35; }
.ex-step label { display: flex; align-items: baseline; gap: 2px; padding: 6px 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); }
.ex-step label:focus-within { border-color: var(--accent); }
.ex-step input { width: 46px; border: 0; background: none; font: inherit; font-size: 20px; font-weight: 800; text-align: right; color: var(--ink); outline: none; padding: 0; -moz-appearance: textfield; }
.ex-step input::-webkit-outer-spin-button, .ex-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ex-step label span { font-size: 13px; color: var(--muted); font-weight: 700; }
.ex-note { font-size: 13px; margin: 4px 0 0; }

.ex-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.ex-tiles div { background: var(--bg); border-radius: 14px; padding: 12px 8px; text-align: center; }
.ex-tiles b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.ex-tiles small { font-size: 12px; color: var(--muted); }
.ex-rounds { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ex-rounds li { display: grid; grid-template-columns: 64px 1fr 52px; align-items: center; gap: 10px; }
.ex-rounds span { font-size: 14px; font-weight: 700; }
.ex-rounds span small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.ex-rounds i { display: flex; height: 14px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.ex-rounds b { font-size: 14px; text-align: right; }
.ex-rounds em.s, .ex-legend i.s { background: var(--accent); }
.ex-rounds em.c, .ex-legend i.c { background: #8fd3a8; }
.ex-legend { display: flex; gap: 14px; justify-content: flex-end; margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.ex-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* ---------- 체중 탭 ---------- */
.w-hero { padding: 20px; }
.w-hero .ex-quick { word-break: keep-all; }
.w-hero.idle { display: flex; gap: 14px; align-items: center; }
.w-hero.idle h2 { font-size: 18px; margin: 0 0 4px; }
.w-hero.idle p { margin: 0; }
.w-hero-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.w-emo { width: 64px; height: 64px; flex: none; display: grid; place-items: center; font-size: 36px; border-radius: 20px; background: #eaf1fb; }
.w-hero-top small { display: block; font-size: 13px; color: var(--muted); font-weight: 700; }
.w-hero-top h2 { margin: 2px 0 0; font-size: 22px; letter-spacing: -0.02em; word-break: keep-all; }
.w-hero.done .w-hero-top h2 { color: var(--accent); }
.w-step { display: flex; align-items: center; gap: 6px; }
.w-step button { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 22px; font-weight: 700; line-height: 1; color: var(--ink); }
.w-step label { display: flex; align-items: baseline; gap: 2px; padding: 6px 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); }
.w-step label:focus-within { border-color: var(--accent); }
.w-step input { width: 58px; border: 0; background: none; font: inherit; font-size: 20px; font-weight: 800; text-align: right; color: var(--ink); outline: none; padding: 0; -moz-appearance: textfield; }
.w-step input::placeholder { color: #b9bdb4; }
.w-step input::-webkit-outer-spin-button, .w-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.w-step label span { font-size: 13px; color: var(--muted); font-weight: 700; }
.w-step.big { justify-content: center; gap: 14px; }
.w-step.big button { width: 56px; height: 56px; font-size: 28px; }
.w-step.big label { padding: 10px 18px; border-radius: 18px; }
.w-step.big input { width: 110px; font-size: 38px; text-align: center; }
.w-step.big label span { font-size: 18px; }
.w-step.big label { min-width: 0; }
.w-step.big input { max-width: 100%; }
@media (max-width: 360px) {
  .w-step.big { gap: 8px; }
  .w-step.big button { width: 46px; height: 46px; font-size: 24px; }
  .w-step.big label { padding: 8px 12px; }
  .w-step.big input { width: 84px; font-size: 32px; }
}
.w-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.w-diff span { background: var(--bg); border-radius: 14px; padding: 10px; text-align: center; }
.w-diff small { display: block; font-size: 12px; color: var(--muted); }
.w-diff b { font-size: 20px; font-variant-numeric: tabular-nums; }
.w-diff .down b, .ex-tiles .down b { color: var(--accent); }
.w-diff .up b, .ex-tiles .up b { color: #c0612b; }
.w-tip { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); line-height: 1.55; word-break: keep-all; }
.w-chart h2 { margin-bottom: 12px; }
.w-chart .ex-tiles { margin-bottom: 10px; }
.w-best { margin: 0; font-size: 14px; color: var(--muted); }
.w-best b { color: var(--ink); }
.w-diet { display: block; width: 100%; margin-top: 12px; padding: 11px; border: 2px dashed var(--line); border-radius: 14px; background: none; font-weight: 700; font-size: 14px; color: var(--muted); }
.w-diet.on { border: 2px solid var(--accent); background: var(--accent-soft); color: var(--accent); }

/* ---------- 분석 탭 ---------- */
.a-hero { padding: 20px; }
.a-lead { margin: 14px 0 0; font-size: 15px; line-height: 1.6; word-break: keep-all; }
.a-lead b { color: var(--accent); font-size: 17px; }
.a-expect { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); }
.a-expect span { font-size: 14px; font-weight: 700; color: var(--accent); }
.a-expect b { font-size: 22px; color: var(--accent); font-variant-numeric: tabular-nums; }
.a-expect small { margin-left: auto; font-size: 12px; color: var(--muted); }
.a-today { margin: 16px 0 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.a-today-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.a-today-top span:last-child { color: var(--muted); font-weight: 500; }
.a-today-top b { font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.a-today small { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.ex-prog-bar i.over { background: linear-gradient(90deg, #f0a35e, #e06a5b); }
.a-hero .ex-go { margin-top: 0; }
.a-tiles { margin-bottom: 16px; }
.a-tiles div { background: var(--card); box-shadow: var(--shadow); }
.a-tiles b i { font-style: normal; font-size: 14px; color: var(--muted); margin-left: 1px; }
.a-tiles .good b { color: var(--accent); }
.a-tiles .mid b { color: #c98a1b; }
.a-tiles .bad b { color: #c0612b; }
.a-day .a-tip { margin: 8px 0 0 44px; font-size: 13px; color: var(--muted); line-height: 1.5; word-break: keep-all; }
.a-day.future .a-tip { opacity: .7; }
.a-rules h2 { margin-bottom: 12px; }
.a-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.a-list li { display: flex; gap: 12px; align-items: center; }
.a-list li > span { width: 48px; height: 48px; flex: none; display: grid; place-items: center; font-size: 26px; border-radius: 16px; background: var(--bg); }
.a-list b { display: block; font-size: 15px; }
.a-list small { display: block; font-size: 13px; color: var(--muted); line-height: 1.5; word-break: keep-all; }
.a-more summary { cursor: pointer; font-weight: 700; font-size: 16px; list-style-position: inside; }
.a-more summary i { font-style: normal; display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: #fde7d6; color: #b4561f; font-size: 12px; }
.a-more ul { margin: 12px 0 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; line-height: 1.55; }
.a-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.a-stats div { background: var(--bg); border-radius: 14px; padding: 12px; }
.a-stats small { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }
.a-stats b { display: block; font-size: 19px; margin: 2px 0; font-variant-numeric: tabular-nums; }
.a-stats em { display: block; font-style: normal; font-size: 11px; color: var(--muted); line-height: 1.4; }

/* ---------- 응원 탭 (운동 탭과 같은 카드 디자인) ---------- */
.c-hero.idle { display: flex; gap: 14px; align-items: center; }
.c-hero.idle h2 { font-size: 18px; margin: 0 0 4px; }
.c-hero.idle p { margin: 0; }
.c-emo { background: #ffeef2; }
.c-hero .ex-hero-top h2 { font-size: 21px; word-break: keep-all; }
.c-tiles { margin: 16px 0 0; }
.c-tiles small { white-space: nowrap; }
.c-lead { margin: 14px 0 0; font-size: 14px; color: var(--muted); line-height: 1.55; word-break: keep-all; }
.c-hero .ex-go { margin-top: 16px; }
.c-h { font-size: 18px; margin: 0 0 12px; }
.mecard .c-h { grid-column: 1 / -1; margin-bottom: 4px; }
.inbox li { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.inbox .ib-st { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: #fff4f7; font-size: 26px; flex: none; }
.c-friends .ex-days-head .link { font-size: 14px; }
.c-friends .fcards { gap: 10px; }
.c-friends .fcard { box-shadow: none; border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.c-friends .fcard.sent { box-shadow: 0 0 0 3px #ffb3c4; border-color: transparent; }
.c-friends .fc-bar { height: 10px; background: var(--bg); }
.c-friends .fc-bar i { background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.c-friends .fc-send { background: var(--card); color: var(--ink); border: 2px solid #ffc6d3; border-radius: 16px; padding: 12px; font-size: 15px; }
.c-friends .fc-send:hover { border-color: #ff8fab; color: #d6416a; }
.c-friends .fc-send.on { border-color: var(--line); color: var(--muted); }
.cheer-foot { font-size: 13px; }

/* ---------- 하단 탭바: 모든 화면 폭에서 화면 아래에 고정 ---------- */
/* overflow-x: hidden 은 스크롤 상자를 만들어 sticky 머리글이 풀리므로 clip 사용 */
html, body { overflow-x: clip; }
/* blur가 있으면 fixed 탭바가 머리글 기준으로 붙으므로 끔 */
.top { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 20; box-shadow: 0 -4px 20px rgba(20, 32, 25, .06); }
.tabs-in { max-width: 640px; margin: 0 auto; padding: 0 4px; gap: 0; }
.tabs button { flex: 1; flex-direction: column; gap: 3px; padding: 9px 2px 8px; font-size: 13px; border-bottom: 0; min-height: 62px; justify-content: center; }
.tabs svg { width: 24px; height: 24px; }
body:not(.onboarding) .foot { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
.onboarding main, .diary-mode main { padding-bottom: calc(84px + env(safe-area-inset-bottom)) !important; }

/* ---------- 내 정보 ---------- */
.my-emo { background: var(--accent-soft); color: var(--accent); font-size: 28px; font-weight: 800; }
.my-tiles { margin: 16px 0 0; }
.my-tiles div { box-shadow: none; background: var(--bg); }
.my-rows { display: grid; gap: 8px; }
.my-row { display: grid; grid-template-columns: 40px auto 1fr 14px; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); text-align: left; font: inherit; color: var(--ink); }
.my-row:hover { border-color: var(--accent); }
.my-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--bg); font-size: 20px; }
.my-l { font-size: 14px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.my-row b { font-size: 15px; text-align: right; word-break: keep-all; min-width: 0; }
.my-row b.empty { color: var(--muted); font-weight: 500; }
.my-row i { font-style: normal; color: var(--muted); font-size: 18px; }
.my-act { text-align: center; }
.my-act .ex-go { margin-bottom: 8px; }
.my-info .acct-card { max-width: none; }
.my-info .acct-card .acct-sub { margin-top: 22px; }

/* ---------- 도전 탭 (운동 탭과 같은 카드 디자인) ---------- */
.ch-hero { padding: 18px; }
.ch-hero .ex-hero-top h2 { font-size: 22px; }
.ch-hero .fire { margin-left: auto; align-self: flex-start; font-size: 15px; background: #fff1e6; border-radius: 99px; padding: 4px 10px; }
.ch-days { display: grid; grid-template-columns: 32px repeat(3, 1fr) 32px; gap: 6px; align-items: stretch; margin-top: 16px; }
.ch-arrow { border: 0; background: none; font-size: 24px; color: var(--muted); border-radius: 12px; padding: 0 0 3px; }
.ch-arrow:disabled { opacity: .25; }
.ch-day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 2px 8px; border: 2px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); }
.ch-day b { font-size: 15px; }
.ch-day small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.ch-day.on { border-color: var(--accent); background: var(--accent-soft); }
.ch-day.on b { color: var(--accent); }
.ch-day.ok::after { content: '✓'; position: absolute; top: -8px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.ch-tip { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); line-height: 1.55; word-break: keep-all; }
.ch-hero .daymode { margin: 12px 0 0; box-shadow: none; background: var(--bg); }
.ch-hero .today-btn { margin: 12px auto 0; }
.dayview .mealsteps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; overflow: visible; padding: 8px 0 2px; }
.dayview .mealsteps button { min-width: 0; border-radius: 18px; padding: 10px 4px 8px; font-size: 14px; font-weight: 800; color: var(--ink); transition: transform .15s; }
.dayview .mealsteps button span { font-size: 26px; }
.dayview .mealsteps button.on { transform: translateY(-2px); }
/* 먹은 것 기록: 날짜와 오늘 합계를 한 카드에 */
.d-top { padding: 14px 16px; margin-bottom: 12px; }
.d-top .d-date { margin-bottom: 10px; }
.d-top .d-arrow { box-shadow: none; background: var(--bg); }
.d-top .d-total { background: none; box-shadow: none; border-radius: 0; padding: 12px 0 0; margin: 0; border-top: 1px solid var(--line); }

/* 로그인 안 했을 때 '내 정보' 버튼 */
#myBtn { display: inline-flex; align-items: center; gap: 5px; }
#myBtn[hidden] { display: none; }
#myBtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#myBtn.here { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
/* 오른쪽 위 버튼이 2개일 때도 제목은 한 줄로 */
.brand { min-width: 0; }
.brand > div { min-width: 0; }
.brand h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 400px) { .brand h1 { font-size: 16px; } .topright .small { padding: 7px 11px; } }

/* ---------- 식단 짜주기: 끼니 카드 (운동 탭과 같은 디자인) ---------- */
.mealcard { padding: 20px 18px; border-radius: 22px; }
.mc-top { margin-bottom: 4px; }
.mc-top .meal-kcal { margin-left: auto; align-self: center; font-size: 22px; }
.mc-top .fav-btn { align-self: flex-start; }
.mealcard .ex-prog { margin: 14px 0 6px; }
.mc-hint { margin: 0 0 12px; font-size: 13px; color: var(--muted); line-height: 1.5; word-break: keep-all; }
.foods.fd { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 8px; margin: 8px 0 16px; }
.foods.fd li { flex-direction: row; align-items: stretch; gap: 6px; }
.foods.fd .food { flex: 1; min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; gap: 12px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.foods.fd .food-emoji { width: 48px; height: 48px; flex: none; display: grid; place-items: center; margin: 0; font-size: 30px; border-radius: 14px; background: var(--bg); }
.foods.fd .fd-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.foods.fd .food b { font-size: 16px; }
.foods.fd .food small { font-size: 14px; }
.foods.fd .food small em { color: var(--muted); font-weight: 500; font-size: 13px; display: inline; min-height: 0; }
.foods.fd .food-check { position: static; flex: none; width: 30px; height: 30px; }
.foods.fd .food.got { border: 2px solid var(--accent); background: var(--accent-soft); }
.foods.fd .food.got .food-emoji { background: var(--card); }
.foods.fd .food.swapped { border: 2px dashed var(--accent); }
.foods.fd .swap-tag { position: static; display: inline-block; font-style: normal; vertical-align: 2px; margin-left: 4px; }
.foods.fd .food-edit { flex: none; width: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 16px; padding: 6px 2px; font-size: 16px; line-height: 1.2; }
.foods.fd .food-edit span { font-size: 11px; }
.mc-done { display: block; width: 100%; border: 0; border-radius: 16px; padding: 14px; background: var(--accent-soft); color: var(--accent); font: inherit; font-size: 17px; font-weight: 800; }
.mc-done small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.mc-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.mc-links .ex-quick { margin-top: 0; font-size: 13px; }
.mealcard .fast-btn { margin-top: 10px; }

/* 단식 중이 아닐 때: 언제든 단식 시작 */
.fbanner.idle { background: linear-gradient(135deg, #eef0ff, #e6e1ff); color: #3a3f8c; border: 1px solid #d6d2fb; }
.fbanner.idle b { font-size: 16px; }
.fbanner.idle em { color: #6b6fa8; font-size: 13px; text-align: right; }

/* ---------- 단식 화면 · 단식만 하는 날 · 운동 타이머 (운동 탭과 같은 카드 디자인) ---------- */
.f-emo { background: #efedff; }
.ex-go.night { background: #5848c8; box-shadow: 0 8px 20px rgba(88, 72, 200, .25); color: #fff; }
.f-prog .ex-prog-bar i { background: linear-gradient(90deg, #8b7cf0, #5848c8); }
.f-hero .fwarn { margin: 14px 0 0; }
.f-hero .ex-go, .woview .ex-hero .ex-go { margin-top: 16px; }
.f-hero .ex-go.f-again { margin-top: 10px; }
.f-hero .ex-hero-top h2 { word-break: keep-all; }
.f-span { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0 0; padding: 10px 12px; border-radius: 14px; background: var(--bg); }
.f-span span { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.f-span small { font-size: 12px; color: var(--muted); font-weight: 700; }
.f-span b { font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.f-span i { font-style: normal; color: var(--muted); font-weight: 700; }
.f-run .fring, .wo-hero .fring { margin: 16px auto 6px; }
.f-run .fadj { margin-bottom: 0; }
.f-done { background: #efedff; color: #5848c8; }
.f-end { margin: 0 0 16px; color: var(--muted); }
.fastview > .ex-go { margin-bottom: 16px; }
.wo-hero .wo-blocks { margin: 12px 0 0; }
.wo-hero .wo-ctrl { margin: 6px 0 0; }
.wo-hero .wo-ctrl .ex-quick { margin-top: 0; }
.wo-logged { color: var(--accent); font-weight: 700; }

/* ---------- 설문 · 단식 시간 고르기 창 (운동 탭과 같은 디자인) ---------- */
.wiz .primary.big { border-radius: 18px; padding: 18px; font-size: 18px; box-shadow: 0 8px 20px rgba(33, 131, 91, .25); }
.wiz-foot { justify-items: stretch; gap: 0; }
.wiz-foot .ex-quick { margin-top: 10px; }
.wiz-foot .link { justify-self: center; }
.intro .ex-go { margin-top: 0; }
.intro-list li { box-shadow: var(--shadow); }
.wiz-review { text-align: left; }
.wiz-review .my-group { margin-bottom: 12px; }
.wiz-review .c-h { font-size: 16px; margin-bottom: 10px; }
.fpick { text-align: left; padding: 20px 18px 16px; }
.fpick .ex-hero-top { margin-bottom: 4px; }
.fpick .ex-hero-top h2 { font-size: 22px; margin: 2px 0 0; }
.fpick .ex-emo { width: 56px; height: 56px; font-size: 32px; border-radius: 18px; }
.fpick .ftargets { display: grid; grid-template-columns: repeat(3, 1fr); }
.fpick .ftargets button { border-radius: 16px; padding: 12px 4px; }
.fpick .ftargets button.on { border-color: #5848c8; }
.fpick .fp-custom { justify-content: flex-start; padding: 0 4px; }
.fpick .ex-go { margin-top: 4px; }
.ex-go:disabled { opacity: .45; box-shadow: none; }

/* ---------- QA 낮은 단계 수정 ---------- */
.f-end.armed { border-color: #e0a14a; background: #fff6e8; color: #a8620f; }
.f-end small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.nw { white-space: nowrap; }
.d-date b, .d-date .pill { white-space: nowrap; }
@media (max-width: 360px) {
  .d-date > div { font-size: 15px; gap: 6px; }
  .d-date .pill { padding: 2px 8px; font-size: 12px; }
  .d-top { padding: 12px; }
}
/* 컴퓨터 화면: 단식 띠도 다른 카드와 같은 폭 */
.fbanner { max-width: none; }
.fastview .fbanner, .woview .fbanner { max-width: 560px; }

/* ISSUE-008: 도전 탭(560px 내용)에서는 단식 띠도 같은 폭 */
#app:has(> .diary) > .fbanner, #app:has(> .dayview) > .fbanner { max-width: 560px; }
/* ISSUE-009: 단식 취소 안내 */
.f-cancel { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-size: 14px; color: var(--muted); word-break: keep-all; }

/* ISSUE-010: 3일 끝 띠 / ISSUE-011: 운동 중 띠 */
.fbanner.rend { background: linear-gradient(135deg, #fff3df, #ffe6c4); color: #8a4b08; border: 1px solid #f3cf9a; }
.fbanner.rend b { font-size: 16px; }
.fbanner.rend em { color: #a8620f; font-size: 13px; text-align: right; }
.fbanner.wo { background: linear-gradient(135deg, #2f6fd6, #4b8cf0); }

/* 단식 중 아침 기록 확인 팝업 */
#fastBfAsk .fb-sub { margin: 10px 0 14px; text-align: left; }
#fastBfAsk .ex-quick { width: 100%; margin-top: 8px; }

/* 연료 탱크: 실제 그림 4장 겹치기 */
.fimg { position: relative; aspect-ratio: 600 / 777; }
.fimg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .35s ease; user-select: none; -webkit-user-drag: none; }

/* 연료 탱크 그림 위 효과 (위치는 그림 600x777 기준 %) */
.fx { position: absolute; inset: 0; pointer-events: none; }
.fx > * { position: absolute; display: block; }
.fx i { display: block; }
/* 위: 음식이 있을수록 소화 물결이 퍼지고 거품이 올라옴 */
.fx-sto { left: 53%; top: 47%; width: 25%; height: 18%; border-radius: 50%; border: 3px solid rgba(70, 175, 80, .9); box-shadow: 0 0 10px rgba(70, 175, 80, .8), inset 0 0 8px rgba(70, 175, 80, .6); opacity: var(--food); animation: fxSto 1.8s ease-out infinite; }
@keyframes fxSto { 0% { transform: scale(.7); opacity: var(--food); } 100% { transform: scale(1.15); opacity: 0; } }
.fx-bub { left: 56%; top: 46%; width: 20%; height: 16%; opacity: var(--food); }
.fx-bub i { position: absolute; bottom: 0; width: 14%; aspect-ratio: 1; min-width: 7px; border-radius: 50%; background: rgba(235, 255, 225, .95); border: 2px solid #46af50; box-shadow: 0 0 4px rgba(70, 175, 80, .8); animation: fxBub 2s ease-in infinite; }
.fx-bub i:nth-child(1) { left: 18%; }
.fx-bub i:nth-child(2) { left: 50%; animation-delay: .65s; }
.fx-bub i:nth-child(3) { left: 80%; animation-delay: 1.3s; }
@keyframes fxBub { 0% { transform: translateY(0) scale(.5); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-220%) scale(1); opacity: 0; } }
/* 간: 포도당을 꺼내 쓰는 만큼 빛이 훑고 테두리가 맥박처럼 빛남 */
.fx-liv { left: 23%; top: 47%; width: 29%; height: 19%; border-radius: 28% 40% 30% 45%; opacity: var(--glu); background: linear-gradient(110deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .7) 50%, rgba(255, 255, 255, 0) 62%); background-size: 300% 100%; animation: fxShine 2.4s linear infinite, fxLivGlow 2.4s ease-in-out infinite; }
@keyframes fxShine { from { background-position: 100% 0; } to { background-position: -50% 0; } }
@keyframes fxLivGlow { 0%, 100% { box-shadow: 0 0 0 rgba(255, 150, 40, 0); } 50% { box-shadow: 0 0 14px rgba(255, 150, 40, .85); } }
/* 지방: 버너 불빛이 일렁이고, 지방 탱크가 데워지고, 불티가 튐 */
.fx-fat { left: 24%; top: 68%; width: 54%; height: 16%; border-radius: 45%; background: radial-gradient(55% 90% at 80% 50%, rgba(255, 130, 20, .55), rgba(255, 130, 20, 0)); opacity: var(--fat); animation: fxWarm 2.2s ease-in-out infinite; }
@keyframes fxWarm { 0%, 100% { opacity: calc(var(--fat) * .45); } 50% { opacity: var(--fat); } }
.fx-flame { left: 68%; top: 75%; width: calc(12% + 24% * var(--fat)); aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -62%); background: radial-gradient(closest-side, rgba(255, 200, 60, .75), rgba(255, 120, 20, .4) 55%, rgba(255, 110, 0, 0)); opacity: var(--fat); animation: fxFlick .45s ease-in-out infinite alternate; }
@keyframes fxFlick { from { transform: translate(-50%, -62%) scale(.85, .92); } to { transform: translate(-50%, -68%) scale(1.08, 1.14); } }
.fx-ember { left: 62%; top: 50%; width: 12%; height: 24%; opacity: var(--fat); }
.fx-ember i { position: absolute; bottom: 0; width: 16%; aspect-ratio: 1; min-width: 5px; border-radius: 50%; background: #ffcf5a; box-shadow: 0 0 6px #ff7a00; animation: fxEmber 1.5s ease-out infinite; }
.fx-ember i:nth-child(1) { left: 30%; }
.fx-ember i:nth-child(2) { left: 60%; animation-delay: .5s; }
.fx-ember i:nth-child(3) { left: 45%; animation-delay: 1s; }
@keyframes fxEmber { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(-140%, -700%); opacity: 0; } }
/* 간 → 뇌: 주황 = 포도당, 파랑 = 케톤 */
.fx-lane { left: 38%; top: 13%; width: 14%; height: 32%; }
.fx-lane i { position: absolute; width: 18%; aspect-ratio: 1; min-width: 7px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); animation: fxUp 2.6s ease-in infinite; }
.fx-lane .g { background: #ff9f1c; box-shadow: 0 0 6px rgba(255, 140, 0, .95); opacity: var(--glu); }
.fx-lane .k { background: #3d8fe0; box-shadow: 0 0 7px rgba(60, 140, 230, 1); opacity: var(--ket); }
.fx-lane .g:nth-child(2) { animation-delay: .87s; }
.fx-lane .g:nth-child(3) { animation-delay: 1.73s; }
.fx-lane .k:nth-child(4) { animation-delay: .43s; }
.fx-lane .k:nth-child(5) { animation-delay: 1.3s; }
.fx-lane .k:nth-child(6) { animation-delay: 2.16s; }
@keyframes fxUp { 0% { left: 5%; top: 100%; scale: .6; filter: opacity(0); } 15% { filter: opacity(1); } 85% { filter: opacity(1); } 100% { left: 70%; top: 0; scale: 1; filter: opacity(0); } }
/* 뇌: 케톤이 많을수록 파랗게 빛남 */
.fx-brain { left: 30%; top: 2%; width: 40%; height: 17%; border-radius: 50%; background: radial-gradient(closest-side, rgba(80, 150, 255, .45), rgba(80, 150, 255, 0)); opacity: var(--ket); animation: fxBrain 2s ease-in-out infinite; }
@keyframes fxBrain { 0%, 100% { transform: scale(.92); } 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .fx * { animation: none !important; } .fx-bub, .fx-ember, .fx-lane, .fx-sto { display: none; } }

/* ISSUE-013: 단식·운동 화면에서도 띠 폭을 내용과 같게 */
#app:has(> .fastview) > .fbanner, #app:has(> .woview) > .fbanner { max-width: 560px; }
/* ISSUE-014: 띠가 여러 개일 때 작게 */
.fbanner.mini { padding: 8px 14px; margin-bottom: 8px; border-radius: 13px; font-size: 14px; gap: 8px; }
.fbanner.mini b, .fbanner.idle.mini b, .fbanner.rend.mini b { font-size: 15px; }
.fbanner.mini span { font-size: 16px; }
.fbanner.mini i { font-size: 16px; }
.fbanner.mini em { font-size: 13px; }
/* ISSUE-015: 아침 팝업으로 끝낸 단식 결과 */
.fbdone { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, #eef0ff, #e6e1ff); border: 1px solid #d6d2fb; color: #3a3f8c; animation: rise .25s ease both; }
.fbdone.cancel { background: var(--card); border-color: var(--line); color: var(--muted); }
.fbdone > span { font-size: 26px; }
.fbdone p { flex: 1; margin: 0; min-width: 0; word-break: keep-all; }
.fbdone b { display: block; font-size: 16px; }
.fbdone small { display: block; font-size: 13px; opacity: .85; margin-top: 2px; }
.fbdone .link { display: inline-block; margin-top: 4px; padding: 0; white-space: nowrap; font-size: 14px; }
.fbdone { align-items: flex-start; }
.fbdone-x { border: 0; background: none; color: inherit; font-size: 16px; padding: 4px 6px; opacity: .6; cursor: pointer; }

/* ISSUE-017: 기록 칸 범위 안내 */
.ex-row:has(> .in-err) { flex-wrap: wrap; }
.in-err { flex-basis: 100%; margin: 6px 0 0; text-align: center; font-size: 13px; font-weight: 600; color: #b4441c; word-break: keep-all; }

/* ---------- 친구에게 단식 공유 ---------- */
body.shared nav.tabs, body.shared .modes, body.shared #printBtn { display: none; }
.shareview { max-width: 560px; margin: 0 auto; }
.shareview > .card { margin-bottom: 14px; }
.sh-hero { background: linear-gradient(160deg, #f3f1ff, #fff 60%); }
.sh-status { margin-top: 14px; }
.sh-status > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.sh-status b { font-size: 32px; font-variant-numeric: tabular-nums; color: #3a3f8c; }
.sh-status span { font-size: 15px; font-weight: 700; color: #5848c8; }
.sh-status .ex-prog-bar i { background: #6b5bd6; }
.sh-status small { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.sh-story h2 { display: flex; align-items: center; gap: 8px; font-size: 20px; margin: 4px 0 8px; word-break: keep-all; }
.sh-story h2 span { font-size: 28px; }
.sh-story p:last-child { margin: 0; font-size: 16px; line-height: 1.7; word-break: keep-all; }
.sh-safe { margin: 10px 0 0; font-size: 13px; color: var(--muted); word-break: keep-all; }
.sh-intro ul { list-style: none; margin: 10px 0 14px; padding: 0; display: grid; gap: 10px; }
.sh-intro li { display: flex; gap: 10px; align-items: flex-start; }
.sh-intro li > span { font-size: 22px; line-height: 1.2; }
.sh-intro li b { display: block; font-size: 15px; }
.sh-intro li small { display: block; font-size: 13px; color: var(--muted); word-break: keep-all; }
.sh-intro .ex-quick { width: 100%; }
.fjoin { max-width: 560px; margin: 14px auto 0; }
.fjoin .muted { margin: 4px 0 12px; word-break: keep-all; }
.ex-go.share { margin-top: 14px; background: linear-gradient(135deg, #ff8a5c, #ff5f7e); box-shadow: 0 8px 20px rgba(255, 95, 126, .25); color: #fff; }
.fbuddy { margin: 8px 0 0; padding: 8px 12px; border-radius: 12px; background: #fff1f4; color: #b0325a; font-size: 14px; text-align: center; word-break: keep-all; }
.sh-name { display: grid; gap: 6px; margin: 14px 0 6px; font-size: 14px; font-weight: 700; }
.sh-name input { width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; font: inherit; font-size: 17px; background: var(--bg); color: var(--ink); }
.sh-name input:focus { outline: none; border-color: #6b5bd6; }
.sh-sub { margin: 0 0 14px !important; text-align: left; font-size: 13px !important; word-break: keep-all; }
#shareDlg .ex-quick { width: 100%; margin-top: 8px; }
.sh-msg { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--accent); word-break: keep-all; }
.sh-msg p { margin: 0 0 6px; color: var(--ink); font-weight: 500; }
.sh-url { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }

/* ISSUE-020: 먹은 양 칸 안내 / ISSUE-021: 백업 불러오기 확인 */
.d-edit .in-err { text-align: left; margin: 6px 0 2px; }
.im-sub { margin: 12px 0 14px !important; text-align: left; line-height: 1.6; word-break: keep-all; }
#importDlg .ex-quick { width: 100%; margin-top: 8px; }

/* ISSUE-022: 내가 보낸 링크 미리 보기 */
.sh-own { margin: 0 0 12px; padding: 8px 12px; border-radius: 12px; background: #fff6e8; color: #a8620f; font-size: 14px; font-weight: 700; word-break: keep-all; }

/* ISSUE-026: 잘못된 공유 링크 안내 (도전 탭 폭에 맞춤) */
#app:has(> .diary) > .alert, #app:has(> .dayview) > .alert { max-width: 560px; margin-left: auto; margin-right: auto; }

/* ---------- 딱 3일 계단 단식: 오늘의 단식 ---------- */
.if-hero .ch-day { position: relative; overflow: hidden; }

.if-line { position: relative; height: 16px; margin: 14px 0 4px; border-radius: 99px; background: linear-gradient(90deg, #5848c8, #7a6be0); overflow: visible; }
.if-line .eat { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, #3fb37f, #2fa36f); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.if-nowmark { position: absolute; top: -5px; bottom: -5px; width: 4px; margin-left: -2px; border-radius: 4px; background: #ff7a45; box-shadow: 0 0 0 2px #fff; }
.if-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.if-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 8px 0 0; font-size: 13px; font-weight: 700; }
.if-legend .e { color: #23845b; }
.if-legend .f { color: #5848c8; }
.if-now h2 { margin: 2px 0 4px; font-size: 21px; }
.if-now .if-sub { margin: 0 0 12px; color: var(--muted); font-size: 14px; word-break: keep-all; }
.if-now .ex-go + .ex-go { margin-top: 10px; }
.if-now.fasting { background: linear-gradient(160deg, #f1efff, #fff 70%); }
.if-now.eat { background: linear-gradient(160deg, #eaf7f0, #fff 70%); }
.if-bar { margin: 8px 0; }
.if-bar i { background: linear-gradient(90deg, #8f7cf0, #5848c8) !important; }
.if-missions h2, .if-tips h2 { font-size: 18px; margin: 0 0 10px; }
.if-m { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.if-m:first-of-type { border-top: 0; }
.if-m:has(.if-when), .if-m:has(.if-hadj) { flex-wrap: wrap; }
.if-when { flex-basis: 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin: 2px 0 0; padding: 9px 12px; border-radius: 12px; background: var(--bg); font-size: 13px; color: var(--muted); }
.if-m .if-when b { display: inline; font-size: 13px; color: var(--ink); font-weight: 700; }
.if-when i { font-style: normal; }
.if-when em { margin-left: auto; font-style: normal; font-weight: 700; color: var(--accent); }
.if-m > div { flex: 1; min-width: 0; }
.if-m b { display: block; font-size: 15px; }
.if-m small { display: block; font-size: 13px; color: var(--muted); word-break: keep-all; margin-top: 2px; }
.if-m .d-bar { margin-top: 6px; }
.if-m > .if-hadj { flex: 0 0 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 2px 0 0; }
.if-hadj > button:not(.link) { white-space: nowrap; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card, #fff); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.if-hadj > button:disabled { opacity: .4; cursor: default; }
.if-hadj > span { flex: 1; min-width: 92px; text-align: center; }
.if-hadj > span b { display: block; font-size: 16px; }
.if-hadj > span small { margin-top: 0; }
.if-hadj .link { flex-basis: 100%; text-align: center; }
.if-m .link { white-space: nowrap; font-size: 13px; }
.if-mi { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bg); font-size: 20px; }
.if-m.done .if-mi { background: var(--accent); color: #fff; font-weight: 800; font-size: 18px; }
.if-m.done b { color: var(--accent); }
.if-tips ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.if-tips li { display: flex; gap: 10px; align-items: center; font-size: 14px; word-break: keep-all; }
.if-tips li span { font-size: 20px; }
.next-goal.lvl { background: #f1efff; color: #3a3f8c; }
.if-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; margin-top: 12px; padding: 10px 12px; border: 0; border-radius: 12px; font: inherit; font-size: 14px; font-weight: 700; text-align: left; cursor: pointer; }
.if-chip.eat { background: #eaf7f0; color: #1d6e4c; }
.if-chip.before, .if-chip.after { background: #f1efff; color: #4a3fb0; }
.if-chip i { font-style: normal; font-size: 18px; }

/* ISSUE-028: 어젯밤부터 재기 */
.if-now.before .ex-quick { width: 100%; margin-top: 8px; }
.if-now.before .ex-quick + .ex-go { margin-top: 10px; }

/* ---------- 하단 탭: 홈 · 기록 · (단식) · 함께 · 나 ---------- */
.tabs .nav-fast { overflow: visible; }
.tabs .navfab { display: grid; place-items: center; width: 54px; height: 54px; margin-top: -24px; border-radius: 50%; background: linear-gradient(135deg, #7a6be0, #5848c8); color: #fff; border: 4px solid var(--card); box-shadow: 0 6px 16px rgba(88, 72, 200, .35); font-style: normal; }
.tabs .navfab svg { width: 26px; height: 26px; stroke: #fff; }
.tabs .nav-fast.on { color: #5848c8; }
.tabs .nav-fast.on .navfab { background: linear-gradient(135deg, #8f7cf0, #4a3ab8); }
.tabs .nav-fast.live .navfab { animation: navPulse 2.2s ease-in-out infinite; }
@keyframes navPulse { 0%, 100% { box-shadow: 0 6px 16px rgba(88, 72, 200, .35), 0 0 0 0 rgba(122, 107, 224, .45); } 50% { box-shadow: 0 6px 16px rgba(88, 72, 200, .35), 0 0 0 8px rgba(122, 107, 224, 0); } }
@media (prefers-reduced-motion: reduce) { .tabs .nav-fast.live .navfab { animation: none; } }
.mesub { display: flex; gap: 6px; max-width: 560px; margin: 0 auto 14px; padding: 4px; border-radius: 14px; background: var(--card); box-shadow: 0 1px 0 var(--line); overflow-x: auto; scrollbar-width: none; }
.mesub button { flex: 1; white-space: nowrap; padding: 9px 8px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.mesub button.on { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 380px) {
  .mesub { gap: 2px; }
  .mesub button { padding: 9px 4px; font-size: 13px; letter-spacing: -0.02em; }
}
.home-tiles { margin: 0 0 12px; }
.home-tiles button { background: var(--card); border: 0; border-radius: 14px; padding: 12px 6px; text-align: center; font: inherit; color: var(--ink); cursor: pointer; box-shadow: 0 1px 0 var(--line); }
.home-tiles b { font-size: 20px; }
.home-tiles b i { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.d-menu { width: 100%; margin: 0 0 14px; }
.menu-back { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.menu-back small { color: var(--muted); font-size: 13px; }
.c-invite { margin-top: 14px; }
.c-invite h2 { font-size: 18px; margin: 0 0 6px; }
.c-invite .muted { margin: 0 0 12px; word-break: keep-all; }
.c-invite .ex-quick { width: 100%; margin-top: 10px; }

/* ---------- 함께: 단식 친구 ---------- */
.bd-hero .sh-name { margin-top: 10px; }
.bd-privacy { margin: 12px 0 0; font-size: 12px; color: var(--muted); word-break: keep-all; }
.bd-box { margin-bottom: 14px; }
.bd-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.bd-head h2 { margin: 0; font-size: 19px; }
.bd-head h2 b { color: var(--accent); }
.bd-head .link { font-size: 13px; }
.bd-rename { display: flex; gap: 6px; align-items: center; }
.bd-rename input { width: 120px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.bd-friend { padding: 12px; margin-top: 10px; border-radius: 16px; background: var(--bg); }
.bd-top { display: flex; align-items: center; gap: 10px; }
.bd-top > div { flex: 1; min-width: 0; }
.bd-top b { display: block; font-size: 16px; }
.bd-top small { display: block; font-size: 13px; color: var(--ink); margin-top: 2px; word-break: keep-all; }
.bd-ava { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #8f7cf0, #5848c8); color: #fff; font-weight: 800; font-size: 18px; }
.bd-fire { font-weight: 800; color: #e0661a; }
.bd-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0 0 52px; }
.bd-ms { display: flex; gap: 6px; flex-wrap: wrap; }
.bd-ms i { font-style: normal; font-size: 12px; padding: 3px 8px; border-radius: 99px; background: var(--card); color: var(--muted); }
.bd-ms i.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.bd-lv { font-size: 12px; font-weight: 700; color: #5848c8; }
.bd-ago { font-size: 12px; color: var(--muted); margin-left: auto; }
.bd-acts { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 0 52px; }
.bd-acts .ex-quick { margin: 0; }
.bd-un { font-size: 12px; color: var(--muted); }
.bd-part { margin: 10px 0 0; padding: 14px; border-radius: 14px; background: var(--card); text-align: center; word-break: keep-all; animation: rise .25s ease both; }
.bd-part-emo { display: block; font-size: 34px; line-height: 1; animation: bdSway 2.4s ease-in-out infinite; }
.bd-part b { display: block; margin-top: 8px; font-size: 16px; }
.bd-part small { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.bd-part-acts { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.bd-part-acts .ex-quick { margin: 0; }
.bd-bye { animation: bdFly .7s ease-in forwards; pointer-events: none; }
.bd-undo { font-size: 13px; font-weight: 700; margin-left: 4px; }
@keyframes bdSway { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-5px) rotate(6deg); } }
@keyframes bdFly { 0% { transform: none; opacity: 1; } 25% { transform: translateY(4px) rotate(-1deg); } 100% { transform: translateY(-90px) rotate(4deg) scale(.85); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bd-part-emo, .bd-bye, .bd-part { animation: none; } .bd-bye { opacity: .3; } }
.bd-stickers { margin: 10px 0 0; }
.bd-slot { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; padding: 12px; border: 2px dashed var(--line); border-radius: 16px; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.bd-slot > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 22px; font-weight: 800; }
.bd-slot b { display: block; }
.bd-slot small { display: block; font-size: 13px; color: var(--muted); word-break: keep-all; }
.bd-slot:hover { border-color: var(--accent); }
.bd-inbox h2 { font-size: 18px; margin: 0 0 8px; }
.bd-inbox ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bd-inbox li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: var(--bg); font-size: 14px; word-break: keep-all; }
.bd-inbox li.new { background: #fff1f4; }
.bd-inbox li > span { font-size: 22px; }
.bd-inbox q { color: var(--muted); }
.bd-inbox small { display: block; font-size: 12px; color: var(--muted); }
.bd-as { margin: 10px 0; font-size: 15px; }
/* 하단 탭: 가로 스크롤(overflow-x)이 세로도 잘라 가운데 단식 버튼 윗부분이 잘리던 문제 → 탭 5개라 스크롤 없이 */
nav.tabs .tabs-in { overflow: visible; }
nav.tabs { -webkit-transform: translateZ(0); transform: translateZ(0); }
/* 화면 위 전환 버튼 줄이 없어진 뒤 첫 카드가 머리글에 붙지 않게 */
body:not(.onboarding) #app { padding-top: 16px; }
.home-tiles { margin: 0 0 16px; gap: 10px; }
.home-tiles button { padding: 16px 8px 14px; }
.home-tiles small { display: block; margin-top: 4px; }

/* 오늘의 단식: 날짜 칸 (n일째 · 시간 · 계단 · 날짜) */
.if-hero .ch-day.if-dchip { overflow: visible; gap: 4px; padding: 10px 4px 9px; }
.if-hero .ch-day.if-dchip::after { content: none; }
.if-dnum { font-size: 11px; font-weight: 700; color: var(--muted); }
.if-dchip b { font-size: 21px; line-height: 1; font-variant-numeric: tabular-nums; }
.if-dchip b i { font-style: normal; font-size: 12px; font-weight: 700; margin-left: 1px; color: var(--muted); }
.if-dchip.on b, .if-dchip.on b i { color: #5848c8; }
.if-dchip.on { border-color: #7a6be0; background: #f3f1ff; }
.if-stairs { display: flex; align-items: flex-end; gap: 3px; height: 14px; }
.if-stairs i { width: 7px; border-radius: 2px; background: var(--line); }
.if-stairs i:nth-child(1) { height: 6px; }
.if-stairs i:nth-child(2) { height: 10px; }
.if-stairs i:nth-child(3) { height: 14px; }
.if-stairs i.f { background: #a99cf3; }
.if-dchip.on .if-stairs i.f { background: #5848c8; }
.if-dchip.ok .if-stairs i.f { background: var(--accent-2); }
.if-dchip.ok { border-color: var(--accent); }
.if-dchip.ok.on { background: var(--accent-soft); }
.if-dchip.ok.on b, .if-dchip.ok.on b i { color: var(--accent); }
.if-badge { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; line-height: 1; display: grid; place-items: center; }
.if-today { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: #ff7a45; box-shadow: 0 0 0 3px rgba(255, 122, 69, .2); }
.if-dchip b { white-space: nowrap; }
.if-badge { top: -7px; right: -7px; width: 22px; height: 22px; font-size: 12px; box-shadow: 0 0 0 3px var(--card); }
.if-today { top: -4px; right: -4px; width: 12px; height: 12px; box-shadow: 0 0 0 3px var(--card); }
@media (max-width: 360px) {
  .if-dchip b { font-size: 18px; }
  .if-dchip b i { font-size: 11px; }
  .if-dchip small { font-size: 10px; }
}

/* ---------- 아침 공복 체중 ---------- */
.hw-card { margin-bottom: 14px; background: linear-gradient(160deg, #fff8e8, #fff 70%); }
.hw-card .ex-hero-top h2 { font-size: 18px; word-break: keep-all; }
.hw-card .w-step { margin: 14px 0 10px; }
.hw-card .ex-quick { width: 100%; }
.hw-push { display: block; margin: 10px auto 0; font-size: 14px; }
.push-card { max-width: 560px; margin: 0 auto 14px; }
.push-row { display: flex; align-items: center; gap: 12px; }
.push-row > div { flex: 1; min-width: 0; }
.push-row b { display: block; font-size: 15px; word-break: keep-all; }
.push-row small { display: block; font-size: 13px; color: var(--muted); word-break: keep-all; }
.push-ic { font-size: 24px; }
.push-row .ex-quick { width: auto; flex: none; margin: 0; padding: 10px 18px; white-space: nowrap; }
.push-test { display: block; margin-top: 8px; font-size: 13px; }
.push-time { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.push-time select { min-width: 0; padding: 8px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); font: inherit; font-weight: 700; color: var(--ink); }
.push-time select:focus { border-color: var(--accent); outline: none; }

/* ---------- 첫 진입: 갈림길·하루 칼로리 결과 (2026-10-18) ---------- */
.intro-kicker { margin: 0 0 6px; font-weight: 800; color: var(--accent); }
.path-opts { display: grid; gap: 12px; margin-top: 18px; }
.path-opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border: 2px solid var(--line); border-radius: 20px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
.path-opt:hover, .path-opt:focus-visible { border-color: var(--accent); }
.path-opt:active { transform: scale(.98); }
.path-ic { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); font-size: 24px; }
.path-t { flex: 1; min-width: 0; }
.path-t b { display: block; font-size: 17px; }
.path-t small { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.path-opt > i { font-style: normal; font-size: 22px; color: var(--muted); }
.path-note { margin: 10px 4px 0; font-size: 13px; color: var(--muted); word-break: keep-all; }
.path-trust { list-style: none; margin: 18px 0 0; padding: 14px 16px; display: grid; gap: 8px; border-radius: 16px; background: var(--card); }
.path-trust li { display: flex; gap: 8px; font-size: 13px; line-height: 1.6; color: var(--muted); word-break: keep-all; }
.br-card { display: flex; flex-direction: column; gap: 10px; padding: 22px 20px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.br-chip { align-self: flex-start; padding: 5px 11px; border-radius: 99px; background: var(--bg); color: var(--muted); font-size: 13px; font-weight: 700; }
.br-lbl { margin: 0; color: var(--muted); }
.br-num { margin: 0; display: flex; align-items: baseline; gap: 6px; }
.br-num b { font-size: 52px; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.br-num small { font-size: 18px; font-weight: 700; color: var(--muted); }
.br-track { position: relative; height: 12px; border-radius: 99px; background: var(--bg); }
.br-track i { position: absolute; left: 18%; right: 18%; top: 0; bottom: 0; border-radius: 99px; background: var(--accent-soft); animation: brOpen .5s .3s ease-out both; }
.br-track em { position: absolute; left: calc(50% - 2px); top: -4px; width: 4px; height: 20px; border-radius: 2px; background: var(--accent); }
.br-ends { position: relative; display: flex; justify-content: center; margin-top: 6px; font-size: 12px; color: var(--muted); }
.br-ends span:first-child { position: absolute; left: 18%; transform: translateX(-50%); }
.br-ends span:last-child { position: absolute; right: 18%; transform: translateX(50%); }
@keyframes brOpen { from { left: 50%; right: 50%; } }
.br-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.br-tiles > div { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: 18px; background: var(--card); }
.br-tiles small { font-size: 12px; color: var(--muted); word-break: keep-all; }
.br-tiles b { font-size: 20px; font-weight: 800; }
.br-tiles .goal { background: var(--accent-soft); }
.br-tiles .goal b, .br-tiles .goal small { color: var(--accent); }
.br-how { margin-top: 12px; padding: 12px 16px; border-radius: 18px; background: var(--card); }
.br-how summary { cursor: pointer; font-weight: 700; min-height: 28px; }
.br-how p { margin: 8px 0 0; font-size: 14px; line-height: 1.7; color: var(--muted); word-break: keep-all; }
.br-add { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 14px 16px; border: 2px dashed var(--line); border-radius: 18px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.br-add b { display: block; font-size: 15px; }
.br-add small { display: block; font-size: 13px; color: var(--muted); }
.hw-ask .c-lead { margin: 8px 0 12px; }
.hw-row { display: flex; gap: 8px; }
.hw-in { flex: 1; display: flex; align-items: center; height: 52px; padding: 0 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--card); }
.hw-in input { width: 100%; border: 0; background: none; font: inherit; font-size: 18px; font-weight: 700; color: var(--ink); }
.hw-in input:focus { outline: none; }
.hw-in:focus-within { border-color: var(--accent); }
.hw-in span { color: var(--muted); }
.hw-later { min-width: 84px; }
@media (prefers-reduced-motion: reduce) { .br-track i { animation: none; } }
.path-trust, .br-card, .br-tiles > div, .br-how, .br-add { text-align: left; }

/* 홈 맨 위 오늘의 미션 */
.today-mission { position: relative; overflow: hidden; margin-bottom: 12px; padding: 20px; color: #fff; background: linear-gradient(150deg, #4a3bb8, #6c5ce0 60%, #8a7cf0); box-shadow: 0 10px 28px rgba(74, 59, 184, .30); }
.today-mission::after { content: ''; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none; }
.today-mission.tm-eat { background: linear-gradient(150deg, #1d7a52, #2a9a6a 60%, #3fb37f); box-shadow: 0 10px 28px rgba(35, 132, 91, .28); }
.today-mission.tm-done { background: linear-gradient(150deg, #1d7a52, #2a9a6a); box-shadow: 0 10px 28px rgba(35, 132, 91, .28); }
.tm-eye { margin: 0; font-size: 15px; font-weight: 800; opacity: .92; }
.tm-big { margin: 6px 0 0; font-size: 40px; line-height: 1.15; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; word-break: keep-all; }
.tm-sub { margin: 8px 0 0; font-size: 16px; font-weight: 600; opacity: .95; word-break: keep-all; }
.tm-prog { margin-top: 14px; height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.tm-prog i { display: block; height: 100%; border-radius: 99px; background: #fff; transition: width .4s; }
.tm-go { display: block; width: 100%; min-height: 50px; margin-top: 16px; border: 0; border-radius: 14px; background: #fff; color: #4a3bb8; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.today-mission.tm-eat .tm-go { color: #1d7a52; }
.tm-plan { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 16px 0 0; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .25); font-size: 13px; opacity: .92; }
.tm-plan b { margin-left: auto; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, .2); font-weight: 800; white-space: nowrap; }
.tm-link { display: block; margin: 10px auto 0; padding: 6px 10px; border: 0; background: none; color: #fff; font: inherit; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; opacity: .9; cursor: pointer; }
@media (max-width: 340px) { .tm-big { font-size: 34px; } }

/* 끼니 먹은 시간: 저장 전 고르기 · 저장 뒤 고치기 */
.d-when { margin: 0 0 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg); }
.d-when > p { margin: 0 0 8px; font-weight: 800; font-size: 14px; }
.d-when .d-at-in { margin-top: 8px; }
.d-when-err { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--danger-ink); }
.d-done[disabled] { opacity: .5; cursor: not-allowed; }
.d-when-done { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; padding: 10px 14px; border-radius: 14px; background: var(--bg); font-size: 14px; color: var(--muted); }
.d-when-done b { color: var(--ink); font-size: 16px; font-variant-numeric: tabular-nums; }
.d-when-done .link { font-size: 14px; white-space: nowrap; }
.today-mission.tm-eat .tm-sub { font-size: 18px; font-weight: 800; }
/* 컴퓨터 화면: 함께·나 탭도 다른 탭처럼 560px 가운데 */
#app:has(> .mesub) > *, #app:has(> .c-hero) > *, #app:has(> .bd-box) > *, #app:has(> .c-invite) > * { max-width: 560px; margin-left: auto; margin-right: auto; }

/* 개인정보 동의 체크 (로그인 창) · 계정 삭제 · 문서 링크 */
.consent { display: grid; gap: 6px; margin: 2px 0 4px; }
.consent label { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; line-height: 1.45; color: var(--ink); word-break: keep-all; }
.consent input { width: auto; margin: 2px 0 0; padding: 0; flex: none; accent-color: var(--accent); }
.consent a { color: var(--accent); }
.acctpop #consentForm { display: grid; gap: 8px; }
.acctpop { max-height: calc(100vh - 90px); overflow: auto; }
.acct-del { display: block; margin-top: 10px; color: #b3412f; font-size: 13px; text-align: left; }
.acct-legal { margin-top: 14px; font-size: 12px; }
.acct-legal a, .bd-privacy a, .foot a { color: var(--accent); }
.bd-privacy { font-size: 12px; margin: 4px 0 8px; }
.acctpop form button.ghost { background: none; color: var(--muted); border: 1px solid var(--line); font-weight: 600; margin: 0; }
.top .acctpop p { display: block; white-space: normal; overflow: visible; } /* 휴대폰에서 .top p를 숨기는 규칙이 계정 창 안내·오류 문구까지 숨기지 않게 */

/* 카카오 로그인 (카카오 디자인 가이드: 노란 #FEE500, 글자 85% 검정, 말풍선 심볼) · 이름·비밀번호 로그인은 접어 둠 */
.acctpop .acct-lead { font-size: 13px; color: var(--muted); line-height: 1.45; word-break: keep-all; }
.acctpop form button.kakao-btn { display: flex; align-items: center; justify-content: center; gap: 6px; background: #FEE500; color: rgba(0, 0, 0, .85); padding: 11px 10px; font-size: 15px; border-radius: 12px; }
.kakao-btn svg { width: 18px; height: 18px; fill: #000; flex: none; }
.pw-login { font-size: 12px; color: var(--muted); }
.pw-login summary { cursor: pointer; padding: 4px 0; list-style: none; text-align: center; text-decoration: underline; }
.pw-login summary::-webkit-details-marker { display: none; }
.pw-login[open] { display: grid; gap: 8px; }
.pw-login[open] summary { text-decoration: none; }
.logo { overflow: hidden; } .logo img { width: 100%; height: 100%; display: block; } /* 앱 아이콘(3일 링 + 달)과 같은 그림 */
/* 로그인 동의: '모두 동의' 한 줄을 굵게, 아래 3개는 들여 씀 */
.consent .consent-all { font-size: 14px; font-weight: 800; padding: 8px 10px; border-radius: 10px; background: var(--bg); }
.consent .consent-all ~ label { padding-left: 10px; color: var(--muted); }
