:root{
  --bg:#f3f5f8; --panel:#ffffff; --text:#111827; --muted:#6b7280; --border:#d9dee7;
  --navy:#0b1220; --accent:#2563eb; --accent-soft:#eaf1ff; --red:#ef4444; --green:#16a34a;
  --amber:#d97706; --purple:#7c3aed; --shadow:0 6px 20px rgba(15,23,42,.06);
}
*{box-sizing:border-box}html{background:var(--bg)}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Noto Sans KR","Apple SD Gothic Neo",sans-serif;color:var(--text);background:var(--bg)}button,select{font:inherit}button{cursor:pointer}.hidden{display:none!important}
.app-shell{width:min(1480px,100%);margin:0 auto;padding:22px}.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.top-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.account-status{display:flex;align-items:center;gap:7px;border:1px solid var(--border);background:#fff;border-radius:999px;padding:8px 11px;font-size:11px;color:var(--muted)}.account-dot{width:8px;height:8px;border-radius:50%;background:#94a3b8;flex:0 0 auto}.account-status.online .account-dot{background:#16a34a}.sync-label{font-weight:800;color:var(--accent)}.topbar h1{font-size:32px;margin:0;letter-spacing:-.04em}.subtitle{margin:5px 0 0;color:var(--muted)}.eyebrow{font-size:11px;font-weight:800;letter-spacing:.16em;color:var(--accent);margin:0 0 4px}
.layout{display:grid;grid-template-columns:minmax(300px,390px) minmax(0,1fr);gap:16px;align-items:start}.sidebar,.content{display:grid;gap:14px;min-width:0}.panel{background:var(--panel);border:1px solid var(--border);border-radius:18px;padding:16px;box-shadow:var(--shadow)}.panel h2{font-size:17px;margin:0;letter-spacing:-.025em}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.panel-head.compact{align-items:flex-start}.muted{color:var(--muted)}.tiny{font-size:12px;margin:4px 0 0}.full{width:100%}
.btn,.icon-btn,.tab,.mode-btn,.set-btn,.choice-btn{border:1px solid var(--border);background:#fff;color:var(--text);border-radius:12px;min-height:42px;padding:0 13px;font-weight:700}.btn.primary{background:var(--navy);color:white;border-color:var(--navy)}.btn.ghost{background:#fff}.btn.small{min-height:38px;padding:0 11px}.icon-btn{width:40px;padding:0;font-size:22px}.btn:hover,.icon-btn:hover,.tab:hover,.mode-btn:hover,.set-btn:hover,.choice-btn:hover{border-color:#9ca3af}.calendar-nav{display:flex;gap:6px;align-items:center}
.weekday-grid,.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}.weekday-grid{font-size:11px;color:var(--muted);text-align:center;margin-top:14px}.calendar-day{min-height:60px;border:1px solid var(--border);background:#fff;border-radius:11px;padding:6px 3px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:5px}.calendar-day.selected{border-color:var(--accent);background:var(--accent-soft)}.calendar-day.today .date-num{color:var(--accent);font-weight:900}.calendar-day .date-num{font-size:13px}.calendar-day .day-status{font-size:9px;color:var(--muted);line-height:1.2;text-align:center}.calendar-empty{min-height:60px}.legend{display:flex;gap:9px;flex-wrap:wrap;margin-top:12px;font-size:10px;color:var(--muted)}
.date-line{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.badge{display:inline-flex;align-items:center;border-radius:999px;border:1px solid var(--border);padding:5px 9px;font-size:11px;font-weight:800;white-space:nowrap}.badge.neutral{background:#f8fafc}.summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:13px}.summary-grid>div{padding:9px;border:1px solid var(--border);border-radius:12px;text-align:center}.summary-grid span{display:block;color:var(--muted);font-size:10px}.summary-grid b{display:block;font-size:12px;margin-top:3px}.select{border:1px solid var(--border);border-radius:12px;min-height:44px;background:white;padding:0 12px;margin-top:10px}.notice{background:#f8fafc;border:1px solid var(--border);border-radius:13px;padding:11px 12px;font-size:13px;line-height:1.5;margin-top:11px}.recovery-row{margin-bottom:11px}.recovery-label{display:flex;justify-content:space-between;gap:10px;font-size:12px;margin-bottom:5px}.recovery-label span:last-child{color:var(--muted)}.progress{height:7px;background:#e5e7eb;border-radius:999px;overflow:hidden}.progress>span{display:block;height:100%;background:var(--accent);border-radius:999px}.settings-panel summary{font-weight:800;cursor:pointer}.pattern-settings{display:grid;gap:14px;margin:14px 0}.pattern-row>strong{font-size:12px}.days-check{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}.day-check{display:flex;align-items:center;gap:4px;border:1px solid var(--border);border-radius:10px;padding:7px 8px;font-size:11px}.day-check input{margin:0}
.coach-grid{display:grid;grid-template-columns:1fr auto;gap:16px;align-items:start}.coaching-panel h2{margin:0;font-size:20px}.coaching-panel .muted{font-size:13px;line-height:1.55;margin:6px 0 0}.mode-key{display:grid;grid-template-columns:repeat(2,auto);gap:7px 10px;font-size:11px}.mode-key span{border:1px solid var(--border);border-radius:10px;padding:7px 9px}.tabs{display:flex;gap:8px;flex-wrap:wrap}.tab.active{background:var(--navy);color:#fff;border-color:var(--navy)}
.routine-list{display:grid;gap:14px}.exercise-card{display:block;background:#fff;border:1px solid var(--border);border-radius:18px;overflow:hidden;box-shadow:var(--shadow)}.exercise-media{background:#f8fafc;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:12px 16px;border-bottom:1px solid var(--border)}.exercise-media img{display:block;width:min(100%,860px);height:auto;max-height:245px;object-fit:contain;border-radius:12px;cursor:zoom-in;image-rendering:auto}.exercise-body{padding:15px 17px 17px;min-width:0}.exercise-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.exercise-num{font-size:11px;color:var(--muted);font-weight:800}.exercise-title{font-size:17px;font-weight:900;margin-top:2px;letter-spacing:-.025em}.exercise-target{margin-top:4px;font-size:14px}.recommend-pill{border:1px solid var(--border);border-radius:999px;padding:6px 9px;font-size:11px;font-weight:900;white-space:nowrap}.recommend-pill.up{background:#eff6ff;color:#1d4ed8}.recommend-pill.down{background:#fff7ed;color:#c2410c}.recommend-pill.rest{background:#f3f4f6;color:#4b5563}.recommend-pill.maintain{background:#f0fdf4;color:#15803d}.form-tip{margin-top:11px;padding:10px 11px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;font-size:12px;line-height:1.45}.mode-section,.sets-section{margin-top:12px}.section-label{font-size:10px;color:var(--muted);margin-bottom:6px}.mode-buttons,.set-buttons{display:flex;gap:7px;flex-wrap:wrap}.mode-btn.active,.set-btn.done{background:var(--navy);color:white;border-color:var(--navy)}.override-note{font-size:10px;color:var(--amber);margin-top:6px;font-weight:700}
.core-panel,.recommendation-panel,.company-panel{margin-top:16px}.core-list{display:flex;gap:7px;flex-wrap:wrap}.core-chip{border:1px solid var(--border);border-radius:11px;padding:8px 10px;font-size:11px}.recommendations{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.recommend-card{display:grid;grid-template-columns:230px minmax(0,1fr);align-items:start;border:1px solid var(--border);border-radius:16px;overflow:hidden}.recommend-card img{display:block;width:100%;height:auto;max-height:195px;object-fit:contain;background:#f8fafc;padding:8px;cursor:zoom-in}.recommend-content{padding:14px}.recommend-content h3{font-size:16px;margin:3px 0 7px}.recommend-content p{font-size:12px;color:var(--muted);line-height:1.5}.recommend-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.replace-select{width:100%;min-height:40px;border:1px solid var(--border);border-radius:10px;padding:0 9px;margin-top:8px;background:#fff}.company-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:12px}.company-grid>div{border:1px solid var(--border);border-radius:12px;padding:11px}.company-grid b{font-size:12px}.company-grid span{display:block;font-size:10px;color:var(--muted);margin-top:4px}
.empty-state{padding:34px 16px;text-align:center;border:1px solid var(--border);border-radius:16px;background:#fff}.empty-state b{display:block}.empty-state span{font-size:12px;color:var(--muted);display:block;margin-top:5px}
@media(max-width:1100px){.layout{grid-template-columns:minmax(280px,340px) minmax(0,1fr)}.exercise-media img{width:100%;max-height:220px}}
@media(max-width:980px){.layout{grid-template-columns:1fr}.sidebar{grid-template-columns:repeat(2,minmax(0,1fr))}.calendar-panel{grid-row:span 2}.exercise-media img{width:min(100%,900px);max-height:260px}.recommendations{grid-template-columns:1fr}.company-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:680px){.app-shell{padding:12px}.topbar h1{font-size:26px}.topbar{align-items:flex-start}.sidebar{grid-template-columns:1fr}.calendar-panel{grid-row:auto}.coach-grid{grid-template-columns:1fr}.mode-key{grid-template-columns:repeat(4,1fr)}.mode-key span{text-align:center;padding:7px 4px}.exercise-media{padding:10px 8px;border-bottom:1px solid var(--border)}.exercise-media img{width:100%;height:auto;max-height:235px;object-fit:contain}.exercise-body{padding:13px}.exercise-title{font-size:16px}.recommend-card{grid-template-columns:1fr}.recommend-card img{width:100%;height:auto;max-height:210px;object-fit:contain}.company-grid{grid-template-columns:1fr 1fr}.calendar-day,.calendar-empty{min-height:55px}.summary-grid{gap:5px}.tabs{display:grid;grid-template-columns:repeat(3,1fr)}.tab{padding:0 7px;font-size:12px}.btn,.mode-btn,.set-btn,.choice-btn{min-height:44px}.topbar .subtitle{font-size:12px}}
@media(max-width:400px){.company-grid{grid-template-columns:1fr}.mode-key{grid-template-columns:repeat(2,1fr)}.summary-grid{grid-template-columns:1fr}.calendar-day{padding-left:1px;padding-right:1px}.calendar-day .day-status{font-size:8px}}

.photo-dialog{border:0;border-radius:18px;padding:0;max-width:min(760px,92vw);width:max-content;background:#fff;box-shadow:0 24px 70px rgba(15,23,42,.28)}.photo-dialog::backdrop{background:rgba(15,23,42,.66)}.photo-dialog-inner{padding:14px;min-width:0}.photo-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.photo-dialog-title{font-weight:900;font-size:16px}.photo-dialog-close{border:1px solid var(--border);background:#fff;border-radius:10px;min-width:42px;min-height:42px;font-size:20px}.photo-dialog img{display:block;max-width:min(720px,86vw);max-height:72vh;width:auto;height:auto;object-fit:contain;border-radius:12px;background:#f8fafc}.photo-hint{font-size:10px;color:var(--muted);margin-top:5px;text-align:center}


/* Account + cloud sync */
.auth-dialog{border:0;border-radius:20px;padding:0;width:min(460px,92vw);max-width:92vw;background:#fff;box-shadow:0 24px 70px rgba(15,23,42,.3)}
.auth-dialog::backdrop{background:rgba(15,23,42,.58)}
.auth-dialog-inner{padding:20px}.auth-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.auth-head h2{margin:0;font-size:24px}.auth-head .muted{font-size:12px;line-height:1.5;margin:5px 0 0}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:18px}.auth-tab{min-height:42px;border:1px solid var(--border);border-radius:11px;background:#fff;font-weight:800}.auth-tab.active{background:var(--navy);color:#fff;border-color:var(--navy)}
.auth-form{display:grid;gap:12px;margin-top:14px}.auth-form label{font-size:12px;font-weight:800}.auth-form input{display:block;width:100%;box-sizing:border-box;margin-top:6px;min-height:46px;border:1px solid var(--border);border-radius:12px;padding:0 12px;font-size:16px;outline:none}.auth-form input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.auth-message{min-height:18px;font-size:12px;color:#dc2626}.auth-message.ok{color:#15803d}.auth-note{margin-top:13px;padding:10px 11px;background:#f8fafc;border:1px solid var(--border);border-radius:12px;color:var(--muted);font-size:11px;line-height:1.5}
.account-menu{display:flex;gap:7px;align-items:center}.btn.danger-text{color:#b91c1c}
@media(max-width:680px){.topbar{flex-direction:column}.top-actions{width:100%;justify-content:flex-start}.account-status{max-width:100%;white-space:normal}.exercise-media img{max-height:235px}}

.version-badge{display:inline-flex;align-items:center;min-height:34px;padding:0 10px;border-radius:999px;border:1px solid #bfdbfe;background:#eff6ff;color:#1d4ed8;font-size:11px;font-weight:800;white-space:nowrap}
.update-toast{position:fixed;right:18px;bottom:18px;z-index:9999;border:1px solid #bbf7d0;background:#f0fdf4;color:#166534;border-radius:12px;padding:11px 14px;font-size:13px;font-weight:800;box-shadow:0 12px 28px rgba(15,23,42,.16)}
.update-toast.hidden{display:none}
@media(max-width:680px){.version-badge{font-size:10px;min-height:32px}.update-toast{left:14px;right:14px;bottom:14px;text-align:center}}

.exercise-media::after{content:'사진 클릭 시 크게 보기';position:absolute;opacity:0;pointer-events:none}

/* v7: 운동 자세 사진은 자르지 않고 시작/끝을 각각 크게 표시 */
.exercise-media{position:relative;padding:16px 18px;background:#f8fafc;overflow:visible}
.exercise-media.paired{display:grid;grid-template-columns:minmax(0,1fr) 34px minmax(0,1fr);gap:10px;align-items:center;justify-items:stretch}
.pose-shot{margin:0;min-width:0;display:flex;flex-direction:column;align-items:center;gap:7px}
.pose-shot img{display:block;width:100%;height:auto;max-height:none!important;object-fit:contain!important;border-radius:12px;background:#fff;border:1px solid #e5e7eb;cursor:zoom-in}
.pose-shot figcaption{font-size:11px;font-weight:900;color:#475569;line-height:1}
.pose-arrow{font-size:30px;font-weight:900;color:#ef4444;text-align:center;line-height:1}
.exercise-media .single-photo{display:block;width:auto;max-width:100%;height:auto;max-height:340px;object-fit:contain;border-radius:12px;cursor:zoom-in}
@media(max-width:680px){
  .exercise-media{padding:12px}
  .exercise-media.paired{grid-template-columns:1fr;gap:8px}
  .pose-arrow{transform:rotate(90deg);font-size:26px;margin:-2px 0}
  .pose-shot img{width:min(100%,520px);margin:0 auto}
  .pose-shot figcaption{font-size:12px}
  .exercise-media .single-photo{width:100%;max-height:none}
}

/* v8: 운동 사진은 하나의 전체 가이드로 표시. 확대/잘라내기 없이 원본 전체 노출 */
.exercise-media{display:flex!important;align-items:center;justify-content:center;padding:16px 18px!important;background:#f8fafc;overflow:hidden!important}
.exercise-media.paired{display:flex!important;grid-template-columns:none!important}
.exercise-media .single-photo,.exercise-media>img.zoomable-photo{display:block!important;width:min(100%,1200px)!important;max-width:1200px!important;height:auto!important;max-height:390px!important;object-fit:contain!important;object-position:center!important;border-radius:14px;background:#f8fafc;cursor:zoom-in}
.pose-shot,.pose-arrow{display:none!important}
@media(max-width:680px){
  .exercise-media{padding:10px 8px!important}
  .exercise-media .single-photo,.exercise-media>img.zoomable-photo{width:100%!important;max-height:300px!important;object-fit:contain!important}
}


/* v9: 고화질 전체 가이드 이미지 + 운동부위 + 세트 완료 후 다음 강도 선택 */
.exercise-media{padding:12px!important;background:#f8fafc!important;overflow:visible!important}
.exercise-media .single-photo,.exercise-media>img.zoomable-photo{
  display:block!important;width:min(100%,1408px)!important;max-width:1408px!important;
  height:auto!important;max-height:none!important;object-fit:contain!important;object-position:center!important;
  border-radius:14px;background:#fff;cursor:zoom-in;image-rendering:auto;
}
.muscle-summary{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.muscle-summary>div{border:1px solid #dbe4ef;background:#f8fbff;border-radius:12px;padding:10px 12px;min-width:0}
.muscle-summary span{display:block;font-size:10px;color:#64748b;font-weight:800;margin-bottom:3px}
.muscle-summary b{display:block;font-size:13px;color:#0f172a;line-height:1.4;word-break:keep-all}
.step-section{margin-top:14px;border:1px solid #dbe4ef;border-radius:14px;padding:12px;background:#fff}
.step-head{display:flex;align-items:flex-start;gap:9px;margin-bottom:10px}
.step-num{flex:0 0 auto;width:26px;height:26px;border-radius:999px;background:#0b5bd3;color:#fff;display:grid;place-items:center;font-weight:900;font-size:13px}
.step-head b{display:block;font-size:13px}.step-head small{display:block;font-size:10px;color:#64748b;margin-top:2px;line-height:1.4}
.mode-section.locked{background:#f8fafc}.mode-section.locked .step-num{background:#94a3b8}
.next-mode-btn{min-height:44px;border:1px solid var(--border);border-radius:11px;background:#fff;padding:0 14px;font-weight:800;color:#111827}
.next-mode-btn.active{background:var(--navy);color:#fff;border-color:var(--navy)}
.next-mode-btn:disabled{opacity:.42;cursor:not-allowed;background:#f1f5f9;color:#64748b}
.next-mode-note{font-size:10px;margin-top:8px;font-weight:800;line-height:1.45}
.next-mode-note.locked{color:#64748b}.next-mode-note.ready{color:#0b5bd3}.next-mode-note.selected{color:#15803d}
.rest-set-note{font-size:11px;color:#64748b;font-weight:700;padding:8px 0;display:inline-block}
@media(max-width:680px){
  .exercise-media{padding:7px!important}
  .exercise-media .single-photo,.exercise-media>img.zoomable-photo{width:100%!important;max-height:none!important}
  .muscle-summary{grid-template-columns:1fr}.muscle-summary b{font-size:12px}
  .step-section{padding:10px}.mode-buttons,.set-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .next-mode-btn,.set-btn{width:100%}
}

/* v9 photo zoom: 원본 비율을 유지하며 화면 대부분을 사용 */
.photo-dialog{max-width:96vw!important;width:min(1120px,96vw)!important}
.photo-dialog img{max-width:92vw!important;max-height:88vh!important;width:auto!important;height:auto!important;object-fit:contain!important}


/* v10: 운동 전 강도 → 세트 → 다음 강도 */
.today-mode-btn{min-height:44px;border:1px solid var(--border);border-radius:11px;background:#fff;padding:0 14px;font-weight:800;color:#111827}
.today-mode-btn.active{background:var(--navy);color:#fff;border-color:var(--navy)}
.today-mode-btn:disabled{opacity:.62;cursor:not-allowed;background:#f1f5f9;color:#64748b}
.today-mode-section.locked{background:#f8fafc}.today-mode-section.locked .step-num{background:#64748b}
.today-mode-note{font-size:10px;margin-top:8px;font-weight:800;line-height:1.45}
.today-mode-note.ready{color:#0b5bd3}.today-mode-note.changed{color:#c2410c}.today-mode-note.locked{color:#64748b}
@media(max-width:680px){.today-mode-btn{width:100%}}


/* v10.1: 사진 크기 축소로 사진+세트+강도 영역이 한 화면에 더 잘 담기도록 조정 */
.exercise-media{padding:8px 10px!important;background:#f8fafc!important}
.exercise-media .single-photo,.exercise-media>img.zoomable-photo{
  width:min(100%,980px)!important;
  max-width:980px!important;
  max-height:230px!important;
  height:auto!important;
  object-fit:contain!important;
  object-position:center!important;
}
.exercise-body{padding:12px 15px 15px!important}
.form-tip{margin-top:8px;padding:8px 10px;font-size:11px}
.muscle-summary{margin-top:8px!important;gap:6px!important}
.muscle-summary>div{padding:8px 10px!important}
.step-section{margin-top:10px!important;padding:10px!important}
.step-head{margin-bottom:8px!important}
.step-head b{font-size:12px!important}
.step-head small{font-size:10px!important}
.today-mode-note,.next-mode-note,.rest-set-note{font-size:10px!important}
@media(max-width:980px){
  .exercise-media .single-photo,.exercise-media>img.zoomable-photo{max-height:210px!important;width:min(100%,900px)!important}
}
@media(max-width:680px){
  .exercise-media{padding:6px!important}
  .exercise-media .single-photo,.exercise-media>img.zoomable-photo{
    width:100%!important;
    max-height:170px!important;
  }
  .exercise-body{padding:11px 12px 13px!important}
  .step-section{padding:9px!important}
}


/* v10.2: 데스크톱 운동카드 2열 배치 - 왼쪽 큰 자세사진, 오른쪽 운동 입력/조절 */
@media (min-width: 860px){
  .exercise-card{
    display:grid!important;
    grid-template-columns:minmax(380px,47%) minmax(0,53%)!important;
    align-items:stretch;
  }
  .exercise-media{
    grid-column:1;
    grid-row:1;
    padding:14px!important;
    border-bottom:0!important;
    border-right:1px solid var(--border)!important;
    min-height:100%;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    background:#f8fafc!important;
  }
  .exercise-media .single-photo,.exercise-media>img.zoomable-photo{
    width:100%!important;
    max-width:620px!important;
    max-height:500px!important;
    height:auto!important;
    object-fit:contain!important;
    object-position:center!important;
  }
  .exercise-body{
    grid-column:2;
    grid-row:1;
    padding:14px 15px 15px!important;
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
  }
  .exercise-title{font-size:16px!important}
  .exercise-target{font-size:13px!important}
  .muscle-summary{margin-top:8px!important}
  .form-tip{margin-top:8px!important}
  .step-section{margin-top:9px!important;padding:9px 10px!important}
  .step-head{margin-bottom:7px!important}
  .mode-buttons,.set-buttons{gap:6px!important}
  .today-mode-btn,.next-mode-btn,.set-btn{min-height:40px!important;padding:0 11px!important;font-size:12px!important}
}

@media (min-width: 860px) and (max-width: 1120px){
  .exercise-card{grid-template-columns:minmax(330px,44%) minmax(0,56%)!important}
  .exercise-media .single-photo,.exercise-media>img.zoomable-photo{max-height:450px!important}
  .exercise-body{padding:12px 13px 13px!important}
  .step-section{padding:8px 9px!important}
}

@media (max-width: 859px){
  .exercise-card{display:block!important}
  .exercise-media{border-right:0!important;border-bottom:1px solid var(--border)!important}
  .exercise-media .single-photo,.exercise-media>img.zoomable-photo{max-height:280px!important}
}

@media (max-width: 680px){
  .exercise-media .single-photo,.exercise-media>img.zoomable-photo{max-height:230px!important}
}


/* v10.3: 사진 상단 + 운동부위/운동방향 하단, 우측에 강도/세트 입력 고정 */
.exercise-left,.exercise-right{min-width:0}
.exercise-info-panels{padding:10px 14px 14px;background:#fff}
.direction-box{margin-top:8px;border:1px solid #dbe4ef;background:#f8fbff;border-radius:12px;padding:10px 12px}
.direction-box span{display:block;font-size:10px;color:#64748b;font-weight:800;margin-bottom:4px}
.direction-box b{display:block;font-size:12px;line-height:1.5;color:#0f172a;font-weight:700;word-break:keep-all}
@media (min-width: 900px){
  .exercise-card{display:grid!important;grid-template-columns:minmax(420px,44%) minmax(0,56%)!important;align-items:start!important}
  .exercise-left{grid-column:1;grid-row:1;display:flex;flex-direction:column;align-self:stretch;border-right:1px solid var(--border)}
  .exercise-right{grid-column:2;grid-row:1;padding:14px 14px 14px 16px!important}
  .exercise-media{padding:10px 12px 6px!important;border-bottom:0!important;background:#f8fafc!important;justify-content:center!important}
  .exercise-media .single-photo,.exercise-media>img.zoomable-photo{width:100%!important;max-width:560px!important;max-height:360px!important;height:auto!important;object-fit:contain!important}
  .exercise-info-panels{padding:8px 12px 12px!important;border-top:1px solid var(--border)}
  .muscle-summary{margin-top:0!important;gap:8px!important}
  .muscle-summary>div{padding:9px 10px!important}
  .form-tip{margin-top:8px!important;padding:9px 10px!important;font-size:11px!important}
  .direction-box{margin-top:8px!important;padding:9px 10px!important}
  .exercise-title{font-size:18px!important}.exercise-target{font-size:14px!important}
}
@media (max-width: 899px){
  .exercise-card{display:block!important}
  .exercise-left{display:block}
  .exercise-right{padding:12px!important}
  .exercise-media{padding:10px 8px 6px!important;border-bottom:0!important;background:#f8fafc!important}
  .exercise-media .single-photo,.exercise-media>img.zoomable-photo{width:100%!important;max-width:520px!important;max-height:310px!important;height:auto!important;object-fit:contain!important}
  .exercise-info-panels{padding:8px 10px 10px!important;border-top:1px solid var(--border)}
  .muscle-summary{grid-template-columns:1fr 1fr!important;margin-top:0!important}
  .direction-box,.form-tip{margin-top:8px!important}
}
@media (max-width: 640px){
  .exercise-media .single-photo,.exercise-media>img.zoomable-photo{max-height:290px!important}
  .muscle-summary{grid-template-columns:1fr!important}
}


/* v10.4: 상단 빈공간 제거 + 왼쪽 컬럼을 사진 상단/운동부위 하단으로 꽉 채우기 */
.exercise-left,.exercise-right{min-width:0}
.exercise-left{display:flex;flex-direction:column;justify-content:flex-start}
.exercise-right{display:flex;flex-direction:column;justify-content:flex-start}
@media (min-width: 900px){
  .exercise-card{
    display:grid!important;
    grid-template-columns:minmax(430px,46%) minmax(0,54%)!important;
    align-items:start!important;
  }
  .exercise-left{
    grid-column:1;grid-row:1;
    display:flex!important;
    flex-direction:column!important;
    align-self:start!important;
    border-right:1px solid var(--border)!important;
    background:#fff;
  }
  .exercise-media{
    display:block!important;
    padding:8px 10px 4px!important;
    margin:0!important;
    background:#f8fafc!important;
    border-bottom:0!important;
    border-right:0!important;
    min-height:0!important;
    height:auto!important;
    overflow:visible!important;
    text-align:center!important;
  }
  .exercise-media .single-photo,.exercise-media>img.zoomable-photo{
    display:block!important;
    width:100%!important;
    max-width:600px!important;
    max-height:335px!important;
    height:auto!important;
    margin:0 auto!important;
    object-fit:contain!important;
    object-position:top center!important;
    border-radius:12px!important;
    background:#f8fafc!important;
  }
  .exercise-info-panels{
    padding:6px 10px 10px!important;
    border-top:0!important;
    background:#fff!important;
  }
  .muscle-summary{
    grid-template-columns:1fr 1fr!important;
    margin-top:0!important;
    gap:8px!important;
  }
  .muscle-summary>div,.direction-box,.form-tip{
    padding:9px 10px!important;
  }
  .direction-box{margin-top:8px!important}
  .form-tip{margin-top:8px!important;font-size:11px!important;line-height:1.5!important}
  .exercise-right{
    grid-column:2;grid-row:1;
    padding:12px 14px 12px 14px!important;
    align-self:start!important;
  }
  .exercise-top{margin-bottom:4px!important}
  .exercise-num{font-size:11px!important}
  .exercise-title{font-size:17px!important;line-height:1.2!important}
  .exercise-target{font-size:14px!important;margin-top:3px!important}
  .step-section{margin-top:10px!important;padding:10px 11px!important}
  .step-head{margin-bottom:8px!important}
  .today-mode-btn,.next-mode-btn,.set-btn{min-height:42px!important;padding:0 12px!important;font-size:12px!important}
}
@media (max-width: 899px){
  .exercise-card{display:block!important}
  .exercise-left{display:block!important;border-right:0!important}
  .exercise-right{padding:12px!important}
  .exercise-media{padding:8px 8px 4px!important;min-height:0!important;height:auto!important;justify-content:flex-start!important}
  .exercise-media .single-photo,.exercise-media>img.zoomable-photo{width:100%!important;max-width:520px!important;max-height:320px!important;height:auto!important;object-fit:contain!important;object-position:top center!important}
  .exercise-info-panels{padding:6px 8px 10px!important}
}
@media (max-width: 640px){
  .muscle-summary{grid-template-columns:1fr!important}
  .exercise-media .single-photo,.exercise-media>img.zoomable-photo{max-height:300px!important}
}


/* v10.6: 사용자가 지정한 2열 - 왼쪽 사진+자극/설명, 오른쪽 강도/세트; 각 패널 높이는 독립 */
.exercise-card{display:grid!important;grid-template-columns:minmax(0,46%) minmax(0,54%)!important;gap:10px!important;background:transparent!important;border:0!important;box-shadow:none!important;overflow:visible!important;align-items:start!important}
.exercise-left-pane,.exercise-right-pane{background:#fff;border:1px solid var(--border);border-radius:16px;overflow:hidden;box-shadow:var(--shadow);min-width:0}
.exercise-right-pane{padding:12px 13px 13px}
.compact-photo-wrap{position:relative!important;padding:8px 8px 4px!important;margin:0!important;background:#f8fafc!important;border:0!important;min-height:0!important;height:auto!important;display:flex!important;align-items:flex-start!important;justify-content:center!important;overflow:hidden!important}
.compact-photo-wrap .single-photo{display:block!important;width:100%!important;max-width:none!important;height:auto!important;max-height:390px!important;object-fit:contain!important;object-position:top center!important;margin:0!important;border-radius:10px!important;background:#f8fafc!important}
.movement-arrow{position:absolute;left:50%;top:48%;transform:translate(-50%,-50%);z-index:3;color:#ef2b2d;font-size:42px;line-height:1;font-weight:1000;text-shadow:0 2px 0 #fff,0 -2px 0 #fff,2px 0 0 #fff,-2px 0 0 #fff;pointer-events:none}
.compact-info{padding:5px 8px 8px!important;background:#fff!important;border-top:0!important}
.compact-info .muscle-summary{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;margin:0!important}
.compact-info .muscle-summary>div{padding:7px 9px!important;border-radius:10px!important}
.compact-info .muscle-summary span,.compact-info .direction-box span{font-size:9px!important;margin-bottom:2px!important}
.compact-info .muscle-summary b,.compact-info .direction-box b{font-size:11px!important;line-height:1.3!important}
.compact-info .direction-box{margin-top:6px!important;padding:7px 9px!important;border-radius:10px!important}
.compact-info .form-tip{margin-top:6px!important;padding:7px 9px!important;font-size:10px!important;line-height:1.35!important;border-radius:10px!important}
.exercise-right-pane .exercise-top{margin-bottom:5px!important}
.exercise-right-pane .exercise-title{font-size:17px!important;line-height:1.2!important}
.exercise-right-pane .exercise-target{font-size:13px!important;margin-top:2px!important}
.exercise-right-pane .step-section{margin-top:8px!important;padding:8px 9px!important;border-radius:12px!important}
.exercise-right-pane .step-head{margin-bottom:6px!important}
.exercise-right-pane .step-head b{font-size:12px!important}.exercise-right-pane .step-head small{font-size:9.5px!important;line-height:1.3!important}
.exercise-right-pane .today-mode-note,.exercise-right-pane .next-mode-note,.exercise-right-pane .rest-set-note{font-size:9.5px!important;line-height:1.3!important;margin-top:6px!important}
.exercise-right-pane .today-mode-btn,.exercise-right-pane .next-mode-btn,.exercise-right-pane .set-btn{min-height:38px!important;padding:0 11px!important;font-size:12px!important}
.exercise-right-pane .mode-buttons,.exercise-right-pane .set-buttons{gap:6px!important}
.routine-list{gap:12px!important}
@media(max-width:920px){
  .exercise-card{grid-template-columns:1fr!important;gap:8px!important}
  .compact-photo-wrap .single-photo{max-height:360px!important}
  .movement-arrow{font-size:38px}
}
@media(max-width:640px){
  .compact-photo-wrap .single-photo{max-height:320px!important}
  .compact-info .muscle-summary{grid-template-columns:1fr 1fr!important}
  .exercise-right-pane{padding:9px!important}
}

/* v10.7: 동작사진 상단 + 화살표, 운동부위는 반드시 사진 아래 별도 행 */
.muscle-visual-row{
  display:grid!important;
  grid-template-columns:150px minmax(0,1fr)!important;
  align-items:center!important;
  gap:10px!important;
  padding:6px 8px!important;
  border:1px solid #dbe4ef!important;
  border-radius:10px!important;
  background:#fff!important;
}
.muscle-map{
  display:block!important;
  width:150px!important;
  height:72px!important;
  object-fit:contain!important;
}
.muscle-copy span{display:block;font-size:10px;font-weight:900;color:#64748b;margin-bottom:2px}
.muscle-copy b{display:block;font-size:13px;line-height:1.25;color:#ef4444;word-break:keep-all}
.muscle-copy small{display:block;font-size:10px;color:#64748b;margin-top:3px}
.direction-box{display:none!important}
.exercise-info-panels .muscle-summary{display:none!important}
.exercise-info-panels{padding-top:5px!important}
.form-tip{margin-top:6px!important;padding:7px 9px!important;line-height:1.35!important}
@media (min-width:900px){
  .exercise-media .single-photo,.exercise-media>img.zoomable-photo{
    max-height:360px!important;
    width:100%!important;
  }
  .exercise-left{align-self:start!important}
}
@media(max-width:640px){
  .muscle-visual-row{grid-template-columns:120px minmax(0,1fr)!important}
  .muscle-map{width:120px!important;height:64px!important}
}


/* v10.8: 운동부위 줄을 예시 스크린샷처럼 간결하게 표시 */
.muscle-visual-row{
  display:grid!important;
  grid-template-columns:118px minmax(0,1fr)!important;
  gap:10px!important;
  align-items:center!important;
  padding:6px 8px!important;
  background:#f8fafc!important;
  border:1px solid #dbe4ef!important;
  border-radius:10px!important;
}
.muscle-map{width:118px!important;height:56px!important;object-fit:contain!important;display:block!important}
.muscle-copy{display:flex!important;flex-direction:column!important;justify-content:center!important;min-width:0}
.muscle-copy .muscle-primary,.muscle-copy .muscle-assist{display:block!important;line-height:1.25!important}
.muscle-copy .muscle-primary span,.muscle-copy .muscle-assist span{display:inline!important;font-size:11px!important;font-weight:800!important;color:#334155!important;margin:0 4px 0 0!important}
.muscle-copy .muscle-primary b{display:inline!important;font-size:12px!important;font-weight:900!important;color:#ef4444!important;word-break:keep-all!important}
.muscle-copy .muscle-assist b{display:inline!important;font-size:11px!important;font-weight:700!important;color:#475569!important;word-break:keep-all!important}
.muscle-copy .muscle-assist{margin-top:4px!important}
@media (max-width:640px){
  .muscle-visual-row{grid-template-columns:110px minmax(0,1fr)!important;padding:5px 6px!important;gap:8px!important}
  .muscle-map{width:110px!important;height:52px!important}
  .muscle-copy .muscle-primary span,.muscle-copy .muscle-assist span{font-size:10px!important}
  .muscle-copy .muscle-primary b{font-size:11px!important}
  .muscle-copy .muscle-assist b{font-size:10px!important}
}


/* v11: composite guide images + flexible set completion */
.exercise-card{display:grid!important;grid-template-columns:minmax(0,47%) minmax(0,53%)!important;gap:10px!important;background:transparent!important;border:0!important;box-shadow:none!important;overflow:visible!important;align-items:start!important}
.exercise-left-pane,.exercise-right-pane{background:#fff;border:1px solid var(--border);border-radius:16px;overflow:hidden;box-shadow:var(--shadow);min-width:0}
.guide-only-pane{padding:8px!important}
.guide-photo-wrap{padding:0!important;background:#fff!important;border:0!important;display:block!important}
.guide-photo-wrap .composite-guide{display:block!important;width:100%!important;max-width:none!important;height:auto!important;max-height:none!important;object-fit:contain!important;object-position:top center!important;border-radius:12px!important;background:#fff!important}
.guide-control-pane{padding:12px 13px 13px!important}
.compact-top-tip{margin-top:8px!important;margin-bottom:2px!important}
.exercise-right-pane .step-section{margin-top:8px!important;padding:9px 10px!important;border-radius:12px!important}
.exercise-right-pane .today-mode-btn,.exercise-right-pane .next-mode-btn,.exercise-right-pane .set-btn{min-height:40px!important;padding:0 10px!important;font-size:12px!important}
.set-btn.optional{border-style:dashed!important;background:#f8fafc!important;color:#334155!important}
.set-btn.optional.done{background:#0f172a!important;color:#fff!important;border-style:solid!important}
@media(max-width:920px){
  .exercise-card{grid-template-columns:1fr!important;gap:8px!important}
}


/* v12: 전신 부위별 회복도 */
.recovery-help{font-size:10px;line-height:1.45;color:#64748b;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:8px 9px;margin-bottom:9px}
.recovery-group-title{font-size:11px;font-weight:900;color:#0f172a;margin:10px 0 5px;padding-top:2px;border-top:1px solid #eef2f7}
.recovery-group-title:first-of-type{margin-top:4px;border-top:0}
.recovery-row{margin-bottom:7px}
.recovery-label span:first-child{font-weight:800}
.recovery-label span:last-child{font-size:9px}


/* v13 clarity upgrade */
.mini-info-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
.mini-info-box{border:1px solid var(--border);border-radius:12px;padding:10px 12px;background:#f8fbff}
.mini-info-box b{display:block;font-size:12px;color:#64748b;margin-bottom:4px}
.mini-info-box span{display:block;font-size:14px;font-weight:700;color:#0f172a;line-height:1.35}
.recovery-help{line-height:1.5}
@media(max-width:720px){.mini-info-grid{grid-template-columns:1fr}}

/* v13.2 layout fix */
.exercise-card{display:grid!important;grid-template-columns:minmax(0,51.5%) minmax(0,48.5%)!important;gap:10px!important;align-items:stretch!important;background:transparent!important;border:0!important;box-shadow:none!important;overflow:visible!important}
.exercise-left-pane,.exercise-right-pane{background:#fff;border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow);min-width:0;height:100%!important}
.exercise-left-pane{display:flex!important;flex-direction:column!important;justify-content:flex-start!important;overflow:hidden!important}
.guide-photo-wrap{padding:8px!important;background:#fff!important;border:0!important;display:flex!important;align-items:flex-start!important;justify-content:center!important;flex:1 1 auto!important;min-height:100%!important}
.guide-photo-wrap .composite-guide{display:block!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:contain!important;object-position:top center!important;border-radius:12px!important;background:#fff!important}
.exercise-right-pane{padding:11px 12px 12px!important}
.exercise-right-pane .step-section{margin-top:8px!important;padding:8px 9px!important;border-radius:12px!important}
.exercise-right-pane .today-mode-btn,.exercise-right-pane .next-mode-btn,.exercise-right-pane .set-btn{min-height:38px!important;padding:0 10px!important;font-size:12px!important}
.exercise-right-pane .step-head small,.exercise-right-pane .today-mode-note,.exercise-right-pane .next-mode-note,.exercise-right-pane .rest-set-note{font-size:10px!important;line-height:1.35!important}
@media (max-width:980px){.exercise-card{grid-template-columns:1fr!important;gap:8px!important}.guide-photo-wrap .composite-guide{height:auto!important}}

/* v13.3: 원본 사진 비율, 실제 입력 크기와 카드 너비에 맞춘 배치 */
.exercise-card{
  grid-template-columns:minmax(0,1.06fr) minmax(0,1fr)!important;
  align-items:start!important;
  gap:12px!important;
  container-type:inline-size;
}
.exercise-card .exercise-left-pane,.exercise-card .exercise-right-pane{
  height:auto!important;
  align-self:start!important;
  overflow:hidden!important;
}
.exercise-card .guide-only-pane{padding:8px!important}
.exercise-card .guide-photo-wrap{
  display:block!important;
  padding:0!important;
  min-height:0!important;
  height:auto!important;
  flex:0 0 auto!important;
  border:0!important;
}
.exercise-card .guide-photo-wrap .composite-guide{
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  object-fit:contain!important;
  margin:0!important;
}
.guide-caption{font-size:13px;line-height:1.5;padding:10px 6px 4px;overflow-wrap:anywhere}
.guide-caption>div:first-child{color:#dc2626;font-weight:700}
.guide-caption b{color:#334155;margin-right:5px}
.guide-caption .assist-copy{font-size:12px;color:#64748b;margin-top:3px}
.guide-caption p{display:flex;gap:8px;align-items:flex-start;margin:8px 0 0;padding-top:8px;border-top:1px solid var(--border);font-size:12px;color:#475569}
.direction-mark{color:#dc2626;font-size:21px;font-weight:900;line-height:1.1;flex:0 0 auto}
.exercise-card .exercise-right-pane{padding:14px!important}
.exercise-card .exercise-top{flex-wrap:wrap;gap:8px}
.exercise-top>div{flex:1 1 175px;min-width:0}
.exercise-card .exercise-title{font-size:18px!important;line-height:1.35!important;overflow-wrap:anywhere}
.exercise-card .exercise-target{font-size:14px!important;margin-top:4px!important}
.bilateral-note{font-size:11px;color:#64748b;line-height:1.4;margin-top:4px}
.mini-info-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px}
.mini-info-box{min-width:0;padding:8px 9px}
.mini-info-box b{font-size:11px}
.mini-info-box span{font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.exercise-details{margin-top:8px;border:1px solid var(--border);border-radius:10px;padding:0 10px;font-size:12px;line-height:1.5;color:#475569}
.exercise-details summary{cursor:pointer;min-height:40px;display:list-item;align-content:center;font-weight:700}
.exercise-details p{margin:7px 0 10px}
.exercise-card .step-section{padding:10px!important;margin-top:10px!important}
.exercise-card .step-head b{font-size:13px!important}
.exercise-card .step-head small,.exercise-card .today-mode-note,.exercise-card .next-mode-note,.exercise-card .rest-set-note{font-size:11px!important;line-height:1.5!important}
.exercise-card .today-mode-btn,.exercise-card .next-mode-btn,.exercise-card .set-btn{min-height:44px!important;padding:6px 8px!important;font-size:12px!important;width:auto}
.exercise-card .mode-buttons{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px!important}
.exercise-card .set-buttons{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px!important}
.actual-volume{font-size:12px;color:#2563eb;font-weight:700;margin:8px 0 0}
.summary-reps{display:block;font-size:11px;font-weight:600;color:#64748b;margin-top:4px;line-height:1.4}
.set-btn:disabled{cursor:not-allowed;opacity:.6}
button:focus-visible,select:focus-visible,.zoomable-photo:focus-visible,summary:focus-visible{outline:3px solid #2563eb;outline-offset:3px}
.photo-dialog{max-height:calc(100dvh - 24px);overflow:auto}
.photo-dialog img{max-height:calc(100dvh - 160px)!important;max-width:100%!important;margin:0 auto}
.auth-dialog{max-height:calc(100dvh - 24px);overflow:auto}
@container (max-width:780px){
  .exercise-card .mode-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:1200px) and (min-width:981px){
  .exercise-card{grid-template-columns:minmax(0,1fr)!important}
}
@media(max-width:980px){
  .exercise-card{grid-template-columns:minmax(0,1fr)!important}
}
@media(max-width:680px){
  .topbar{flex-direction:column;align-items:stretch}
  .top-actions{justify-content:flex-start}
  .account-status{max-width:100%;flex-wrap:wrap;border-radius:12px}
  .exercise-card .exercise-right-pane{padding:12px!important}
  .exercise-card .exercise-title{font-size:17px!important}
  .exercise-card .mode-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}
  .exercise-card .set-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}
  .guide-caption{font-size:12px}
}

/* v13.4: every exercise uses the same top/bottom 60:40 visual panel. */
.exercise-card,.recommend-card{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  align-items:stretch!important;
  gap:12px!important;
}
.exercise-card .exercise-visual-pane,.recommend-card .exercise-visual-pane{
  position:relative;
  display:block!important;
  padding:0!important;
  height:auto!important;
  min-height:560px;
  align-self:stretch!important;
  overflow:hidden!important;
}
.exercise-card .exercise-right-pane{
  height:auto!important;
  align-self:stretch!important;
}
.exercise-visual-grid{
  position:absolute;
  inset:8px;
  display:grid;
  grid-template-rows:minmax(0,3fr) minmax(0,2fr);
  overflow:hidden;
  border-radius:10px;
}
.posture-panel{
  display:grid;
  grid-template-rows:minmax(0,1fr);
  min-width:0;
  min-height:0;
  overflow:hidden;
  padding:0 0 8px;
  background:#fff;
}
.exercise-visual-pane .posture-image,.exercise-visual-pane .cropped-visual{
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  padding:0!important;
  margin:0!important;
  object-fit:contain!important;
  object-position:center!important;
  background:#fff!important;
  border-radius:8px;
  overflow:hidden;
  cursor:zoom-in;
}
.stimulus-panel{
  display:grid;
  grid-template-rows:minmax(0,1fr) auto auto;
  min-width:0;
  min-height:0;
  gap:7px;
  padding:10px 8px 6px;
  border-top:1px solid var(--border);
  background:#fff;
}
.stimulus-maps{
  display:grid;
  grid-template-columns:repeat(var(--stimulus-map-count),minmax(0,1fr));
  grid-template-rows:minmax(0,1fr);
  gap:10px;
  min-width:0;
  min-height:0;
}
.stimulus-labels{font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.stimulus-labels p{margin:0}
.stimulus-labels span{color:#334155;font-weight:800;margin-right:7px}
.stimulus-labels b{color:#dc2626;font-weight:800}
.stimulus-labels .stimulus-assist{margin-top:2px;font-size:12px;color:#64748b}
.stimulus-direction{display:flex;align-items:flex-start;gap:8px;margin:0;padding-top:7px;border-top:1px solid #eef2f7;font-size:12px;line-height:1.5;color:#475569;overflow-wrap:anywhere}
.recommendations{grid-template-columns:minmax(0,1fr)}
.recommend-card{border:0;background:transparent;overflow:visible}
.recommend-card .exercise-visual-pane{min-height:480px}
.recommend-content{background:#fff;border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow);min-width:0;padding:16px}
.photo-dialog-crop svg{display:block;width:100%;height:min(72dvh,760px);background:#fff;border-radius:12px;overflow:hidden}
@media(max-width:1200px){
  .exercise-card,.recommend-card{grid-template-columns:minmax(0,1fr)!important}
  .exercise-card .exercise-visual-pane,.recommend-card .exercise-visual-pane{
    height:clamp(520px,80vw,720px)!important;
    min-height:0;
  }
}
@media(max-width:680px){
  .exercise-card .exercise-visual-pane,.recommend-card .exercise-visual-pane{height:520px!important}
  .stimulus-panel{padding:8px 5px 4px;gap:6px}
  .stimulus-labels{font-size:12px}
  .stimulus-labels .stimulus-assist,.stimulus-direction{font-size:11px}
  .stimulus-maps{gap:6px}
}

/* v13.6: exercise progress, editable repetitions and individual set rows. */
.summary-grid .summary-count{color:var(--navy);font-size:21px;font-weight:900;line-height:1.2}
.summary-count small{display:block;font-size:10px;font-weight:700;margin-top:4px;color:#64748b}
.summary-grid .summary-reps,.summary-grid .summary-status{font-size:10px;line-height:1.5;margin-top:5px;overflow-wrap:anywhere}
.summary-grid .summary-status{color:#2563eb;font-weight:600}
.quantity-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:7px}
.default-reps-label{display:grid;gap:5px;font-size:11px;font-weight:700;color:#475569}
.rep-stepper{display:grid;grid-template-columns:44px 60px 44px;gap:4px}
.rep-stepper button,.set-add-btn,.set-delete-btn{min-height:44px;border:1px solid #dbe3ef;border-radius:9px;background:#fff;color:#1e3a5f;font-weight:800;cursor:pointer;font-size:12px;padding:5px}
.rep-stepper button{font-size:18px}
.set-add-btn{padding:8px 11px;background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
.default-reps-input,.set-reps-input{box-sizing:border-box;min-width:0;min-height:44px;width:100%;border:1px solid #cbd5e1;border-radius:9px;background:#fff;color:#0f172a;text-align:center;font-family:inherit;font-size:14px;font-weight:700;padding:5px 2px;appearance:textfield;-moz-appearance:textfield}
.default-reps-input::-webkit-inner-spin-button,.set-reps-input::-webkit-inner-spin-button{appearance:none;margin:0}
.quantity-help{font-size:10px;color:#64748b;line-height:1.5;margin:0 0 8px}
.quantity-error{color:#b91c1c;font-size:11px;line-height:1.5}
.quantity-error:not(:empty){margin-bottom:8px}
.exercise-card .set-buttons.set-records{grid-template-columns:minmax(0,1fr)!important;gap:6px!important}
.set-record{display:grid;grid-template-columns:minmax(0,1fr) minmax(95px,120px) 44px;gap:6px;align-items:center;padding:5px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:11px;min-width:0}
.set-record.completed{background:#eff6ff;border-color:#bfdbfe}
.set-record .set-btn{width:100%!important;min-width:0!important;margin:0!important}
.set-quantity{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px;font-size:10px;color:#64748b;min-width:0}
.set-delete-btn{color:#9f3540}
.rep-step-btn:disabled,.set-add-btn:disabled,.default-reps-input:disabled{opacity:.5;cursor:not-allowed}
.default-reps-input:focus-visible,.set-reps-input:focus-visible{outline:3px solid #2563eb;outline-offset:2px}

/* v13.7: daily, weekly and monthly actual activity. */
.overview-panel{margin-bottom:18px;min-width:0}
.overview-head,.overview-range-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.overview-periods{display:flex;gap:4px;padding:4px;background:#f1f5f9;border-radius:13px}
.overview-period-btn{min-width:48px;min-height:40px;border:0;border-radius:9px;background:transparent;color:#64748b;font-weight:800}
.overview-period-btn.active{background:var(--navy);color:#fff}
.overview-range-row{margin:10px 0 14px}
.overview-range{margin:0;font-weight:700;font-size:14px;line-height:1.5;color:#334155}
.overview-nav{display:flex;align-items:center;gap:5px}
.overview-nav button{min-height:44px}
.overview-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.overview-stat{padding:14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;min-width:0}
.overview-stat.primary{background:#eff6ff;border-color:#bfdbfe}
.overview-stat>span{font-size:12px;color:#475569;font-weight:700}
.overview-stat>b{display:block;font-size:30px;line-height:1.25;letter-spacing:-.035em;margin:6px 0;color:#0f172a;overflow-wrap:anywhere}
.overview-stat.primary>b{color:#1d4ed8}
.overview-stat small{font-size:12px;font-weight:700;letter-spacing:0;margin-left:5px;color:#64748b}
.overview-stat p{margin:0;font-size:11px;color:#64748b;line-height:1.5;overflow-wrap:anywhere}
.overview-details{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.4fr);align-items:start;gap:20px;margin-top:18px}
.overview-details.daily{grid-template-columns:minmax(0,1fr)}
.overview-details h3{margin:0 0 10px;font-size:13px;color:#334155}
.overview-categories{display:grid;gap:8px}
.overview-category{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;border:1px solid #e2e8f0;border-left:3px solid var(--accent);border-radius:11px;padding:10px 12px;background:#fff}
.overview-category.body{border-left-color:#16a34a}
.overview-category.pull{border-left-color:#7c3aed}
.overview-category b{font-size:12px;line-height:1.4}
.overview-category span{display:block;font-size:11px;color:#64748b;margin-top:3px;line-height:1.4;overflow-wrap:anywhere}
.overview-category-numbers{text-align:right;min-width:0}
.overview-category-numbers>b{color:#1e3a5f}
.overview-details.daily .overview-categories{grid-template-columns:repeat(3,minmax(0,1fr))}
.overview-activity{min-width:0}
.overview-activity-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex-wrap:wrap}
.overview-activity-head>span{font-size:10px;color:#64748b;margin-bottom:10px}
.overview-weekdays,.overview-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.overview-weekdays{font-size:10px;text-align:center;color:#64748b;margin-bottom:5px}
.overview-day{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:50px;padding:5px 2px;border:1px solid #e2e8f0;border-radius:9px;background:#f8fafc;color:#64748b}
.overview-day.level-1{background:#eff6ff;border-color:#bfdbfe;color:#1e40af}
.overview-day.level-2{background:#dbeafe;border-color:#93c5fd;color:#1e3a8a}
.overview-day.level-3{background:#2563eb;border-color:#2563eb;color:#fff}
.overview-day.selected{outline:2px solid var(--navy);outline-offset:1px}
.overview-day.future{background:#fff;border-style:dashed;color:#94a3b8}
.overview-day-date{display:flex;align-items:center;justify-content:center;gap:3px;font-size:11px;font-weight:700;white-space:nowrap}
.overview-day-date i{display:inline-block;width:4px;height:4px;border-radius:50%;background:currentColor}
.overview-day-count{font-size:10px;font-weight:700;white-space:nowrap}
.overview-legend{display:flex;gap:10px;flex-wrap:wrap;margin-top:9px;color:#64748b;font-size:10px}
.overview-legend span{display:inline-flex;align-items:center;gap:4px}
.overview-legend span::before{content:'';display:inline-block;width:9px;height:9px;border:1px solid #cbd5e1;border-radius:3px;background:#f8fafc}
.overview-legend .level-1::before{background:#eff6ff;border-color:#bfdbfe}
.overview-legend .level-2::before{background:#dbeafe;border-color:#93c5fd}
.overview-legend .level-3::before{background:#2563eb;border-color:#2563eb}
.overview-hint{font-size:11px;line-height:1.6;color:#64748b;border-top:1px solid #e2e8f0;padding-top:12px;margin:14px 0 0}
.overview-period-btn:focus-visible,.overview-day:focus-visible,.overview-nav button:focus-visible{outline:3px solid #2563eb;outline-offset:3px}
@media(max-width:980px){
  .overview-details{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:14px}
  .overview-details.daily .overview-category{align-items:flex-start;flex-direction:column}
  .overview-details.daily .overview-category-numbers{text-align:left}
}
@media(max-width:680px){
  .overview-period-btn{min-height:44px;min-width:44px}
  .overview-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .overview-stat{padding:11px}
  .overview-stat>b{font-size:26px}
  .overview-stat p{font-size:10px}
  .overview-details{grid-template-columns:minmax(0,1fr);gap:16px;margin-top:14px}
  .overview-range-row{gap:8px}
  .overview-range{font-size:12px}
  .overview-day{min-height:46px}
  .overview-category{padding:9px 10px}
  .overview-details.daily .overview-categories{gap:6px}
  .overview-details.daily .overview-category{padding:9px 6px}
  .overview-category span{font-size:10px}
}

.overview-care{margin:10px 0 0;padding:9px 11px;background:#f0fdf4;border:1px solid #dcfce7;border-radius:10px;color:#166534;font-size:11px;line-height:1.5}
.care-note{font-size:12px;color:#64748b;line-height:1.6;margin:9px 0}
.care-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}
.care-task{display:flex;align-items:flex-start;gap:10px;padding:11px;border:1px solid #e2e8f0;border-radius:12px;cursor:pointer;min-height:44px;min-width:0;background:#f8fafc}
.care-task.done{border-color:#bbf7d0;background:#f0fdf4}
.care-task input{width:20px;height:20px;flex:0 0 auto;margin:1px 0;accent-color:#16a34a}
.care-task b{display:block;font-size:12px;line-height:1.4}
.care-task small{display:block;font-size:11px;line-height:1.5;color:#64748b;margin-top:4px;overflow-wrap:anywhere}
.load-label{display:grid;gap:5px;font-size:10px;font-weight:700;color:#475569;max-width:145px}
.load-input{min-height:44px;min-width:0;width:100%;max-width:100px;border:1px solid #cbd5e1;border-radius:9px;text-align:center;padding:5px;font-family:inherit;font-weight:700;font-size:14px;background:#fff;color:#0f172a}
.load-input:disabled{background:#f1f5f9;color:#64748b;cursor:not-allowed}
.growth-details{margin-top:14px;border:1px solid #dbeafe;border-radius:12px;padding:11px;background:#f8fbff;font-size:12px;min-width:0}
.growth-details>summary{font-size:12px;font-weight:800;color:#1e3a5f;cursor:pointer;min-height:28px;line-height:1.5}
.growth-record{line-height:1.7;color:#334155;margin:11px 0 7px;overflow-wrap:anywhere}
.growth-help{font-size:10px;line-height:1.6;color:#64748b;margin:7px 0;overflow-wrap:anywhere}
.effort-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:10px}
.effort-btn,.growth-apply-btn{border:1px solid #cbd5e1;border-radius:9px;min-height:44px;padding:7px;background:#fff;color:#334155;font-size:12px;font-weight:700;min-width:0}
.effort-btn.active{background:#1e3a5f;border-color:#1e3a5f;color:#fff}
.effort-btn[data-effort="pain"].active{background:#b91c1c;border-color:#b91c1c}
.effort-btn:disabled,.growth-apply-btn:disabled{opacity:.45;cursor:not-allowed}
.growth-advice{font-size:12px;line-height:1.6;margin:10px 0;overflow-wrap:anywhere}
.growth-next{font-size:12px;line-height:1.5;font-weight:800;color:#1d4ed8;margin:8px 0;overflow-wrap:anywhere}
.growth-apply-btn{width:100%;background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
.growth-saved{font-size:11px;line-height:1.5;color:#166534;margin:8px 0;overflow-wrap:anywhere}
.growth-saved:empty{display:none}
.care-task input:focus-visible,.load-input:focus-visible,.effort-btn:focus-visible,.growth-apply-btn:focus-visible{outline:3px solid #2563eb;outline-offset:2px}
@media(max-width:680px){.care-list{grid-template-columns:minmax(0,1fr)}.care-note{font-size:11px}.growth-details>summary{min-height:32px}}

/* v13.8: selected date details directly below the activity calendar. */
.overview-category-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap}
.overview-category-head>span{font-size:10px;color:#64748b;margin-bottom:10px}
.overview-selected{margin-top:16px;padding-top:14px;border-top:1px solid #e2e8f0;min-width:0}
.overview-selected h4{margin:0;font-size:13px;font-weight:800;line-height:1.5;color:#1e3a5f}
.overview-selected-info{margin:5px 0 10px;font-size:10px;line-height:1.5;color:#64748b}
.overview-selected-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.overview-selected-card{padding:11px 10px;border:1px solid #dbe3ee;border-top:3px solid #2563eb;border-radius:11px;background:#f8fafc;min-width:0}
.overview-selected-card.body{border-top-color:#16a34a}
.overview-selected-card.pull{border-top-color:#7c3aed}
.overview-selected-head{display:flex;align-items:baseline;justify-content:space-between;gap:5px;flex-wrap:wrap}
.overview-selected-head b{font-size:12px;color:#334155}
.overview-selected-head>span{font-size:10px;color:#64748b}
.overview-selected-count{margin:10px 0 9px;line-height:1.2}
.overview-selected-count strong{display:block;font-size:25px;letter-spacing:-.035em;color:#0f172a}
.overview-selected-count small{display:block;font-size:10px;color:#64748b;margin-top:4px}
.overview-selected-progress{height:5px;border-radius:999px;background:#e2e8f0;overflow:hidden}
.overview-selected-progress>span{display:block;height:100%;background:#2563eb;border-radius:999px}
.overview-selected-card.body .overview-selected-progress>span{background:#16a34a}
.overview-selected-card.pull .overview-selected-progress>span{background:#7c3aed}
.overview-selected-volume{font-size:11px;line-height:1.5;color:#334155;font-weight:700;margin:9px 0 4px;overflow-wrap:anywhere}
.overview-selected-status,.overview-selected-care{font-size:10px;line-height:1.5;color:#64748b;margin:4px 0 0;overflow-wrap:anywhere}
.overview-selected-care{padding-top:6px;margin-top:7px;border-top:1px solid #e2e8f0}
@media(max-width:680px){
  .overview-selected-grid{gap:6px}
  .overview-selected-card{padding:9px 7px}
  .overview-selected-count strong{font-size:22px}
  .overview-selected-head>span{font-size:9px}
  .overview-selected-volume{font-size:10px}
}

/* v13.8: separate office preparation / workout / cool-down navigation */
.routine-tabs{display:grid;gap:8px;min-width:0}
.routine-tab-group{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:8px;border:1px solid #dbe3ee;border-radius:14px;background:#f8fafc;min-width:0}
.routine-tab-group.body{border-left:4px solid #16a34a}
.routine-tab-group.dumb{border-left:4px solid #2563eb}
.routine-tab-group.pull{border-left:4px solid #7c3aed}
.routine-view-btn{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;min-width:0;min-height:58px;padding:8px 5px;border:1px solid #dbe3ee;border-radius:10px;background:#fff;color:#334155;font-size:13px;font-weight:750;line-height:1.4;text-align:center;overflow-wrap:anywhere}
.routine-view-btn.active{background:#0b1220;border-color:#0b1220;color:#fff}
.routine-view-btn:hover{border-color:#94a3b8}
.routine-tab-progress{font-size:10px;font-weight:500;color:#64748b;line-height:1.3}
.routine-view-btn.active .routine-tab-progress{color:#cbd5e1}
.routine-view-btn:focus-visible,.care-next-btn:focus-visible{outline:3px solid #2563eb;outline-offset:2px}
.care-movements{display:grid;gap:14px;margin-top:14px}
.care-movement{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid #dbe3ee;border-radius:14px;overflow:hidden;background:#fff;min-width:0}
.care-movement.completed{border-color:#86efac}
.care-visual-grid{display:grid;grid-template-rows:minmax(0,3fr) minmax(0,2fr);height:460px;min-width:0;border-right:1px solid #e2e8f0;background:#fff}
.care-photo-slot{position:relative;min-height:0;min-width:0;padding:8px 8px 25px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.care-photo{display:block;width:100%;height:100%;object-fit:contain;cursor:zoom-in;border-radius:8px;background:#fff}
.care-photo-caption{position:absolute;bottom:5px;left:0;right:0;text-align:center;font-size:9px;color:#64748b;line-height:1.5}
.care-area-panel{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:6px;align-items:center;min-height:0;min-width:0;padding:9px;border-top:1px solid #e2e8f0;background:#fff7ed}
.care-anatomy{display:block;width:100%;height:100%;max-height:165px;min-width:0}
.care-area-copy{min-width:0;line-height:1.5}
.care-area-copy span{display:block;color:#9a3412;font-size:10px;font-weight:750}
.care-area-copy b{display:block;font-size:12px;color:#c2410c;margin-top:4px;overflow-wrap:anywhere}
.care-area-copy small{display:block;font-size:9px;color:#9a3412;margin-top:7px}
.care-instruction{display:flex;flex-direction:column;min-width:0;padding:18px}
.care-step-number{margin:0 0 6px;font-size:10px;font-weight:750;color:#64748b}
.care-instruction h3{margin:0;font-size:17px;line-height:1.5;overflow-wrap:anywhere}
.care-dose{font-size:12px;line-height:1.65;color:#2563eb;font-weight:650;margin:10px 0}
.care-steps{margin:4px 0 10px;padding-left:20px;font-size:12px;line-height:1.75;color:#334155}
.care-steps li{padding-left:2px;margin:0 0 7px;overflow-wrap:anywhere}
.care-direction{margin:0;font-size:11px;line-height:1.6;font-weight:750;color:#c2410c;padding:8px;border-radius:8px;background:#fff7ed}
.care-form-note{font-size:11px;line-height:1.65;color:#64748b;margin:8px 0 14px}
.care-complete{margin-top:auto;background:#f8fafc}
.care-complete b{font-size:13px}
.care-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-top:14px}
.care-footer .care-note{flex:1 1 220px;margin:0}
.care-sources{margin-top:15px;color:#64748b;font-size:10px;line-height:1.6}
.care-sources summary{cursor:pointer;min-height:35px;align-content:center;font-weight:650}
.care-sources p{margin:6px 0}.care-sources a{color:#475569}
@media(max-width:680px){
  .routine-tab-group{gap:5px;padding:6px}
  .routine-view-btn{font-size:11px;padding:7px 4px;min-height:58px}
  .routine-tab-progress{font-size:9px}
  .care-movement{grid-template-columns:1fr}
  .care-visual-grid{height:420px;border-right:0;border-bottom:1px solid #e2e8f0}
  .care-instruction{padding:15px}
  .care-area-panel{grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:8px 15px}
  .care-instruction h3{font-size:16px}
  .care-steps{font-size:12px}
}
