@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root {
  --bg: #0a0b0d; --card: #14171c; --card2: #1b1f26; --ink: #eef0f4; --sub: #8a93a6; --line: #262b34;
  --brand: #3dff8f; --brand-ink: #04140a; --brand-soft: rgba(61,255,143,.12);
  --prime: #ff3b30; --syn: #ffb300; --stab: #4f7dff;
  --good: #3dff8f; --good-bg: rgba(61,255,143,.12); --ok: #ffb300; --ok-bg: rgba(255,179,0,.13);
  --fix: #ff5a4f; --fix-bg: rgba(255,90,79,.13); --na-bg: #22262e;
  --radius: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, 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.5;
  word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--brand); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img, video { max-width: 100%; display: block; }
.hidden { display: none !important; }

/* 레이아웃 */
.wrap { max-width: 720px; margin: 0 auto; padding: 16px 16px 96px; }
header.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px; background: rgba(10,11,13,.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: baseline; gap: 8px; font-weight: 900; letter-spacing: .5px; font-size: 15px; }
.logo b { color: var(--brand); font-weight: 900; }
.logo span { color: var(--sub); font-weight: 600; font-size: 13px; letter-spacing: 0; }
.kicker { color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
h1 { font-size: 26px; line-height: 1.25; margin: 4px 0 12px; letter-spacing: -.6px; font-weight: 800; }
h2 { font-size: 19px; margin: 0 0 10px; letter-spacing: -.4px; font-weight: 800; }
h3 { font-size: 15px; margin: 0 0 8px; font-weight: 700; }
.muted { color: var(--sub); }
.small { font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 10px; }

/* 버튼 / 입력 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line);
  background: var(--card2); padding: 11px 16px; border-radius: 12px; cursor: pointer; font-weight: 700; color: var(--ink); }
.btn:hover { border-color: #3a414d; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--fix); }
.btn.block { width: 100%; padding: 15px; font-size: 17px; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .45; cursor: default; }
input[type=text], input[type=password], input[type=tel], input[type=number], input[type=search], textarea, select {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--card2); outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); }
textarea { min-height: 80px; resize: vertical; }
label.field { display: block; margin: 12px 0; }
label.field > span { display: block; font-size: 13px; color: var(--sub); margin-bottom: 6px; font-weight: 700; }
label.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: 14px; color: var(--sub); }
label.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--brand); }

.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; background: var(--na-bg); color: var(--sub); }
.b-good { background: var(--good-bg); color: var(--good); }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-fix { background: var(--fix-bg); color: var(--fix); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fix); display: inline-block; }

/* 칩 */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-weight: 700; font-size: 14px; color: var(--sub); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* 운동 카드 그리드 */
.ex-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 14px; }
@media (min-width: 640px) { .ex-grid { grid-template-columns: repeat(3, 1fr); } }
.ex-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform .15s; }
.ex-card:active { transform: scale(.98); }
.ex-card .thumb { aspect-ratio: 1 / 1; background: #0a0b0d center / cover no-repeat; position: relative; }
.ex-card .thumb .play { position: absolute; left: 8px; top: 8px; padding: 2px 7px; border-radius: 6px; background: rgba(0,0,0,.65);
  color: var(--brand); font-size: 10px; font-weight: 900; letter-spacing: 1px; }
.ex-card .meta { padding: 10px 12px 12px; }
.ex-card .name { font-weight: 800; letter-spacing: -.3px; }
.ex-card .en { font-size: 11px; color: var(--sub); letter-spacing: 1.5px; font-weight: 700; }

/* 상세 */
.player { border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line); }
.player video { width: 100%; max-height: 72vh; margin: 0 auto; }
.muscle { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.muscle:first-of-type { border-top: 0; }
.muscle .sw { width: 10px; height: 34px; border-radius: 6px; flex: none; }
.muscle .t { font-size: 12px; color: var(--sub); font-weight: 800; width: 46px; flex: none; }
.muscle .m { font-weight: 800; }
.muscle .r { font-size: 13px; color: var(--sub); }
ol.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
ol.steps li { counter-increment: s; position: relative; padding: 10px 0 10px 40px; border-top: 1px solid var(--line); }
ol.steps li:first-child { border-top: 0; }
ol.steps li::before { content: counter(s); position: absolute; left: 0; top: 10px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-weight: 900; font-size: 13px; display: grid; place-items: center; }
ul.checks { list-style: none; padding: 0; margin: 0; }
ul.checks li { padding: 9px 0 9px 28px; position: relative; border-top: 1px solid var(--line); }
ul.checks li:first-child { border-top: 0; }
ul.checks li::before { content: "✓"; position: absolute; left: 4px; color: var(--brand); font-weight: 900; }
.mistake { padding: 12px 0; border-top: 1px solid var(--line); }
.mistake:first-of-type { border-top: 0; }
.mistake .bad { color: var(--fix); font-weight: 800; }
.mistake .bad::before { content: "✕ "; }
.mistake .fix { margin-top: 4px; }
.mistake .fix::before { content: "→ "; color: var(--brand); font-weight: 900; }
.credit { font-size: 11px; color: #5b6372; text-align: right; margin-top: 6px; }
.extra-list { display: grid; gap: 10px; }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 64px; padding: 12px 16px; background: linear-gradient(transparent, var(--bg) 35%); z-index: 15; }
.sticky-cta .btn { max-width: 688px; margin: 0 auto; display: flex; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--sub); font-weight: 700; cursor: pointer; margin-bottom: 8px; background: none; border: 0; padding: 4px 0; }

