:root {
  --ivory: #f7f5ec;
  --surface: #fffdf7;
  --surface-soft: #eeede5;
  --navy: #10243e;
  --navy-2: #193653;
  --yellow: #dff441;
  --yellow-soft: #f3fab8;
  --green: #2f6b4f;
  --green-soft: #e4efe6;
  --ink: #10243e;
  --muted: #65707b;
  --line: rgba(16, 36, 62, 0.13);
  --shadow: 0 18px 50px rgba(16, 36, 62, 0.08);
  --radius: 18px;
  --sidebar: 230px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--ivory); color: var(--ink); font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif; }
button, input, textarea { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
[hidden] { display: none !important; }

.app-shell { min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; width: var(--sidebar); flex-direction: column; padding: 28px 18px 20px; background: linear-gradient(160deg, #0b213b, #112d4b 74%, #173b54); color: #f8f8f1; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 30px; color: inherit; font-size: 22px; font-weight: 800; letter-spacing: -0.045em; text-decoration: none; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--yellow); color: var(--navy); font-size: 20px; transform: rotate(-7deg); }
.side-nav { display: grid; gap: 8px; }
.nav-item { display: flex; width: 100%; align-items: center; gap: 13px; min-height: 50px; padding: 0 15px; border: 0; border-radius: 14px; background: transparent; color: rgba(255,255,255,.72); cursor: pointer; text-align: left; transition: background .24s ease, color .24s ease, transform .18s ease; }
.nav-item > span:first-child { width: 24px; color: rgba(255,255,255,.82); font-size: 21px; text-align: center; }
.nav-item:hover, .nav-item:focus-visible { background: rgba(255,255,255,.09); color: #fff; outline: none; }
.nav-item:active { transform: translateY(1px); }
.nav-item.is-active { background: var(--yellow); color: var(--navy); font-weight: 700; }
.nav-item.is-active > span:first-child { color: var(--navy); }
.level-card { margin-top: auto; padding: 18px; border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); background: rgba(255,255,255,.05); }
.level-card span, .level-card small { display: block; color: rgba(255,255,255,.64); font-size: 12px; }
.level-card strong { display: block; margin: 5px 0 14px; font-size: 14px; }
.level-track { height: 6px; margin-bottom: 9px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.13); }
.level-track i { display: block; width: 62%; height: 100%; border-radius: inherit; background: var(--yellow); }

.app-main { min-height: 100dvh; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; height: 72px; align-items: center; justify-content: space-between; padding: 0 clamp(22px, 3.4vw, 54px); border-bottom: 1px solid var(--line); background: rgba(247,245,236,.9); backdrop-filter: blur(18px); }
.topbar-title span { display: block; color: var(--muted); font-size: 11px; }
.topbar-title strong { font-size: 16px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .profile-button, .mobile-menu { border: 0; background: transparent; cursor: pointer; }
.icon-button { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; font-size: 20px; }
.profile-button { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 8px 4px 4px; border-radius: 999px; }
.icon-button:hover, .profile-button:hover { background: rgba(16,36,62,.06); }
.avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: var(--navy); color: var(--yellow); font-size: 12px; font-weight: 800; }
.avatar.coach { background: var(--green); color: white; }
.mobile-menu { display: none; font-size: 22px; }
main { padding: 40px clamp(22px, 3.4vw, 54px) 64px; }
.view { display: none; max-width: 1440px; margin: 0 auto; animation: view-in .35s ease both; }
.view.is-active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.15; letter-spacing: -0.05em; }
h2 { margin-bottom: 0; font-size: 21px; letter-spacing: -0.035em; }
h3 { letter-spacing: -0.03em; }
.section-label { margin-bottom: 7px; color: var(--green); font-size: 12px; font-weight: 800; }
.page-heading, .welcome-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.page-heading > div:first-child > p:last-child, .welcome-row > div > p:last-child { max-width: 640px; margin-bottom: 0; color: var(--muted); line-height: 1.75; }
.compact-heading { align-items: center; }
.date-line { margin-bottom: 8px; color: var(--green); font-size: 13px; font-weight: 700; }

.primary-button, .secondary-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 12px; padding: 0 22px; border: 1px solid transparent; border-radius: 999px; cursor: pointer; font-weight: 800; white-space: nowrap; transition: transform .18s ease, box-shadow .22s ease, background .22s ease; }
.primary-button { background: var(--yellow); color: var(--navy); box-shadow: 0 8px 24px rgba(174,195,29,.2); }
.primary-button:hover { box-shadow: 0 12px 28px rgba(174,195,29,.3); transform: translateY(-1px); }
.secondary-button { border-color: var(--line); background: var(--surface); }
.secondary-button:hover { background: var(--surface-soft); }
.primary-button:active, .secondary-button:active { transform: translateY(1px); }
.hero-cta { min-width: 220px; }
.full-button { width: 100%; }

.home-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(360px, .85fr); gap: 22px; }
.today-practice, .weekly-summary, .recent-card, .upload-card, .skill-picker, .analysis-loading, .score-panel, .feedback, .generated-quest, .featured-quest, .quest-card, .lesson-card, .lesson-form-panel, .trend-card, .insight-rail article, .report-bottom article { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.today-practice { position: relative; display: grid; min-height: 550px; grid-template-columns: .78fr 1.22fr; overflow: hidden; background: var(--navy); color: white; }
.practice-visual { min-height: 100%; background-image: linear-gradient(90deg, transparent 55%, var(--navy) 100%), url("./assets/ace-rally-home-photo.png"); background-size: cover; background-position: 58% center; filter: saturate(.9) contrast(1.05); }
.practice-content { position: relative; z-index: 1; padding: 36px 36px 30px 8px; }
.practice-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.source-chip, .difficulty { display: inline-flex; align-items: center; min-height: 28px; padding: 0 11px; border-radius: 999px; background: var(--yellow); color: var(--navy); font-size: 11px; font-style: normal; font-weight: 800; }
.practice-heading h2 { margin-top: 12px; font-size: 30px; }
.time-chip { display: flex; align-items: baseline; gap: 3px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 14px; color: rgba(255,255,255,.8); font-size: 12px; }
.time-chip b { color: var(--yellow); font-size: 24px; }
.focus-label { margin: 32px 0 7px; color: rgba(255,255,255,.62); font-size: 12px; }
.practice-content h3 { max-width: 470px; margin-bottom: 10px; font-size: clamp(22px, 2.1vw, 31px); line-height: 1.35; }
.practice-reason { max-width: 500px; margin-bottom: 22px; color: rgba(255,255,255,.68); font-size: 14px; line-height: 1.7; }
.practice-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-bottom: 22px; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(255,255,255,.14); }
.practice-meta span { padding: 12px 14px; background: rgba(8,29,51,.88); }
.practice-meta small, .practice-meta b { display: block; }
.practice-meta small { margin-bottom: 5px; color: rgba(255,255,255,.52); font-size: 10px; }
.practice-meta b { font-size: 13px; }
.practice-checks { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.practice-checks label { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.84); cursor: pointer; font-size: 13px; }
.practice-checks input { appearance: none; width: 20px; height: 20px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; background: transparent; }
.practice-checks input:checked { border-color: var(--yellow); background: radial-gradient(circle, var(--yellow) 0 45%, transparent 48%); }
.practice-checks input:checked + span { color: rgba(255,255,255,.48); text-decoration: line-through; }
.practice-progress { height: 4px; margin-top: 24px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.13); }
.practice-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--yellow); transition: width .35s ease; }
.practice-count { margin: 7px 0 0; color: rgba(255,255,255,.52); font-size: 10px; text-align: right; }

