:root {
  --bg: #0e0f11; --card: #17191c; --card2: #202327; --card3: #2a2e33; --line: #2a2e33;
  --ink: #f4f5f6; --dim: #a1a7ae; --faint: #6c737b;
  --lime: #b8f53d; --lime-ink: #10140a; --lime-soft: rgba(184, 245, 61, .13);
  --coral: #ff6b4a; --coral-soft: rgba(255, 107, 74, .14);
  --sky: #56b4ff; --amber: #ffc247;
  --r: 20px; --r2: 14px; --tap: 46px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font, "Pretendard Variable"), "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  font-size: 16px; line-height: 1.45; font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; word-break: keep-all;
}
::selection { background: var(--lime); color: var(--lime-ink); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 6px; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
input { caret-color: var(--lime); }
h1, h2, h3, p { margin: 0; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

#col { max-width: 520px; margin: 0 auto; padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
#main { outline: none; display: grid; gap: 12px; }

/* 위쪽 */
#top { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: calc(14px + env(safe-area-inset-top)) 0 12px;
  display: flex; align-items: center; gap: 2px; }
#top::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px; background: linear-gradient(var(--bg), transparent); pointer-events: none; }
#top .date { flex: 1; min-width: 0; }
#top h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.15; }
#top .sub { font-size: .8125rem; color: var(--dim); font-weight: 500; }
.iconbtn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: var(--card); border-radius: 50%; color: var(--ink); transition: background .15s; }
.iconbtn:hover { background: var(--card2); }
.iconbtn:disabled { color: var(--faint); background: none; cursor: default; }
.iconbtn + .iconbtn { margin-left: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--card); font-size: .8125rem; font-weight: 700; margin-right: 8px; border: 0; }
.pill b { color: var(--lime); font-weight: 800; }

/* 탭 */
#tabs { position: fixed; z-index: 10; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); width: min(calc(100% - 24px), 496px);
  display: flex; background: rgba(32, 35, 39, .92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-radius: 24px; padding: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
#tabs button { flex: 1; height: 52px; border: 0; background: none; color: var(--faint); border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .6875rem; font-weight: 700; transition: color .15s, background .15s; }
#tabs button:hover { color: var(--ink); }
#tabs button[aria-current="page"] { color: var(--lime-ink); background: var(--lime); }
/* ───── 웹(넓은 화면) 전용 배치 ───── */
@media (min-width: 960px) {
  #app { display: grid; grid-template-columns: 240px 1fr; }
  #tabs { position: sticky; top: 0; left: auto; bottom: auto; transform: none; width: auto; height: 100dvh; flex-direction: column; gap: 4px; border-radius: 0;
    background: var(--card); backdrop-filter: none; box-shadow: none; padding: 30px 16px; }
  #tabs::before { content: "건강관리"; font-size: 1.375rem; font-weight: 800; letter-spacing: -0.03em; padding: 0 14px 26px; }
  #tabs button { flex: none; height: 48px; flex-direction: row; justify-content: flex-start; gap: 14px; padding: 0 16px; font-size: .9375rem; border-radius: var(--r2); }
  #tabs button:hover { background: var(--card2); }
  #tabs button[aria-current="page"]:hover { background: var(--lime); }
  #col { max-width: 1360px; margin: 0; padding: 0 36px 56px; width: 100%; }
  #top { padding-top: 26px; padding-bottom: 18px; }
  #top h1 { font-size: 1.875rem; }
  #main { grid-template-columns: repeat(12, 1fr); gap: 18px; align-items: stretch; }
  #main > * { grid-column: span 12; }
  #main > .c3 { grid-column: span 3; } #main > .c4 { grid-column: span 4; } #main > .c5 { grid-column: span 5; }
  #main > .c6 { grid-column: span 6; } #main > .c7 { grid-column: span 7; } #main > .c8 { grid-column: span 8; }
  #main > .wk-parts, #main > .wk-list { grid-column: 1 / span 5; }
  #main > .wk-editor { grid-column: 6 / span 7; grid-row: 1 / span 2; }
  .card { padding: 22px; }
  .gauge { max-width: 340px; }
  .fig { max-width: 420px; }
  .exlist { max-height: 520px; overflow-y: auto; }
  #toast { top: 26px; }
}
@media (min-width: 960px) and (max-width: 1239px) {
  #main > .c3, #main > .c4, #main > .c5, #main > .c6, #main > .c7, #main > .c8 { grid-column: span 6; }
  #main > .c8:first-child, #main > .c12 { grid-column: span 12; }
  #main > .wk-parts, #main > .wk-list { grid-column: 1 / span 6; }
  #main > .wk-editor { grid-column: 7 / span 6; }
}

