/* 아라 X 퀘스트 — 내 몸 기록(#body) 화면 전용 모양
   index.html 의 :root 토큰(--o, --paper, --line …)과 .card · .btn · .k3d · .tap · .pad · .row · .sronly 를 그대로 써요.
   이름은 모두 bdy- 로 시작해서 다른 화면과 겹치지 않아요. */
:root { --bdy-ok: #1F6B40; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bdy-ok: var(--good); } }
:root[data-theme="dark"] { --bdy-ok: var(--good); }

.bdy { padding-bottom: 8px; }
.bdy p { margin: 0; }
.bdy p, .bdy small, .bdy li, .bdy-full p { text-wrap: pretty; }
.bdy h4 { margin: 0; }
.bdy .card { gap: 12px; }
.bdy .btn-sm, .bdy-full .btn-sm { min-height: 46px; } /* 큰 누르기 영역 */

/* ---------- 머리 ---------- */
.bdy-nav { padding: 10px 14px 0; }
.bdy-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-weight: 800; font-size: 14px; color: var(--ink); text-decoration: none; cursor: pointer; }
.bdy-back svg { width: 20px; height: 20px; flex: none; }
.bdy-hd { display: grid; gap: 6px; padding-bottom: 4px; }
.bdy-kick { font-weight: 800; color: var(--o-ink); font-size: 13px; letter-spacing: .02em; }
.bdy-hd h2 { margin: 0; font-size: 24px; font-weight: 900; line-height: 1.3; letter-spacing: -.01em; }
.bdy-hd h2:focus { outline: none; }
.bdy-hd h2:focus-visible { outline: 3px solid var(--o); outline-offset: 4px; border-radius: 6px; }
.bdy-hd p { line-height: 1.55; }

/* ---------- 안내 상자 ---------- */
.bdy-call { padding: 10px 12px; border-radius: 12px; background: var(--o-tint); color: var(--o-ink); font-size: 14px; font-weight: 700; line-height: 1.55; }
.bdy-m { margin: 12px 14px 0 !important; }
.bdy-warn { color: var(--o-ink); font-weight: 700; line-height: 1.55; }
.bdy-err { color: var(--o-ink); font-size: 12.5px; font-weight: 700; line-height: 1.4; }
.bdy-err:empty { display: none; }
.bdy-busy { padding: 18px 12px; border-radius: 14px; border: 2px dashed var(--line); text-align: center; font-weight: 700; color: var(--muted); }
.bdy-ref { white-space: nowrap; }
.bdy-ref a { font-family: var(--f-num); font-size: 11.5px; font-weight: 700; color: var(--o-ink); text-decoration: none; padding: 2px 1px; }