.weekly-summary { padding: 28px; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.section-title-row > span { color: var(--muted); font-size: 11px; }
.section-title-row button { border: 0; background: transparent; color: var(--green); cursor: pointer; font-size: 12px; font-weight: 700; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 22px; overflow: hidden; border-radius: 14px; background: var(--line); }
.metric-grid article { min-height: 188px; padding: 22px; background: var(--surface); }
.metric-grid article > span { display: block; color: var(--muted); font-size: 12px; }
.metric-grid strong { display: block; margin: 14px 0 18px; font-size: 42px; line-height: 1; letter-spacing: -0.06em; }
.metric-grid strong small { margin-left: 5px; color: var(--muted); font-size: 12px; font-weight: 600; }
.metric-grid em { color: var(--muted); font-size: 11px; font-style: normal; }
.metric-grid em.positive { color: var(--green); font-weight: 700; }
.home-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 22px; }
.recent-card { padding: 24px; }
.recent-analysis { display: grid; grid-template-columns: 180px 1fr; gap: 22px; align-items: center; margin-top: 20px; }
.media-thumb { height: 112px; border-radius: 14px; background-color: var(--navy); }
.analysis-thumb { background-image: url("./assets/ace-rally-swing-sample.png"); background-size: 170%; background-position: 35% 45%; }
.recent-analysis span { display: inline-block; margin-right: 12px; color: var(--green); font-size: 12px; font-weight: 800; }
.recent-analysis strong { font-size: 20px; }
.recent-analysis p, blockquote { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
blockquote { min-height: 58px; padding: 18px 0 4px; }
.lesson-author { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.lesson-author b, .lesson-author small { display: block; }
.lesson-author b { font-size: 13px; }
.lesson-author small { margin-top: 2px; color: var(--muted); font-size: 10px; }

.analysis-setup { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; }
.motion-library { display: grid; grid-template-columns: .72fr 1.28fr; gap: 28px; align-items: center; margin-top: 22px; padding: 26px 30px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(115deg, #eef1e6, var(--surface)); box-shadow: var(--shadow); }
.motion-library h2 { margin-bottom: 8px; }
.motion-library p:last-child { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.motion-clips { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.motion-clip { position: relative; min-height: 170px; overflow: hidden; padding: 14px; border: 1px solid transparent; border-radius: 15px; background: var(--navy); color: white; cursor: pointer; text-align: left; transition: transform .2s ease, border-color .2s ease; }
.motion-clip:hover, .motion-clip.is-active { border-color: var(--yellow); transform: translateY(-3px); }
.motion-photo { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .72; transition: transform 1.8s ease-in-out; }
.motion-clip:hover .motion-photo, .motion-clip.is-active .motion-photo { transform: scale(1.08) translateX(2%); }
.motion-clip:nth-child(1) .motion-photo { background-image: linear-gradient(0deg, rgba(9,30,49,.8), transparent 68%), url('./assets/forehand-loop.png'); }
.motion-clip:nth-child(2) .motion-photo { background-image: linear-gradient(0deg, rgba(9,30,49,.8), transparent 68%), url('./assets/backhand-loop.png'); }
.motion-clip:nth-child(3) .motion-photo { background-image: linear-gradient(0deg, rgba(9,30,49,.8), transparent 68%), url('./assets/serve-loop.png'); }
.motion-clip b, .motion-clip small { position: relative; z-index: 1; display: block; }
.motion-clip b { margin-top: 102px; font-size: 14px; }.motion-clip small { color: var(--yellow); font-size: 10px; }
.reference-video { display: grid; grid-template-columns: .72fr 1.28fr; gap: 28px; align-items: center; margin-top: 22px; padding: 26px 30px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(115deg, #eef1e6, var(--surface)); box-shadow: var(--shadow); }
.reference-video-copy h2 { margin: 0 0 8px; }.reference-video-copy p:not(.section-label) { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }.text-link { display: inline-flex; gap: 7px; margin-top: 18px; color: var(--navy); font-size: 13px; font-weight: 800; text-decoration: none; }.text-link:hover { color: var(--green); }
.reference-video-player { overflow: hidden; aspect-ratio: 16 / 9; border-radius: 15px; background: var(--navy); }.reference-video-player iframe { display: block; width: 100%; height: 100%; border: 0; }.reference-video-launch { position: relative; display: block; color: white; text-decoration: none; }.reference-video-launch::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7,26,45,.88), rgba(7,26,45,.08) 75%); }.reference-video-launch img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }.reference-video-launch:hover img { transform: scale(1.035); }.reference-video-launch > span { position: absolute; z-index: 1; bottom: 18px; left: 18px; display: grid; gap: 4px; }.reference-video-launch b { font-size: 15px; }.reference-video-launch small { color: var(--yellow); font-size: 11px; }
.reference-video-result { margin-top: 20px; background: linear-gradient(115deg, #fffef8, #edf6ec); }
.upload-card, .skill-picker { min-height: 430px; padding: 42px; }
.upload-card { display: flex; align-items: center; flex-direction: column; justify-content: center; border-style: dashed; text-align: center; }
.upload-mark { display: grid; width: 66px; height: 66px; place-items: center; margin-bottom: 20px; border-radius: 50%; background: var(--yellow); font-size: 30px; }
.upload-card h2, .skill-picker h2 { font-size: 26px; }
.upload-card p { max-width: 420px; color: var(--muted); line-height: 1.75; }
.upload-actions { display: flex; gap: 10px; margin-top: 16px; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-status { margin-top: 18px; color: var(--muted); font-size: 11px; }
.skill-picker { display: flex; flex-direction: column; }
.skill-options { display: grid; gap: 10px; margin: 24px 0; }
.skill-options button { display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 0 22px; border: 1px solid var(--line); border-radius: 14px; background: transparent; cursor: pointer; font-weight: 800; text-align: left; }
.skill-options button small { color: var(--muted); font-size: 11px; font-weight: 500; }
.skill-options button.is-active { border-color: var(--navy); background: var(--navy); color: white; }
.skill-options button.is-active small { color: rgba(255,255,255,.62); }
.analyze-button { width: 100%; margin-top: auto; }
.analysis-loading { display: grid; grid-template-columns: 240px 1fr; min-height: 400px; place-items: center; gap: 50px; padding: 50px; }
.scan-stage { position: relative; display: grid; width: 210px; height: 280px; place-items: center; overflow: hidden; border-radius: 105px 105px 30px 30px; background: var(--navy); }
.scan-stage i { position: absolute; left: 20px; right: 20px; top: 30px; height: 2px; background: var(--yellow); box-shadow: 0 0 20px rgba(223,244,65,.6); animation: scan 1.4s ease-in-out infinite alternate; }
@keyframes scan { to { transform: translateY(220px); } }
.scan-person { color: rgba(255,255,255,.78); font-size: 74px; }
.analysis-loading h2 { font-size: 32px; }
.analysis-loading p { color: var(--muted); }
.loading-track { width: min(500px, 100%); height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-soft); }
.loading-track i { display: block; width: 55%; height: 100%; border-radius: inherit; background: var(--yellow); animation: load 1.2s ease-in-out infinite alternate; }
@keyframes load { to { width: 92%; } }
.analysis-invalid { display: flex; min-height: 470px; align-items: center; flex-direction: column; justify-content: center; padding: 54px 28px; border: 1px solid #dfd7c8; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.invalid-video-mark { display: grid; width: 82px; height: 82px; place-items: center; margin-bottom: 22px; border-radius: 50%; background: var(--yellow-soft); }
.invalid-video-mark span { display: grid; width: 42px; height: 42px; place-items: center; border: 3px solid var(--navy); border-radius: 50%; color: var(--navy); font-size: 25px; font-weight: 800; }
.analysis-invalid h2 { margin: 5px 0 12px; font-size: 32px; }
.analysis-invalid > p:not(.section-label) { max-width: 590px; margin: 0; color: var(--muted); line-height: 1.75; }
.analysis-invalid ul { display: grid; gap: 10px; width: min(560px,100%); margin: 28px 0; padding: 20px 24px; border-radius: 16px; background: var(--surface-soft); color: var(--navy); text-align: left; }
.analysis-invalid li { margin-left: 18px; font-size: 12px; line-height: 1.55; }
.result-workspace { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(310px, .5fr); gap: 20px; }
.video-analysis { overflow: hidden; border-radius: var(--radius); background: var(--navy); box-shadow: var(--shadow); }
.sample-video { position: relative; min-height: 610px; overflow: hidden; }
.actual-video { background: #071a2d; }
.uploaded-analysis-video, .actual-video video { display: block; width: 100%; height: 610px; background: #071a2d; object-fit: contain; }
.pose-overlay { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.analysis-frame-status { position: absolute; z-index: 3; right: 16px; bottom: 54px; padding: 6px 9px; border-radius: 9px; background: rgba(11,33,59,.78); color: var(--yellow); font-size: 9px; font-weight: 800; backdrop-filter: blur(8px); }
.sample-photo { position: absolute; inset: 0; background-image: linear-gradient(to top, rgba(5,22,39,.75), transparent 40%), url("./assets/ace-rally-swing-sample.png"); background-size: auto 155%; background-position: 29% 38%; filter: saturate(.8); }
.video-skill { position: absolute; top: 20px; left: 20px; z-index: 2; padding: 7px 11px; border-radius: 999px; background: rgba(11,33,59,.8); color: white; font-size: 11px; }
.video-controls { position: absolute; z-index: 3; right: 22px; bottom: 20px; left: 22px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; color: white; font-size: 11px; }
.video-controls i { height: 3px; border-radius: 999px; background: linear-gradient(90deg, var(--yellow) 0 48%, rgba(255,255,255,.3) 48%); }
.video-controls b { color: var(--yellow); }
.skeleton { position: absolute; z-index: 2; top: 50%; left: 45%; width: 260px; height: 420px; transform: translate(-50%,-50%); }
.joint { position: absolute; width: 14px; height: 14px; border: 3px solid var(--navy); border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 2px rgba(255,255,255,.8); }
.joint.head { top: 6%; left: 51%; width: 24px; height: 24px; }
.joint.shoulder-l { top: 22%; left: 31%; }.joint.shoulder-r { top: 21%; left: 68%; }.joint.elbow-l { top: 38%; left: 13%; }.joint.elbow-r { top: 34%; left: 83%; }.joint.wrist-l { top: 50%; left: 0; }.joint.wrist-r { top: 26%; left: 96%; }.joint.hip-l { top: 52%; left: 39%; }.joint.hip-r { top: 52%; left: 63%; }.joint.knee-l { top: 73%; left: 24%; }.joint.knee-r { top: 72%; left: 79%; }.joint.ankle-l { top: 94%; left: 13%; }.joint.ankle-r { top: 93%; left: 94%; }
.bone { position: absolute; display: block; height: 3px; background: var(--yellow); transform-origin: left center; box-shadow: 0 0 0 1px rgba(16,36,62,.4); }
.bone.torso { top: 24%; left: 35%; width: 119px; transform: rotate(83deg); }.bone.arms { top: 23%; left: 31%; width: 180px; transform: rotate(3deg); }.bone.hips { top: 53%; left: 40%; width: 62px; }
.angle-label { position: absolute; padding: 5px 8px; border-radius: 9px; background: var(--yellow); color: var(--navy); font-size: 10px; font-weight: 800; }.elbow-angle { top: 29%; left: 77%; }.knee-angle { top: 71%; left: 69%; }
.score-panel { padding: 28px; }
.overall-score { display: grid; grid-template-columns: 1fr auto; align-items: end; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.overall-score span { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.overall-score strong { display: flex; align-items: baseline; gap: 4px; font-size: 64px; letter-spacing: -0.06em; }.overall-score strong small { color: var(--muted); font-size: 16px; letter-spacing: 0; }.overall-score em { margin-bottom: 10px; color: var(--green); font-size: 11px; font-style: normal; }
.detected-skill { margin: 16px 0 0; padding: 10px 12px; border: 1px solid #b9d7c3; border-radius: 10px; background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 800; line-height: 1.5; }
.radar-score { position: relative; width: min(100%, 300px); aspect-ratio: 1; margin: 22px auto 12px; }.radar-score svg { display: block; width: 100%; height: 100%; overflow: visible; }.radar-score line { stroke: #d9e3da; stroke-width: 1; }.radar-grid { fill: rgba(237,246,236,.42); stroke: #c4d7c8; stroke-width: 1.5; }.radar-grid-mid { fill: none; stroke-dasharray: 3 4; }.radar-fill { fill: rgba(223,244,65,.42); stroke: var(--green); stroke-width: 3; stroke-linejoin: round; transition: points .45s ease; }.radar-axis { position: absolute; color: var(--navy); font-size: 10px; font-weight: 800; white-space: nowrap; }.radar-axis.impact { top: -2px; left: 50%; transform: translateX(-50%); }.radar-axis.follow { top: 22%; right: -13px; }.radar-axis.timing { right: -8px; bottom: 22%; }.radar-axis.finish { bottom: -2px; left: 50%; transform: translateX(-50%); }.radar-axis.lower { bottom: 22%; left: -8px; }.radar-axis.balance { top: 22%; left: -13px; }
.movement-guidance { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }.movement-guidance > span { color: var(--green); font-size: 11px; font-weight: 800; }.movement-guidance ul { display: grid; gap: 9px; margin: 12px 0 0; padding: 0; list-style: none; }.movement-guidance li { position: relative; padding-left: 17px; color: var(--navy); font-size: 12px; font-weight: 700; line-height: 1.5; }.movement-guidance li::before { content: ""; position: absolute; top: .58em; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 2px var(--navy); }
.feedback-grid { display: grid; grid-template-columns: 1fr 1fr .8fr; gap: 18px; margin-top: 20px; }.feedback, .generated-quest { min-height: 180px; padding: 24px; }.feedback > span, .generated-quest > span, .report-bottom article > span, .insight-rail article > span { color: var(--green); font-size: 11px; font-weight: 800; }.feedback h3, .generated-quest h3 { margin: 12px 0 8px; font-size: 18px; }.feedback p { margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }.feedback.good { background: var(--green-soft); }.feedback.focus { background: var(--yellow-soft); }.generated-quest { display: flex; align-items: flex-start; flex-direction: column; }.generated-quest button { margin-top: auto; }

.quest-filter, .period-switch { display: flex; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }.quest-filter button, .period-switch button, .report-tabs button { min-height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }.quest-filter button.is-active, .period-switch button.is-active, .report-tabs button.is-active { background: var(--navy); color: white; }
.quest-layout { display: grid; grid-template-columns: minmax(380px,.9fr) minmax(0,1.1fr); gap: 22px; }.featured-quest { position: sticky; top: 98px; align-self: start; padding: 32px; background: var(--navy); color: white; }.quest-source-row { display: flex; align-items: center; gap: 8px; }.quest-source-row time { margin-left: auto; color: rgba(255,255,255,.58); font-size: 11px; }.difficulty { background: rgba(255,255,255,.12); color: white; }.featured-content { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 26px; margin: 34px 0 26px; }.progress-ring { display: grid; width: 140px; height: 140px; place-items: center; border-radius: 50%; background: conic-gradient(var(--yellow) calc(var(--progress) * 1%), rgba(255,255,255,.12) 0); }.progress-ring::before { content: ""; grid-area: 1 / 1; width: 108px; height: 108px; border-radius: 50%; background: var(--navy); }.progress-ring strong { z-index: 1; grid-area: 1 / 1; font-size: 30px; }.featured-content p { margin-bottom: 7px; color: var(--yellow); font-size: 11px; }.featured-content h2 { font-size: 25px; line-height: 1.45; }.target-values { display: flex; gap: 20px; margin-top: 18px; color: rgba(255,255,255,.6); font-size: 12px; }.target-values b { margin-left: 5px; color: white; font-size: 20px; }.quest-insight { margin-bottom: 24px; padding: 18px; border-radius: 14px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.7); font-size: 12px; line-height: 1.75; }.quest-reward { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }.quest-reward span { color: rgba(255,255,255,.55); font-size: 11px; }.quest-reward b { color: var(--yellow); }.quest-reward em { margin-left: auto; color: white; font-size: 11px; font-style: normal; }.quest-list { display: grid; gap: 14px; }.quest-card { position: relative; display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 18px; min-height: 148px; padding: 22px; overflow: hidden; }.quest-card::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: linear-gradient(90deg, var(--green) var(--progress), var(--surface-soft) var(--progress)); }.quest-card .quest-icon { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 24px; }.quest-card h3 { margin: 6px 0 8px; font-size: 16px; line-height: 1.45; }.quest-card .quest-meta { display: flex; gap: 12px; color: var(--muted); font-size: 10px; }.quest-card .quest-values { min-width: 110px; text-align: right; }.quest-card .quest-values b { display: block; font-size: 20px; }.quest-card .quest-values small { color: var(--muted); }.quest-card .quest-topline { display: flex; gap: 7px; }.quest-card .quest-topline span { padding: 4px 8px; border-radius: 999px; background: var(--surface-soft); color: var(--green); font-size: 9px; font-weight: 800; }
.today-options { margin-top: 8px; }.practice-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 18px; }.practice-section-heading span { display: block; margin-bottom: 6px; color: var(--green); font-size: 11px; font-weight: 800; }.practice-section-heading p { max-width: 420px; margin: 0; color: var(--muted); font-size: 12px; }.choice-title { margin: 0 0 12px; font-size: 14px; }.choose-practice { min-height: 36px; margin-top: 12px; padding: 0 14px; font-size: 10px; }.practice-history-section { margin-top: 48px; padding-top: 34px; border-top: 1px solid var(--line); }.practice-history-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }.practice-history-card { display: grid; min-height: 170px; grid-template-rows: auto 1fr auto; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }.practice-history-card time { color: var(--muted); font-size: 10px; }.practice-history-card h3 { margin: 14px 0 7px; font-size: 15px; line-height: 1.5; }.practice-history-card p { margin: 0; color: var(--green); font-size: 11px; }.practice-history-card strong { align-self: end; margin-top: 18px; font-size: 13px; }

.lesson-layout { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(360px,.75fr); gap: 22px; align-items: start; }.lesson-timeline { position: relative; display: grid; gap: 14px; padding-left: 22px; }.lesson-timeline::before { content: ""; position: absolute; top: 22px; bottom: 22px; left: 4px; width: 2px; background: var(--line); }.lesson-card { position: relative; padding: 24px; }.lesson-card::before { content: ""; position: absolute; top: 30px; left: -24px; width: 10px; height: 10px; border: 3px solid var(--ivory); border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px var(--green); }.lesson-card-head { display: flex; align-items: center; gap: 10px; }.lesson-card-head time { font-size: 12px; font-weight: 800; }.lesson-card-head .skill-tag { padding: 5px 9px; border-radius: 999px; background: var(--navy); color: white; font-size: 10px; }.lesson-card-head .coach-name { margin-left: auto; color: var(--muted); font-size: 11px; }.lesson-card-body { display: grid; grid-template-columns: 190px 1fr; gap: 20px; margin-top: 18px; }.lesson-media { min-height: 130px; border-radius: 14px; background-image: url("./assets/ace-rally-lesson-sample.png"); background-size: 270%; background-position: 48% 50%; }.lesson-card blockquote { margin: 0; padding: 0; color: var(--ink); }.feedback-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }.feedback-tags span { padding: 5px 9px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 10px; font-weight: 700; }.next-practice { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding: 14px; border-radius: 14px; background: var(--yellow-soft); }.next-practice div small, .next-practice div b { display: block; }.next-practice small { color: var(--muted); font-size: 9px; }.next-practice b { margin-top: 3px; font-size: 12px; }.next-practice button { min-height: 38px; padding-inline: 16px; font-size: 10px; }.lesson-form-panel { position: sticky; top: 98px; padding: 28px; }.lesson-form-panel h2 { margin-bottom: 22px; }.lesson-form-panel form { display: grid; gap: 16px; }.lesson-form-panel form > label { display: grid; gap: 7px; }.lesson-form-panel label > span, .lesson-form-panel legend { color: var(--navy); font-size: 11px; font-weight: 800; }.lesson-form-panel input[type="text"], .lesson-form-panel input[type="date"], .lesson-form-panel textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--ivory); color: var(--ink); outline: none; }.lesson-form-panel input[type="text"], .lesson-form-panel input[type="date"] { height: 45px; padding: 0 13px; }.lesson-form-panel textarea { padding: 13px; resize: vertical; }.lesson-form-panel input:focus, .lesson-form-panel textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(47,107,79,.1); }.lesson-form-panel fieldset { margin: 0; padding: 0; border: 0; }.lesson-form-panel legend { margin-bottom: 8px; }.choice-row { display: flex; flex-wrap: wrap; gap: 7px; }.choice-row label input { position: absolute; opacity: 0; }.choice-row label span { display: flex; min-height: 34px; align-items: center; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 10px; }.choice-row input:checked + span { border-color: var(--navy); background: var(--navy); color: white; }.attachment-field { position: relative; min-height: 118px; align-content: center; justify-items: center; padding: 22px; border: 1px dashed rgba(16,36,62,.25); border-radius: 14px; background: var(--ivory); cursor: pointer; text-align: center; }.attachment-field > span { justify-self: start; width: 100%; margin-bottom: 6px; text-align: left; }.attachment-field input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }.attachment-field i { color: var(--ink); font-size: 11px; font-style: normal; }.attachment-field small { color: var(--muted); font-size: 9px; }.extract-preview { padding: 13px; border-radius: 12px; background: var(--green-soft); }.extract-preview span { color: var(--green); font-size: 9px; font-weight: 800; }.extract-preview p { margin: 5px 0 0; font-size: 11px; line-height: 1.6; }

.report-tabs { display: grid; grid-template-columns: repeat(3,1fr); margin-bottom: 18px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }.report-tabs button { min-height: 44px; }.report-layout { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(320px,.5fr); gap: 20px; }.trend-card { min-height: 520px; padding: 30px; }.chart-head { display: flex; align-items: flex-start; justify-content: space-between; }.chart-head span, .chart-head strong { display: block; }.chart-head span { color: var(--muted); font-size: 11px; }.chart-head strong { margin-top: 4px; font-size: 30px; }.chart-head em { padding: 7px 10px; border-radius: 999px; background: var(--yellow); font-size: 10px; font-style: normal; font-weight: 800; }.line-chart { position: relative; height: 390px; margin-top: 30px; padding: 28px 18px 44px; }.line-chart svg { position: relative; z-index: 2; width: 100%; height: 100%; overflow: visible; }.grid-line { position: absolute; right: 18px; left: 18px; height: 1px; background: var(--line); }.grid-line.one { top: 24%; }.grid-line.two { top: 49%; }.grid-line.three { top: 74%; }.chart-labels { position: absolute; right: 10px; bottom: 0; left: 10px; display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; text-align: center; }.chart-labels b { color: var(--ink); font-size: 12px; }.insight-rail { display: grid; gap: 18px; }.insight-rail article { padding: 28px; }.insight-rail h2 { margin: 14px 0 12px; font-size: 22px; line-height: 1.5; }.insight-rail h2 b, .insight-rail p b { color: var(--green); }.insight-rail p { margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }.insight-rail .coach-insight { background: var(--green-soft); }.report-bottom { display: grid; grid-template-columns: 1.1fr .8fr 1fr; gap: 18px; margin-top: 18px; }.report-bottom article { min-height: 220px; padding: 24px; }.report-bottom article > strong { display: block; margin: 15px 0; font-size: 28px; }.report-bottom article > strong small { color: var(--green); font-size: 10px; }.skill-bars { display: grid; gap: 12px; margin-top: 18px; }.skill-bars p { display: grid; grid-template-columns: 60px 1fr 28px; align-items: center; gap: 10px; margin: 0; font-size: 11px; }.skill-bars i { height: 4px; border-radius: 999px; background: linear-gradient(90deg,var(--green) var(--value),var(--surface-soft) var(--value)); }.practice-bars > div { display: flex; height: 95px; align-items: end; gap: 13px; }.practice-bars > div i { width: 18%; border-radius: 5px 5px 0 0; background: var(--green); opacity: .55; }.practice-bars > div i.active { background: var(--yellow); opacity: 1; }.report-bottom ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }.report-bottom li { position: relative; padding-left: 20px; color: var(--muted); font-size: 11px; }.report-bottom li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(5,20,36,.62); backdrop-filter: blur(7px); }.celebration-modal { position: relative; width: min(440px,100%); padding: 38px; border: 1px solid rgba(223,244,65,.35); border-radius: 24px; background: var(--navy); color: white; box-shadow: 0 30px 80px rgba(0,0,0,.3); text-align: center; animation: modal-in .4s cubic-bezier(.16,1,.3,1); }.celebration-modal .modal-close { position: absolute; top: 13px; right: 15px; border: 0; background: transparent; color: white; cursor: pointer; font-size: 26px; }.badge-burst { display: grid; width: 92px; height: 92px; place-items: center; margin: 0 auto 20px; border: 4px solid var(--yellow); border-radius: 50%; background: var(--green); color: var(--yellow); font-size: 40px; }.celebration-modal p { margin-bottom: 6px; color: var(--yellow); font-size: 11px; font-weight: 800; }.celebration-modal h2 { margin-bottom: 14px; font-size: 26px; }.celebration-modal > strong { display: block; color: var(--yellow); font-size: 34px; }.earned-badge { display: inline-flex; margin: 10px 0 22px; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.1); font-size: 11px; }.next-quest { margin-bottom: 20px; padding: 15px; border-radius: 14px; background: rgba(255,255,255,.06); text-align: left; }.next-quest small, .next-quest b { display: block; }.next-quest small { color: rgba(255,255,255,.55); }.next-quest b { margin-top: 5px; font-size: 13px; }@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.96); } }
.toast { position: fixed; z-index: 60; right: 24px; bottom: 24px; max-width: 360px; padding: 14px 18px; border-radius: 14px; background: var(--navy); color: white; box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity .25s ease, transform .25s ease; }.toast.is-visible { opacity: 1; transform: none; }