/* 카드 */
.card { background: var(--card); border-radius: var(--r); padding: 18px; min-width: 0; }
.card > h2 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; min-height: 28px; }
.card > h2 .more { margin-left: auto; font-size: .8125rem; font-weight: 600; color: var(--dim); background: none; border: 0; display: inline-flex; align-items: center; gap: 2px; padding: 6px 0 6px 8px; }
.card > h2 .more:hover { color: var(--ink); }
.card > h2 .more svg { width: 16px; height: 16px; }
.card > h2 .tag { margin-left: auto; font-size: .8125rem; font-weight: 600; color: var(--dim); }
.dim { color: var(--dim); } .small { font-size: .8125rem; }
.row { display: flex; align-items: center; gap: 8px; }
.wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.hscroll { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px; padding: 0 18px 2px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { flex: none; }

/* 칼로리 게이지 */
.gauge { position: relative; width: 100%; max-width: 300px; margin: 0 auto; }
.gauge svg { display: block; width: 100%; height: auto; }
.gauge .arc { transition: stroke-dashoffset .6s cubic-bezier(.16, 1, .3, 1); }
.gauge .mid { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; }
.gauge .mid b { display: block; font-size: 2.75rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.gauge .mid span { font-size: .875rem; color: var(--dim); font-weight: 500; }
.gauge .mid em { display: block; font-style: normal; font-size: .8125rem; font-weight: 700; color: var(--lime); margin-bottom: 4px; }
.gauge .mid em.over { color: var(--coral); }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.macro { background: var(--card2); border-radius: var(--r2); padding: 11px 12px 12px; }
.macro .k { font-size: .75rem; font-weight: 600; color: var(--dim); display: flex; align-items: center; gap: 6px; }
.macro .k i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.macro .v { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; margin-top: 2px; }
.macro .v small { font-size: .75rem; font-weight: 500; color: var(--dim); letter-spacing: 0; }
.bar { height: 5px; background: var(--card3); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--c, var(--lime)); border-radius: 3px; transition: width .4s cubic-bezier(.16, 1, .3, 1); }
.note { font-size: .8125rem; color: var(--dim); margin-top: 12px; }

/* 주간 */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.week button { border: 0; background: none; padding: 4px 0 2px; display: flex; flex-direction: column; align-items: center; gap: 7px; border-radius: 12px; }
.week .dow { font-size: .75rem; color: var(--faint); font-weight: 700; }
.week .today .dow { color: var(--ink); }
.week .dot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--card2); color: var(--dim); font-size: .875rem; font-weight: 700; transition: transform .15s; }
.week button:not(:disabled):hover .dot { transform: scale(1.06); }
.week .done .dot { background: var(--lime); color: var(--lime-ink); }
.week .done .dot svg { width: 20px; height: 20px; stroke-width: 2.6; }
.week .sel .dot { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.week .future .dot { background: none; border: 1.5px dashed var(--card3); color: var(--faint); }
.week .flags { display: flex; gap: 3px; height: 6px; }
.week .flags i { width: 6px; height: 6px; border-radius: 50%; }
.week .flags .d { background: var(--coral); } .week .flags .s { background: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.tile { background: var(--card2); border-radius: var(--r2); padding: 12px; min-width: 0; }
.tile .k { font-size: .75rem; font-weight: 600; color: var(--dim); }
.tile .v { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.2; margin-top: 2px; white-space: nowrap; }
.tile .v small { font-size: .8125rem; font-weight: 600; color: var(--dim); letter-spacing: 0; }
.tile .d { font-size: .75rem; font-weight: 600; color: var(--dim); margin-top: 2px; }
.tile.bad .v { color: var(--coral); }
.segs { display: flex; gap: 3px; margin-top: 9px; }
.segs i { flex: 1; height: 5px; border-radius: 3px; background: var(--card3); }
.segs i.on { background: var(--lime); } .segs.coral i.on { background: var(--coral); }

/* 코칭 */
.coach { border-radius: var(--r); padding: 16px 18px; background: var(--card); display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.coach .ic { grid-row: 1 / span 3; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 194, 71, .15); color: var(--amber); }
.coach.alert .ic { background: var(--coral-soft); color: var(--coral); }
.coach .tp { font-size: .75rem; font-weight: 700; color: var(--amber); }
.coach.alert .tp { color: var(--coral); }
.coach h3 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.02em; grid-column: 2; }
.coach p { font-size: .9375rem; color: var(--dim); grid-column: 2; }
.coach .act { color: var(--ink); font-weight: 600; margin-top: 4px; }
.coach .btn { margin-top: 10px; }

/* 버튼·입력 */
.btn { height: var(--tap); padding: 0 18px; border-radius: 999px; border: 0; background: var(--card2); font-weight: 700; font-size: .9375rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, transform .1s; white-space: nowrap; }
.btn:hover { background: var(--card3); }
.btn:active { transform: scale(.97); }
.btn.pri { background: var(--lime); color: var(--lime-ink); }
.btn.pri:hover { background: #c6fa5e; }
.btn.block { width: 100%; }
.btn.sm { height: 36px; padding: 0 14px; font-size: .8125rem; }
.btn svg { width: 18px; height: 18px; }
.btn:disabled { opacity: .4; cursor: default; }
.chip { height: 40px; padding: 0 15px; border-radius: 999px; border: 0; background: var(--card2); font-size: .9375rem; font-weight: 600; color: var(--ink); transition: background .15s, color .15s; white-space: nowrap; }
.chip:hover { background: var(--card3); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.chip .k { color: var(--dim); font-size: .75rem; font-weight: 600; margin-left: 5px; }
.seg { display: flex; background: var(--card2); border-radius: 999px; padding: 4px; }
.seg button { flex: 1; height: 38px; padding: 0 14px; border: 0; background: none; border-radius: 999px; font-weight: 700; font-size: .875rem; color: var(--dim); transition: background .15s, color .15s; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg button.bad[aria-pressed="true"] { background: var(--coral); color: #fff; }
.seg.sm button { height: 30px; padding: 0 11px; font-size: .75rem; }
input[type=text], input[type=number], input[type=search], input[type=date], input[type=password] {
  height: var(--tap); width: 100%; padding: 0 14px; border: 1.5px solid transparent; border-radius: var(--r2); background: var(--card2); font-weight: 600; transition: border-color .15s; }
input::placeholder { color: var(--faint); font-weight: 500; }
input:focus-visible { outline: none; border-color: var(--lime); }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.8); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--lime); }
label.f { display: block; font-size: .75rem; font-weight: 600; color: var(--dim); min-width: 0; }
label.f > input { margin-top: 6px; color: var(--ink); font-size: 1rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.search { position: relative; }
.search input { height: 52px; padding: 0 100px 0 46px; border-radius: 999px; font-size: 1rem; }
.search > svg { position: absolute; left: 16px; top: 15px; color: var(--dim); }
.search .go { position: absolute; right: 6px; top: 6px; height: 40px; }
.inset { background: var(--card2); border-radius: var(--r2); padding: 14px; }
.inset input[type=text], .inset input[type=number] { background: var(--card3); }

/* 목록 */
ul.list { list-style: none; margin: 0; padding: 0; }
ul.list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
ul.list li:first-child { border-top: 0; padding-top: 2px; }
ul.list li:last-child { padding-bottom: 2px; }
ul.list .t { font-weight: 700; font-size: .9375rem; }
ul.list .m { font-size: .8125rem; color: var(--dim); margin-top: 1px; }
ul.list .n { margin-left: auto; text-align: right; font-weight: 800; white-space: nowrap; letter-spacing: -0.02em; }
ul.list .n small { font-weight: 500; color: var(--dim); font-size: .75rem; letter-spacing: 0; }
ul.list button.pick { all: unset; cursor: pointer; flex: 1; min-width: 0; display: block; }
ul.list button.pick:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; border-radius: 6px; }
.badge { width: 40px; height: 40px; border-radius: 12px; background: var(--card2); display: grid; place-items: center; font-size: .75rem; font-weight: 800; color: var(--lime); flex: none; }
.badge.c { color: var(--sky); }
.del { width: 32px; height: 32px; border-radius: 50%; border: 0; background: none; color: var(--faint); display: grid; place-items: center; flex: none; margin-right: -6px; }
.del:hover { background: var(--card2); color: var(--coral); }
.del svg { width: 16px; height: 16px; }
.empty { color: var(--dim); font-size: .9375rem; text-align: center; padding: 14px 0 6px; }
.empty b { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 2px; }
.setchips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.setchips span { font-size: .75rem; font-weight: 700; background: var(--card2); border-radius: 7px; padding: 3px 7px; white-space: nowrap; }
.setchips span i { font-style: normal; color: var(--dim); font-weight: 500; }

/* 부위 */
.parts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.part { height: 64px; border: 0; border-radius: var(--r2); background: var(--card2); font-weight: 700; font-size: .9375rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; transition: background .15s, color .15s; }
.part:hover { background: var(--card3); }
.part span { font-size: .6875rem; font-weight: 700; color: var(--faint); }
.part.hit span { color: var(--lime); }
.part[aria-pressed="true"] { background: var(--lime); color: var(--lime-ink); }
.part[aria-pressed="true"] span { color: var(--lime-ink); opacity: .7; }

/* 세트 */
.sets .hd, .sets .set { display: grid; grid-template-columns: 26px 1fr 1fr 28px; gap: 8px; align-items: center; }
.sets .hd { font-size: .6875rem; font-weight: 700; color: var(--faint); margin-bottom: 6px; text-align: center; }
.sets .set + .set { margin-top: 8px; }
.sets .no { width: 26px; height: 26px; border-radius: 50%; background: var(--card2); display: grid; place-items: center; font-size: .75rem; font-weight: 800; color: var(--dim); }
.stp { display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; background: var(--card2); border-radius: var(--r2); height: 48px; border: 1.5px solid transparent; transition: border-color .15s; }
.stp:focus-within { border-color: var(--lime); }
.stp button { height: 100%; border: 0; background: none; color: var(--dim); display: grid; place-items: center; border-radius: var(--r2); }
.stp button:hover { color: var(--ink); }
.stp button svg { width: 16px; height: 16px; stroke-width: 2.4; }
.stp input { height: 100%; padding: 0; border: 0; background: none; text-align: center; font-size: 1.125rem; font-weight: 800; letter-spacing: -0.02em; min-width: 0; }
.last { font-size: .8125rem; color: var(--dim); margin: -6px 0 14px; }
.last b { color: var(--ink); font-weight: 700; }
.sum { display: flex; gap: 18px; margin: 14px 0 12px; font-size: .8125rem; color: var(--dim); font-weight: 600; }
.sum b { color: var(--ink); font-weight: 800; font-size: 1rem; margin-right: 3px; }

/* 끼니 */
.meal { display: flex; align-items: center; gap: 10px; margin: 16px 0 2px; }
.meal:first-child { margin-top: 0; }
.meal h3 { font-size: .9375rem; font-weight: 700; }
.meal .kc { font-size: .8125rem; color: var(--dim); font-weight: 600; }
.meal .add { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--card2); display: grid; place-items: center; color: var(--ink); }
.meal .add:hover { background: var(--lime); color: var(--lime-ink); }
.meal .add svg { width: 16px; height: 16px; stroke-width: 2.4; }
.mealempty { font-size: .8125rem; color: var(--faint); padding: 4px 0 2px; }
#calc { font-size: .875rem; color: var(--dim); }
#calc b { color: var(--ink); font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; margin-right: 6px; }

/* 그래프 */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-size: 11px; fill: var(--faint); font-family: inherit; font-weight: 600; }
.chart .v { fill: var(--ink); font-weight: 800; font-size: 13px; }
.chart .g { stroke: var(--line); stroke-width: 1; }
.bigstat { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.bigstat b { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; }
.bigstat b small { font-size: 1rem; font-weight: 600; color: var(--dim); letter-spacing: 0; margin-left: 2px; }
.delta { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 999px; font-size: .75rem; font-weight: 800; background: var(--card2); color: var(--dim); }
.delta.good { background: var(--lime-soft); color: var(--lime); }
.delta.bad { background: var(--coral-soft); color: var(--coral); }
.comp { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; margin: 4px 0 12px; }
.comp i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8125rem; color: var(--dim); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.legend b { color: var(--ink); font-weight: 800; }
.goalbar { position: relative; height: 10px; border-radius: 5px; background: var(--card3); margin: 14px 0 8px; }
.goalbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--lime); }
.goalbar s { position: absolute; top: -4px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--ink); border: 4px solid var(--card); }
.ends { display: flex; justify-content: space-between; font-size: .75rem; font-weight: 600; color: var(--dim); }
.ends b { color: var(--ink); font-weight: 800; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th { text-align: right; font-size: .6875rem; font-weight: 700; color: var(--faint); padding: 0 0 8px 8px; }
td { text-align: right; padding: 10px 0 10px 8px; border-top: 1px solid var(--line); font-weight: 600; }
th:first-child, td:first-child { text-align: left; padding-left: 0; }
td:first-child { color: var(--dim); }
tr.cur td { color: var(--ink); font-weight: 800; }
td.bad { color: var(--coral); } td.good { color: var(--lime); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; color: var(--dim); background: var(--card2); height: 28px; padding: 0 10px; border-radius: 999px; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.status.on { color: var(--lime); } .status.on::before { background: var(--lime); }

video#cam { width: 100%; border-radius: var(--r2); background: #000; aspect-ratio: 4/3; object-fit: cover; display: block; }
#toast { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translate(-50%, -16px); z-index: 20;
  background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-weight: 700; font-size: .875rem; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s cubic-bezier(.16, 1, .3, 1); max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.login { max-width: 320px; margin: 20vh auto 0; }
.login h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 18px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (max-width: 370px) { .grid4 { grid-template-columns: 1fr 1fr; } .tile .v { font-size: 1.25rem; } }

.inset .chip, .inset .seg { background: var(--card3); }

/* 운동 목록·동작 그림 */
.exlist { list-style: none; margin: -4px -8px 0; padding: 0; }
.exrow { width: 100%; display: flex; align-items: center; gap: 14px; padding: 8px; border: 0; background: none; border-radius: 16px; text-align: left; transition: background .15s; }
.exrow:hover { background: var(--card2); }
.exrow[aria-pressed="true"] { background: var(--card2); box-shadow: inset 0 0 0 2px var(--lime); }
.exrow .t { display: block; font-weight: 700; font-size: 1rem; }
.exrow .m { display: block; font-size: .8125rem; color: var(--dim); margin-top: 1px; }
.exrow > svg { color: var(--faint); width: 18px; height: 18px; }
.thumb { width: 60px; height: 60px; border-radius: 14px; object-fit: cover; object-position: center; background: var(--card2); flex: none; display: grid; place-items: center; color: var(--faint); }
.fig { margin: -4px auto 16px; border-radius: 16px; overflow: hidden; background: #17191c; aspect-ratio: 4 / 3; }
.fig video { width: 100%; height: 100%; object-fit: contain; display: block; }
/* 인바디 추이 */
.charthead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.charthead h2 { font-size: 1.0625rem; font-weight: 700; flex: 1; white-space: nowrap; }
.charthead .seg { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.readout { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-height: 44px; margin-bottom: 4px; }
.readout b { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
.readout b small { font-size: .9375rem; font-weight: 600; color: var(--dim); letter-spacing: 0; margin-left: 2px; }
.readout .when { font-size: .875rem; color: var(--dim); font-weight: 600; }
.sparkbtn { display: block; width: 100%; margin: 10px 0 0; padding: 0; border: 0; background: none; border-radius: 10px; }
.sparkbtn:hover { background: var(--card2); }
/* 글꼴 고르기 */
.fonts { display: grid; gap: 8px; }
.fontrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; background: var(--card2); border-radius: var(--r2); text-align: left; min-width: 0; }
.fontrow:hover { background: var(--card3); }
.fontrow[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--lime); }
.fontrow .nm { display: block; font-weight: 700; font-size: 1rem; }
.fontrow .sm { display: block; font-size: .75rem; color: var(--dim); margin-top: 2px; }
.fontrow .ex { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; }
.fontrow .ex small { font-size: .75rem; font-weight: 600; color: var(--dim); }

#tabs[hidden] { display: none; }

@media (min-width: 1400px) { .fonts { grid-template-columns: 1fr 1fr; } }