/* ---------- 언제 재나요 ---------- */
.bdy-tl { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bdy-tl li { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.bdy-tl li .bdy-no { margin-bottom: 4px; }
.bdy-tl b { font-size: 15px; }
.bdy-tl small { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
/* 재기 전 체크 7가지 (접는 칸) */
.bdy-pre { border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.bdy-pre summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; padding: 10px 14px; font-size: 14.5px; font-weight: 800; cursor: pointer; list-style: none; border-radius: 14px; }
.bdy-pre summary::-webkit-details-marker { display: none; }
.bdy-pre summary::after { content: '+'; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); color: var(--on-chip); font-family: var(--f-num); font-size: 16px; font-weight: 800; line-height: 1; }
.bdy-pre[open] summary::after { content: '−'; }
.bdy-pre summary:focus { outline: none; }
.bdy-pre summary:focus-visible { outline: 3px solid var(--o); outline-offset: 2px; }
.bdy-pre ol { margin: 0; padding: 0 14px 12px 32px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.55; }
.bdy-no { width: 26px; height: 26px; border-radius: 50%; background: var(--chip); color: var(--on-chip); display: inline-grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; }

/* ---------- 기록 목록 ---------- */
.bdy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bdy-it { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 64px; padding: 8px 10px; text-align: left; background: var(--bg); border: 2px solid var(--line); border-radius: 16px; cursor: pointer; }
.bdy-th { width: 48px; height: 48px; border-radius: 10px; overflow: hidden; background: var(--media-bg); color: #6E6862; display: grid; place-items: center; flex: none; }
.bdy-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bdy-th svg { width: 24px; height: 24px; }
.bdy-itx { flex: 1; min-width: 0; display: grid; gap: 2px; }
.bdy-itx b { font-size: 15px; line-height: 1.35; }
.bdy-itk { font-size: 14px; font-weight: 700; }
.bdy-itx small { font-size: 12.5px; color: var(--muted); }
.bdy-first { font-style: normal; font-size: 11.5px; font-weight: 900; color: var(--o-ink); margin-left: 2px; }
.bdy-chip { flex: none; display: inline-flex; align-items: center; gap: 3px; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; border: 1px solid transparent; }
.bdy-chip svg { width: 13px; height: 13px; }
.bdy-chip.ok { background: var(--good-tint); color: var(--bdy-ok); }
.bdy-chip.diff { background: var(--o-tint); color: var(--o-ink); }
.bdy-chip.part { background: var(--paper); color: var(--muted); border-color: var(--line); }
.card h4 .bdy-chip { font-size: 12px; }

/* ---------- 새로 올리기: 단계 ---------- */
.bdy-sh { margin: 0; font-size: 17px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.bdy-kinds { display: grid; gap: 8px; }
.bdy-kind { position: relative; display: grid; grid-template-columns: 40px 1fr 24px; gap: 10px; align-items: center; min-height: 60px; padding: 10px 12px; border-radius: 16px; border: 2px solid var(--line); background: var(--bg); cursor: pointer; }
.bdy-kind input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.bdy-kind:focus-within { outline: 3px solid var(--o); outline-offset: 2px; }
.bdy-kind:has(input:not(:focus-visible)):focus-within { outline: none; }
.bdy-kind.on { border-color: var(--o); background: var(--o-tint); }
.bdy-ki { width: 40px; height: 40px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; color: var(--o-ink); }
.bdy-ki svg { width: 22px; height: 22px; }
.bdy-kt { display: grid; gap: 2px; min-width: 0; }
.bdy-kt b { font-size: 15.5px; }
.bdy-kt small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.bdy-kind.on .bdy-kt b { color: var(--o-ink); }
.bdy-kc { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); color: transparent; }
.bdy-kc svg { width: 14px; height: 14px; }
.bdy-kind.on .bdy-kc { background: var(--chip); border-color: var(--chip); color: var(--on-chip); }

/* 사진 칸 */
.bdy-slot { display: grid; gap: 8px; }
.bdy-slot h4 { font-size: 15px; font-weight: 900; }
.bdy-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bdy-pick .btn { min-height: 52px; }
.bdy-cvw { border-radius: 16px; overflow: hidden; border: 2px solid var(--line); background: var(--media-bg); display: grid; place-items: center; }
.bdy-cvw.on { border-color: var(--o); }
.bdy-cv { display: block; max-width: 100%; max-height: 62vh; width: auto; height: auto; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.bdy-cvw.on .bdy-cv { touch-action: none; cursor: crosshair; }
.bdy-mhint { padding: 8px 10px; border-radius: 10px; background: var(--o-tint); color: var(--o-ink); font-size: 13.5px; font-weight: 700; line-height: 1.5; }
.bdy-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bdy-tools .btn { min-height: 46px; }

/* 조건 체크 */
.bdy-cks { display: grid; gap: 8px; }
.bdy-ck { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; min-height: 52px; padding: 12px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg); cursor: pointer; }
.bdy-ck input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--o); cursor: pointer; }
.bdy-ck > span { display: grid; gap: 3px; }
.bdy-ck b { font-size: 14.5px; line-height: 1.45; }
.bdy-ck small { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.bdy-ck.on { border-color: var(--good); }
.bdy-cnt { font-size: 13px; font-weight: 800; color: var(--muted); text-align: right; }

/* 입력 칸 */
.bdy-two, .bdy-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; }
.bdy-f { display: grid; gap: 6px; min-width: 0; align-content: start; }
.bdy-f label { font-size: 13.5px; font-weight: 700; color: var(--muted); }
.bdy-f label span { font-weight: 500; }
.bdy-f small.muted { font-size: 12px; }
.bdy-f input { width: 100%; min-width: 0; min-height: 50px; border: 2px solid var(--line); background: var(--bg); border-radius: 12px; padding: 11px 12px; font: inherit; font-size: 17px; font-weight: 700; color: var(--ink); font-family: var(--f-num); }
.bdy-f input:focus { border-color: var(--o); outline: none; }
.bdy-f input:focus-visible { outline: 3px solid var(--o); outline-offset: 1px; }
.bdy-f input[aria-invalid="true"] { border-color: var(--o-deep); }
.bdy-f input[type="date"], .bdy-f input[type="time"] { -webkit-appearance: none; appearance: none; font-size: 16px; }

/* ---------- 비교 · 기록 하나 ---------- */
.bdy-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 0; padding-bottom: 0; }
.bdy-tabs button { flex: 1 1 0; min-width: 0; min-height: 44px; border: 2px solid var(--line); background: var(--paper); border-radius: 12px; padding: 8px 6px; font-weight: 800; font-size: 14px; cursor: pointer; }
.bdy-tabs button.on { border-color: var(--o); background: var(--o-tint); color: var(--o-ink); }
.bdy-cmp { display: grid; gap: 12px; }
.bdy-cond { display: grid; gap: 4px; padding: 12px; border-radius: 14px; font-size: 14px; line-height: 1.55; }
.bdy-cond.diff { background: var(--o-tint); color: var(--o-ink); }
.bdy-cond.diff b { font-size: 15.5px; }
.bdy-cond.part { background: var(--paper); border: 1px dashed var(--line); color: var(--muted); }
.bdy-pairw { display: grid; gap: 6px; }
.bdy-pairw h4, .bdy-h4 { font-size: 15px; font-weight: 900; }
.bdy-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bdy-fig { margin: 0; display: grid; gap: 6px; min-width: 0; }
.bdy-fig img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: var(--media-bg); border: 1px solid var(--line); border-radius: 12px; }
.bdy-fig figcaption { font-size: 13px; font-weight: 700; color: var(--muted); text-align: center; }
.bdy-nop { display: grid; place-items: center; aspect-ratio: 3 / 4; border-radius: 12px; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; font-weight: 700; }
.bdy-one { display: grid; gap: 10px; }
.bdy-one .bdy-fig img { aspect-ratio: auto; max-height: 70vh; }
.bdy-nl { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bdy-nl li { display: grid; gap: 6px; padding: 10px 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.bdy-nh { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
.bdy-nh b { font-size: 15px; }
.bdy-v { font-size: 18px !important; }
.bdy-nv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bdy-nv span { display: grid; gap: 1px; min-width: 0; }
.bdy-nv small { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.bdy-nv b { font-size: 17px; }
.bdy-tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; color: var(--muted); background: var(--paper); border: 1px solid var(--line); line-height: 1.4; }
.bdy-tag.big { color: var(--ink); }
.bdy-tag.diff { background: var(--o-tint); color: var(--o-ink); border-color: transparent; }
.bdy-legend { line-height: 1.6; }
.bdy-ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; line-height: 1.6; font-size: 14.5px; }
.bdy-cl { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bdy-cl li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: start; font-size: 14px; line-height: 1.5; color: var(--muted); }
.bdy-cl li.ok { color: var(--ink); }
.bdy-ckm { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; }
.bdy-ckm svg { width: 14px; height: 14px; }
.bdy-cl li.ok .bdy-ckm { background: var(--good); border-color: var(--good); color: var(--on-good); }
.bdy-acts { display: grid; gap: 10px; }

/* ---------- 트레이너에게 보여 주기: 큰 글씨 전체 화면 ---------- */
html.bdy-lock, html.bdy-lock body { overflow: hidden; }
.bdy-full { position: fixed; inset: 0; z-index: 98; background: var(--bg); color: var(--ink); overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 16px calc(env(safe-area-inset-bottom, 0px) + 24px); }
.bdy-fin { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; }
.bdy-fbar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(env(safe-area-inset-top, 0px) + 12px) 0 10px; background: var(--bg); border-bottom: 1px solid var(--line); }
.bdy-fbar h2 { margin: 0; font-size: 22px; font-weight: 900; line-height: 1.3; min-width: 0; }
.bdy-fbar h2:focus { outline: none; }
.bdy-fbar .btn { width: auto; flex: none; min-height: 48px; padding: 10px 16px; font-size: 16px; }
.bdy-fsub { margin: 0; font-size: 17px; font-weight: 700; color: var(--muted); }
.bdy-full .bdy-cmp, .bdy-full .bdy-fin > .bdy-cond { gap: 14px; }
.bdy-full .bdy-cond { font-size: 17px; }
.bdy-full .bdy-cond.diff b { font-size: 19px; }
.bdy-full .bdy-pairw h4, .bdy-full .bdy-h4 { font-size: 19px; }
.bdy-full .bdy-fig figcaption { font-size: 16px; }
.bdy-full .bdy-nl li { padding: 14px; }
.bdy-full .bdy-nh b { font-size: 20px; }
.bdy-full .bdy-v { font-size: 26px !important; }
.bdy-full .bdy-nv small { font-size: 14px; }
.bdy-full .bdy-nv b { font-size: 25px; }
.bdy-full .bdy-tag { font-size: 14px; }
.bdy-full .bdy-legend { font-size: 15px; }
.bdy-fsum { margin: 0; font-size: 17px; font-weight: 800; }
.bdy-fnote { margin: 0; font-size: 15px; line-height: 1.55; }
.bdy-full p { margin: 0; }

/* ---------- 화면 움직임 '적게' ---------- */
html[data-motion="less"] .bdy *, html[data-motion="less"] .bdy-full * { transition: none !important; animation: none !important; }