.lesson-media { background-image: url("./assets/ace-rally-lesson-photo.png"); background-size: cover; background-position: center; }

/* 핵심 메뉴는 모든 화면에서 바로 보이는 상단 내비게이션으로 유지합니다. */
.legacy-sidebar { display: none; }
.app-main { margin-left: 0; }
.topbar { z-index: 40; gap: 24px; height: 76px; padding-inline: clamp(20px, 3vw, 48px); box-shadow: 0 8px 28px rgba(16,36,62,.06); }
.topbar-brand { flex: 1 1 260px; min-width: 210px; max-width: 350px; justify-content: flex-start; gap: 7px; padding: 0; color: var(--navy); font-size: 20px; }
.brand-wordmark { font-weight: 800; letter-spacing: -.055em; white-space: nowrap; }
.brand-divider { color: rgba(16,36,62,.28); font-weight: 500; }
.brand-motivation { display: block; min-width: 0; flex: 1 1 auto; overflow: hidden; color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: -.025em; white-space: nowrap; }
.brand-motivation [data-brand-message] { display: inline-block; min-width: max-content; padding-right: 18px; animation: brand-message-marquee 8s ease-in-out infinite alternate; }
@keyframes brand-message-marquee { from { transform: translateX(0); } to { transform: translateX(-28%); } }
.topbar-brand .brand-mark { width: 36px; height: 36px; font-size: 18px; }
.top-nav { display: grid; width: min(560px, 52vw); grid-template-columns: repeat(4, minmax(72px, 1fr)); gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,253,247,.92); }
.top-nav-item { position: relative; min-height: 46px; padding: 0 18px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 800; white-space: nowrap; transition: background .2s ease, color .2s ease, transform .18s ease; }
.top-nav-item:hover, .top-nav-item:focus-visible { background: var(--surface-soft); color: var(--navy); outline: none; }
.top-nav-item:focus-visible { box-shadow: 0 0 0 3px rgba(47,107,79,.2); }
.top-nav-item:active { transform: translateY(1px); }
.top-nav-item.is-active { background: var(--navy); color: var(--yellow); box-shadow: inset 0 -3px 0 var(--yellow); }
.topbar-actions { flex: 0 0 auto; min-width: 170px; justify-content: flex-end; }
.topbar-actions { position: relative; }
.settings-button { display: grid; width: 42px; height: 42px; min-height: 42px; place-items: center; padding: 0; border: 1px solid var(--navy); border-radius: 50%; background: var(--navy); color: var(--yellow); cursor: pointer; transition: transform .18s ease, background .2s ease; }
.settings-icon { display: grid; width: 22px; height: 22px; place-items: center; line-height: 0; }
.settings-icon svg { display: block; width: 22px; height: 22px; fill: currentColor; }
.settings-button:hover, .settings-button:focus-visible { background: var(--navy-2); outline: none; }
.settings-button:focus-visible { box-shadow: 0 0 0 3px rgba(47,107,79,.2); }
.settings-button:active { transform: translateY(1px); }
.settings-menu { position: absolute; top: calc(100% + 14px); right: 0; width: min(320px, calc(100vw - 28px)); padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 22px 60px rgba(16,36,62,.18); color: var(--navy); }
.settings-menu-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.settings-menu-head strong, .settings-menu-head span { display: block; }
.settings-menu-head strong { font-size: 15px; }
.settings-menu-head span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.settings-menu-head button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--surface-soft); cursor: pointer; font-size: 19px; line-height: 1; }
.settings-row { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.settings-row span, .settings-row b, .settings-row small { display: block; }
.settings-row b { font-size: 12px; }
.settings-row small { max-width: 185px; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.settings-row input { width: 18px; height: 18px; accent-color: var(--green); }
.settings-row select { min-height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--ivory); color: var(--navy); font-size: 10px; font-weight: 700; }
.settings-link { width: 100%; min-height: 42px; margin-top: 12px; border: 0; border-radius: 12px; background: var(--yellow-soft); color: var(--navy); cursor: pointer; font-size: 11px; font-weight: 800; }
.role-model-section { margin-bottom: 26px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.role-model-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 20px; }
.role-model-heading > div > span { color: var(--green); font-size: 11px; font-weight: 800; }
.role-model-heading h2 { margin: 7px 0 8px; font-size: 25px; }
.role-model-heading p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.role-model-heading > small { max-width: 220px; color: var(--muted); font-size: 9px; line-height: 1.6; text-align: right; }
.role-model-picker { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; margin-bottom: 18px; }
.role-model-option { position: relative; display: grid; min-height: 112px; grid-template-columns: 42px 1fr; align-items: center; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--ivory); color: var(--navy); cursor: pointer; text-align: left; transition: border-color .2s ease, background .2s ease, transform .18s ease; }
.role-model-option:hover, .role-model-option:focus-visible { border-color: var(--green); outline: none; }
.role-model-option:active { transform: translateY(1px); }
.role-model-option.is-active { border-color: var(--navy); background: var(--navy); color: white; box-shadow: inset 0 -3px 0 var(--yellow); }
.role-rank { position: absolute; top: 9px; right: 10px; color: var(--green); font-size: 9px; font-weight: 800; }
.role-model-option.is-active .role-rank { color: var(--yellow); }
.role-initials { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 800; }
.role-model-option.is-active .role-initials { background: var(--yellow); color: var(--navy); }
.role-model-option b, .role-model-option small { display: block; }
.role-model-option b { padding-right: 12px; font-size: 11px; line-height: 1.4; }
.role-model-option small { margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.role-model-option.is-active small { color: rgba(255,255,255,.62); }
.role-model-dashboard { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(320px,.85fr); gap: 16px; }
.role-model-chart-card, .role-model-progress { min-height: 410px; border-radius: 16px; }
.role-model-chart-card { padding: 24px; background: var(--navy); color: white; }
.role-model-selected { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.role-model-selected span { color: var(--yellow); font-size: 10px; font-weight: 800; }
.role-model-selected h3 { margin: 5px 0 4px; font-size: 24px; }
.role-model-selected p { margin-bottom: 0; color: rgba(255,255,255,.62); font-size: 10px; }
.role-legend { display: flex; gap: 13px; padding-top: 5px; }
.role-legend span { position: relative; padding-left: 13px; color: rgba(255,255,255,.7); font-size: 9px; }
.role-legend span::before { content: ""; position: absolute; top: 3px; left: 0; width: 8px; height: 8px; border-radius: 2px; }
.role-legend .legend-player::before { background: rgba(223,244,65,.72); }
.role-legend .legend-user::before { border: 2px solid #8fd6b4; background: transparent; }
.radar-chart { height: 315px; margin-top: 8px; }
.radar-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.radar-grid { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 1; }
.radar-axis { stroke: rgba(255,255,255,.12); stroke-width: 1; }
.radar-chart text { fill: rgba(255,255,255,.65); font-size: 9px; font-weight: 700; }
.radar-player { fill: rgba(223,244,65,.26); stroke: var(--yellow); stroke-width: 2.5; }
.radar-user { fill: rgba(78,166,123,.2); stroke: #8fd6b4; stroke-width: 2; stroke-dasharray: 5 4; }
.radar-user-point { fill: #8fd6b4; stroke: var(--navy); stroke-width: 2; }
.role-model-progress { display: flex; align-items: flex-start; flex-direction: column; padding: 28px; background: var(--green-soft); }
.role-model-progress > span { color: var(--green); font-size: 10px; font-weight: 800; }
.role-model-progress h3 { margin: 12px 0; font-size: 25px; line-height: 1.45; }
.role-model-progress h3 strong { color: var(--green); font-size: inherit; }
.role-model-progress > p { color: var(--muted); font-size: 11px; line-height: 1.7; }
.step-track { display: grid; width: 100%; grid-template-columns: repeat(10,1fr); gap: 5px; margin: 8px 0 22px; }
.step-track i { height: 7px; border-radius: 999px; background: rgba(47,107,79,.15); }
.step-track i.is-active { background: var(--green); }
.next-role-step { width: 100%; margin-top: auto; padding: 18px; border-radius: 14px; background: var(--surface); }
.next-role-step small, .next-role-step b { display: block; }
.next-role-step small { color: var(--green); font-size: 9px; font-weight: 800; }
.next-role-step b { margin: 6px 0 15px; font-size: 13px; line-height: 1.5; }
.next-role-step .primary-button { width: 100%; min-height: 42px; font-size: 10px; }

@media (max-width: 820px) {
  .topbar { display: grid; height: 118px; grid-template-columns: 1fr auto; grid-template-rows: 50px 56px; gap: 0 12px; padding: 6px 14px; }
  .topbar-brand { min-width: 0; max-width: none; font-size: 17px; }
  .topbar-brand .brand-mark { width: 32px; height: 32px; font-size: 16px; }
  .topbar-actions { min-width: 0; }
  .settings-button { width: 38px; height: 38px; min-height: 38px; padding: 0; }
  .settings-icon { font-size: 19px; }
  .settings-menu { top: calc(100% + 8px); right: 0; }
  .top-nav { grid-column: 1 / -1; grid-row: 2; width: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; padding: 4px; border-radius: 14px; }
  .top-nav-item { min-width: 0; min-height: 46px; padding: 0 8px; border-radius: 10px; font-size: 13px; }
  main { padding-top: 24px; }
}

@media (max-width: 390px) {
  .topbar-brand > .brand-wordmark { display: inline; }
  .top-nav-item { font-size: 12px; }
}

@media (max-width: 1180px) {
  :root { --sidebar: 86px; }
  .brand { justify-content: center; padding-inline: 0; }.brand > span:last-child, .nav-item > span:last-child, .level-card { display: none; }.nav-item { justify-content: center; padding: 0; }.home-layout, .analysis-setup, .lesson-layout { grid-template-columns: 1fr; }.weekly-summary { order: 2; }.metric-grid { grid-template-columns: repeat(4,1fr); }.metric-grid article { min-height: 140px; }.lesson-form-panel, .featured-quest { position: static; }.quest-layout { grid-template-columns: 1fr; }.featured-quest { display: block; }.report-layout { grid-template-columns: 1fr; }.insight-rail { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  :root { --sidebar: 0px; }
  .sidebar { width: 260px; transform: translateX(-100%); transition: transform .25s ease; }.sidebar.is-open { transform: none; }.sidebar .brand { justify-content: flex-start; padding-inline: 10px; }.sidebar .brand > span:last-child, .sidebar .nav-item > span:last-child, .sidebar .level-card { display: block; }.sidebar .nav-item { justify-content: flex-start; padding: 0 15px; }.mobile-menu { display: block; }.topbar { height: 64px; padding: 0 18px; }.topbar-title { margin-right: auto; margin-left: 12px; }.profile-button > span:last-child, .icon-button { display: none; } main { padding: 28px 16px 52px; }.page-heading, .welcome-row { align-items: flex-start; flex-direction: column; }.hero-cta, .page-heading > .primary-button { width: 100%; }.today-practice { grid-template-columns: 1fr; }.practice-visual { min-height: 280px; background-image: linear-gradient(0deg,var(--navy),transparent 65%),url("./assets/ace-rally-home-photo.png"); background-size: cover; background-position: 63% center; }.practice-content { padding: 0 22px 26px; }.metric-grid { grid-template-columns: 1fr 1fr; }.metric-grid article { min-height: 145px; }.home-bottom { grid-template-columns: 1fr; }.result-workspace { grid-template-columns: 1fr; }.sample-video { min-height: 460px; }.feedback-grid, .report-bottom { grid-template-columns: 1fr; }.period-switch { width: 100%; overflow-x: auto; }.compact-heading { align-items: stretch; }.featured-quest { display: block; }.practice-section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }.practice-history-list { grid-template-columns: 1fr; }.lesson-card-body { grid-template-columns: 1fr; }.lesson-media { min-height: 210px; }.lesson-form-panel { padding: 22px; }.insight-rail { grid-template-columns: 1fr; }.report-tabs { border-radius: 16px; }.trend-card { min-height: 420px; padding: 20px; }.line-chart { height: 300px; }.toast { right: 16px; bottom: 16px; left: 16px; max-width: none; }
}

@media (max-width: 520px) {
  h1 { font-size: 32px; }.practice-meta { grid-template-columns: 1fr; }.practice-meta span { display: flex; align-items: center; justify-content: space-between; }.practice-meta small { margin: 0; }.metric-grid { grid-template-columns: 1fr; }.metric-grid article { min-height: 125px; }.recent-analysis { grid-template-columns: 1fr; }.analysis-setup { display: block; }.upload-card, .skill-picker { min-height: auto; padding: 26px 20px; }.skill-picker { margin-top: 16px; }.upload-actions { width: 100%; flex-direction: column; }.upload-actions > * { width: 100%; }.analysis-loading { grid-template-columns: 1fr; gap: 28px; padding: 30px 20px; text-align: center; }.analysis-invalid { min-height: 420px; padding: 38px 20px; }.analysis-invalid h2 { font-size: 25px; }.analysis-invalid ul { padding: 18px; }.sample-video { min-height: 390px; }.skeleton { transform: translate(-50%,-50%) scale(.78); }.quest-card { grid-template-columns: 54px 1fr; }.quest-card .quest-values { grid-column: 2; text-align: left; }.featured-content { grid-template-columns: 1fr; }.progress-ring { margin-bottom: 10px; }.lesson-card-head { flex-wrap: wrap; }.lesson-card-head .coach-name { width: 100%; margin-left: 0; }.lesson-timeline { padding-left: 14px; }.lesson-card::before { left: -16px; }.report-bottom { display: block; }.report-bottom article + article { margin-top: 14px; }
}

/* 기존 모바일 헤더 규칙보다 우선해 두 줄형 고정 메뉴의 높이를 보장합니다. */
@media (max-width: 820px) {
  .topbar { display: grid; height: 118px; grid-template-columns: 1fr auto; grid-template-rows: 50px 56px; gap: 0 12px; padding: 6px 14px; }
  .topbar-brand { min-width: 0; margin: 0; padding: 0; font-size: 18px; }
  .topbar-brand .brand-mark { width: 32px; height: 32px; font-size: 16px; }
  .topbar-actions { min-width: 0; }
  .top-nav { grid-column: 1 / -1; grid-row: 2; width: 100%; gap: 3px; padding: 4px; border-radius: 14px; }
  .top-nav-item { min-width: 0; min-height: 46px; padding: 0 8px; border-radius: 10px; font-size: 13px; }
  main { padding-top: 24px; }
}

@media (max-width: 390px) {
  .topbar-brand > .brand-wordmark { display: inline; }
  .top-nav-item { font-size: 12px; }
}

.topbar .topbar-brand { justify-content: flex-start; }
.topbar .topbar-brand > .brand-wordmark { display: inline; }
.topbar .topbar-brand > .brand-divider,
.topbar .topbar-brand > .brand-motivation { display: block; }

@media (max-width: 1180px) {
  .topbar .topbar-brand > .brand-motivation { display: block; }
}

/* 연습 카드의 수치와 선택 버튼을 한 덩어리로 정렬해 좁은 폭에서도 겹치지 않게 합니다. */
.quest-card { grid-template-columns: 70px minmax(0, 1fr) minmax(155px, auto); }
.quest-card .quest-values { display: grid; min-width: 155px; justify-items: end; gap: 5px; text-align: right; }
.quest-card .quest-values small { white-space: nowrap; }

.video-orientation-preview { width: min(440px, 100%); margin-top: 20px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.preview-video-stage { display: grid; height: 190px; place-items: center; overflow: hidden; border-radius: 11px; background: #071a2d; }
.preview-video-stage video { display: block; width: 100%; height: 100%; object-fit: contain; transform: rotate(var(--video-rotation, 0deg)); transition: transform .25s ease; }
.orientation-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px 0; color: var(--muted); font-size: 10px; text-align: left; }
.orientation-controls > div { display: flex; gap: 6px; }
.orientation-controls .secondary-button { min-height: 31px; padding: 0 9px; font-size: 9px; }
.actual-video video, .pose-overlay { transform: rotate(var(--video-rotation, 0deg)); transform-origin: center; }
.analysis-video-controls { position: absolute; z-index: 5; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 999px; background: rgba(7,26,45,.82); color: white; font-size: 11px; backdrop-filter: blur(8px); }
.analysis-video-controls button { display: grid; width: 28px; height: 28px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--yellow); color: var(--navy); cursor: pointer; font-size: 11px; }
.analysis-video-controls button:hover { transform: scale(1.06); }

.account-button { min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--navy); cursor: pointer; font-size: 11px; font-weight: 800; }
.account-button:hover { border-color: var(--navy); }
.auth-modal { position: relative; width: min(440px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.auth-modal > p:not(.section-label) { margin: 8px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.auth-modal h2 { font-size: 28px; }
.auth-provider-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.oauth-button { min-height: 46px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--navy); cursor: pointer; font-size: 11px; font-weight: 800; }
.oauth-button.kakao { border-color: #f4d427; background: #fee500; color: #191919; }
.auth-divider { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 20px 0; color: var(--muted); font-size: 10px; }
.auth-divider::before, .auth-divider::after { height: 1px; background: var(--line); content: ""; }
.auth-modal form { display: grid; gap: 12px; }
.auth-modal label { display: grid; gap: 6px; color: var(--navy); font-size: 10px; font-weight: 800; }
.auth-modal input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--ivory); color: var(--ink); }
.auth-form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 6px; }
.auth-status { min-height: 18px; margin: 13px 0 0; color: var(--green); font-size: 10px; line-height: 1.5; }

@media (max-width: 1350px) {
  .quest-layout { grid-template-columns: 1fr; }
  .featured-quest { position: static; }
}

@media (max-width: 520px) {
  .quest-card .quest-values { justify-items: start; text-align: left; }
  .orientation-controls { align-items: flex-start; flex-direction: column; }
  .account-button { min-height: 34px; padding: 0 10px; font-size: 10px; }
  .auth-modal { padding: 28px 20px; }
  .auth-provider-row { grid-template-columns: 1fr; }
}

@media (max-width: 1180px) {
  .role-model-picker { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .role-model-dashboard { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .role-model-section { padding: 18px; }
  .role-model-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .role-model-heading h2 { font-size: 21px; }
  .role-model-heading > small { max-width: none; text-align: left; }
  .role-model-picker { display: flex; width: 100%; max-width: 100%; gap: 12px; margin: 0; padding: 0 0 10px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; }
  .role-model-option { box-sizing: border-box; flex: 0 0 calc(100% - 52px); min-width: 0; min-height: 104px; scroll-snap-align: start; }
  .role-model-chart-card, .role-model-progress { min-height: auto; }
  .radar-chart { height: 290px; }
  .actual-video video { height: 460px; }
  .role-model-progress { padding: 22px; }
  .next-role-step { margin-top: 14px; }
}

@media (max-width: 520px) {
  .role-model-picker { gap: 10px; }
  .role-model-option { flex-basis: calc(100% - 42px); min-height: 92px; }
  .role-model-chart-card { padding: 18px 14px; }
  .role-model-selected { display: block; }
  .role-legend { margin-top: 10px; }
  .radar-chart { height: 260px; }
  .actual-video video { height: 390px; }
  .role-model-progress h3 { font-size: 21px; }
}

@media (max-width: 700px) {
  .motion-library, .reference-video { grid-template-columns: 1fr; padding: 22px; }
  .motion-clips { display: flex; overflow-x: auto; }
  .motion-clip { flex: 0 0 160px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