/* 하단 탭 */
nav.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: flex; background: rgba(14,16,20,.95); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
nav.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 10px; color: var(--sub); font-size: 11px; font-weight: 700; position: relative; }
nav.tabs a svg { width: 23px; height: 23px; }
nav.tabs a.on { color: var(--brand); }
nav.tabs a .n { position: absolute; top: 5px; left: calc(50% + 8px); background: var(--fix); color: #fff; font-size: 10px; border-radius: 999px; padding: 0 5px; min-width: 16px; text-align: center; }

/* 리스트 */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.item .th { width: 64px; height: 64px; border-radius: 10px; background: #000 center/cover no-repeat; flex: none; display: grid; place-items: center; color: var(--sub); font-size: 11px; }
.item .tt { font-weight: 800; }
.empty { text-align: center; color: var(--sub); padding: 40px 16px; }
.empty .big { font-size: 40px; margin-bottom: 6px; }

/* 업로드 */
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 22px 16px; text-align: center; }
.progress { height: 8px; background: var(--card2); border-radius: 5px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.tip { display: flex; gap: 10px; background: var(--brand-soft); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.tip b { color: var(--brand); }

/* 피드백 표시 */
.tc { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.tc:first-child { border-top: 0; }
.tc .time { flex: none; font-variant-numeric: tabular-nums; font-weight: 800; color: var(--brand-ink); background: var(--brand); border-radius: 7px; padding: 1px 8px; font-size: 13px; margin-top: 1px; }
.cue { font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.cue::before { content: "“"; color: var(--brand); }
.cue::after { content: "”"; color: var(--brand); }

/* 피드백 상세: 영상을 위에 고정해서 코멘트를 보면서 볼 수 있게 */
.sticky-player { position: sticky; top: 49px; z-index: 12; background: var(--bg); padding: 6px 0 8px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.sticky-player video { max-height: 34vh; }
.tc.on { background: var(--brand-soft); margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 10px; }
.cuebox { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); }
.textlink { background: none; border: 0; color: var(--sub); font-size: 13px; text-decoration: underline; cursor: pointer; padding: 8px; }
.textlink.danger { color: var(--fix); }
.preview-line { font-size: 13px; color: var(--ink); opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.step-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: var(--brand-ink);
  font-size: 12px; font-weight: 900; margin-right: 6px; vertical-align: 1px; }
details.fold > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 17px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "›"; color: var(--sub); transform: rotate(90deg); transition: transform .2s; }
details.fold[open] > summary::after { transform: rotate(-90deg); }

/* Google 로그인 */
.gbtn { display: flex; justify-content: center; min-height: 44px; margin-top: 4px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--sub); font-size: 13px; margin: 18px 0 6px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
details.phonelogin > summary { justify-content: center; gap: 6px; font-size: 15px; color: var(--sub); padding: 10px 0; }
.gacct { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 4px 0 6px; }
.gdot { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #4285f4; font-weight: 900; display: grid; place-items: center; flex: none; }
.gpic { width: 36px; height: 36px; border-radius: 50%; flex: none; }

/* 로그인 */
.auth { max-width: 400px; margin: 0 auto; padding: 24px 20px 48px; }
.auth .visual { margin: 0 -20px 4px; position: relative; }
.auth .visual video, .auth .visual img { width: 100%; aspect-ratio: 570 / 496; object-fit: cover; }
.auth .visual::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, var(--bg)); }
.auth .hero { margin-bottom: 26px; }
.auth .hero .big { font-size: 34px; font-weight: 900; letter-spacing: -1px; line-height: 1.15; }
.auth .hero .big em { font-style: normal; color: var(--brand); }

.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 64px); transform: translateX(-50%); text-align: center; background: var(--ink); color: var(--bg); padding: 11px 18px;
  border-radius: 12px; font-weight: 700; z-index: 100; font-size: 14px; max-width: calc(100% - 32px); box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.toast.err { background: var(--fix); color: #fff; }
.banner { background: var(--ok-bg); color: var(--ok); padding: 8px 16px; font-size: 13px; font-weight: 700; text-align: center; }
.banner a { color: inherit; text-decoration: underline; }

.gbadge { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #fff; color: #4285f4; font-size: 10px; font-weight: 900; margin-right: 4px; vertical-align: -2px; }
.code { background: var(--card2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 12px; }
