
  :root {
    --bg: #0f0f0f;
    --surface: #1a1a1a;
    --surface-2: #252525;
    --accent: #d4ff00;
    --accent-dim: #9eb900;
    --text: #f5f5f5;
    --text-dim: #888;
    --danger: #ff4d4d;
    --warn: #ffb84d;
    --border: #333;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body {
    font-family: 'IBM Plex Sans KR', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding: 24px 16px;
  }
  .container { max-width: 720px; margin: 0 auto; }
  
  header {
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
  }
  .title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(40px, 8vw, 64px);
    line-height: 0.95;
    letter-spacing: 0.02em;
    color: var(--accent);
  }
  .subtitle {
    color: var(--text-dim);
    font-size: 14px;
    margin-top: 8px;
    letter-spacing: 0.02em;
  }
  
  .step-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 14px;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 12px;
  }
  
  .form-group { margin-bottom: 28px; }
  .hint { color: var(--text-dim); font-size: 12px; font-weight: 400; margin-left: 8px; }
  
  .body-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .body-info input, .body-info select {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    width: 100%;
  }
  .body-info input:focus, .body-info select:focus {
    outline: none;
    border-color: var(--accent);
  }
  
  .chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
  .chip {
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.15s ease;
  }
  .chip:hover { border-color: var(--accent-dim); }
  .chip.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    font-weight: 600;
  }
  .chip.injury.active {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
  }
  
  .custom-input {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-family: inherit;
    flex: 1;
    min-width: 140px;
    max-width: 200px;
  }
  .custom-input:focus {
    outline: none;
    border-color: var(--accent);
  }
  .custom-input.injury:focus {
    border-color: var(--danger);
  }
  
  .custom-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: 999px;
    padding: 0 4px 0 14px;
  }
  .custom-input-wrap span {
    color: var(--text-dim);
    font-size: 12px;
  }
  .custom-input-wrap input {
    background: transparent;
    border: none;
    color: var(--text);
    padding: 10px 8px;
    font-size: 14px;
    font-family: inherit;
    width: 80px;
    outline: none;
  }
  
  .btn-generate {
    width: 100%;
    padding: 18px;
    background: var(--accent);
    color: #000;
    border: none;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 0.1em;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 16px;
    transition: transform 0.1s ease;
  }
  .btn-generate:hover { transform: translateY(-2px); }
  .btn-generate:active { transform: translateY(0); }
  
  .btn-secondary {
    width: 100%;
    padding: 14px;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 16px;
    letter-spacing: 0.1em;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.15s ease;
  }
  .btn-secondary:hover { background: var(--accent); color: #000; }
  
  .btn-reset {
    padding: 18px;
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    letter-spacing: 0.1em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .btn-reset:hover {
    color: var(--danger);
    border-color: var(--danger);
  }
  
  .saved-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .saved-info { flex: 1; min-width: 0; }
  .saved-date {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 13px;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: 4px;
  }
  .saved-meta {
    font-size: 14px;
    color: var(--text);
    margin-bottom: 4px;
  }
  .saved-list-summary {
    font-size: 12px;
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .saved-actions { display: flex; gap: 8px; flex-shrink: 0; }
  .saved-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
  }
  .saved-btn:hover { border-color: var(--accent); color: var(--accent); }
  .saved-btn.delete:hover { border-color: var(--danger); color: var(--danger); }
  
  /* 타이머 모달 */
  .timer-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
  }
  .timer-modal.show { display: flex; }
  .timer-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 24px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
  }
  .timer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 20px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 16px;
  }
  .timer-close:hover { color: var(--text); background: var(--surface-2); }
  .timer-phase {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 14px;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 8px;
  }
  .timer-phase.rest { color: var(--warn); }
  .timer-exercise {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 6px;
  }
  .timer-set {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 32px;
  }
  .timer-display {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 96px;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 32px;
    letter-spacing: 0.02em;
  }
  .timer-display.rest { color: var(--warn); }
  .timer-display.done { color: var(--text-dim); font-size: 48px; }
  .timer-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
  }
  .timer-btn {
    flex: 1;
    padding: 14px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 16px;
    letter-spacing: 0.1em;
    border-radius: 8px;
    cursor: pointer;
  }
  .timer-btn:hover { border-color: var(--accent); color: var(--accent); }
  .timer-btn.skip:hover { border-color: var(--text); color: var(--text); }
  .timer-progress {
    width: 100%;
    height: 4px;
    background: var(--surface-2);
    border-radius: 2px;
    overflow: hidden;
  }
  .timer-progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.3s linear;
  }
  
  /* 운동 카드에 타이머 시작 버튼 */
  .timer-start-btn {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 13px;
    letter-spacing: 0.1em;
    cursor: pointer;
    margin-top: 12px;
  }
  .timer-start-btn:hover { opacity: 0.85; }
  
  .result { margin-top: 32px; display: none; }
  .result.show { display: block; }
  
  .result-header {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
  }
  .result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
  }
  .stat-label {
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 4px;
    text-transform: uppercase;
  }
  .stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 28px;
    color: var(--accent);
    line-height: 1;
  }
  .intensity-badge {
    display: inline-block;
    background: rgba(212, 255, 0, 0.1);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    margin-top: 8px;
    border: 1px solid rgba(212, 255, 0, 0.3);
    letter-spacing: 0.05em;
  }
  
  .excluded-badge {
    background: rgba(255, 77, 77, 0.1);
    color: var(--danger);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 12px;
    border: 1px solid rgba(255, 77, 77, 0.3);
  }
  
  .exercise-list { display: flex; flex-direction: column; gap: 12px; }
  .exercise-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.15s ease;
  }
  .exercise-card:hover { border-color: var(--accent-dim); }
  
  .exercise-main {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
  }
  .ex-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 32px;
    color: var(--accent);
    line-height: 1;
    min-width: 36px;
  }
  .ex-info { flex: 1; }
  .ex-name { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
  .ex-meta { font-size: 13px; color: var(--text-dim); }
  .ex-tag {
    display: inline-block;
    background: var(--surface-2);
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 6px;
    font-size: 11px;
    color: var(--text-dim);
  }
  .ex-tag.level-1 {
    background: rgba(100, 200, 100, 0.15);
    color: #6fd06f;
  }
  .ex-tag.level-2 {
    background: rgba(255, 184, 77, 0.15);
    color: var(--warn);
  }
  .ex-tag.level-3 {
    background: rgba(255, 77, 77, 0.15);
    color: var(--danger);
  }
  .ex-sets {
    text-align: right;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    color: var(--text);
    letter-spacing: 0.05em;
  }
  .ex-rest {
    font-size: 11px;
    color: var(--text-dim);
    font-family: 'IBM Plex Sans KR';
    letter-spacing: 0;
  }
  .ex-toggle {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 8px;
    letter-spacing: 0.05em;
  }
  
  .exercise-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--surface-2);
  }
  .exercise-detail.open { max-height: 1200px; }
  .detail-inner {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--border);
  }
  .detail-section { margin-bottom: 14px; }
  .detail-section:last-child { margin-bottom: 0; }
  .detail-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 12px;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 6px;
  }
  .detail-text { font-size: 13.5px; line-height: 1.6; color: var(--text); }
  .detail-warn {
    background: rgba(255, 184, 77, 0.1);
    color: var(--warn);
    padding: 10px 12px;
    border-radius: 6px;
    border-left: 3px solid var(--warn);
    font-size: 13px;
    line-height: 1.5;
    margin-top: 4px;
  }
  
  .video-btn {
    display: inline-block;
    background: rgba(212, 255, 0, 0.1);
    color: var(--accent);
    padding: 10px 16px;
    border-radius: 6px;
    border: 1px solid rgba(212, 255, 0, 0.4);
    font-size: 13px;
    text-decoration: none;
    margin-top: 4px;
    transition: all 0.15s ease;
  }
  .video-btn:hover {
    background: var(--accent);
    color: #000;
  }
  
  .animation-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-top: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
  }
  .animation-box svg {
    width: 100%;
    max-width: 220px;
    height: auto;
  }
  
  /* 스쿼트 애니메이션 */
  @keyframes squat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(30px); }
  }
  @keyframes squat-knee {
    0%, 100% { transform: translateY(0) scaleY(1); }
    50% { transform: translateY(15px) scaleY(0.6); }
  }
  .anim-squat .body { animation: squat 1.5s ease-in-out infinite; transform-origin: center; }
  
  /* 푸시업 애니메이션 */
  @keyframes pushup {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(20px); }
  }
  .anim-pushup .body { animation: pushup 1.5s ease-in-out infinite; transform-origin: center; }
  
  /* 점핑잭 애니메이션 */
  @keyframes jjack-arms {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-130deg); }
  }
  @keyframes jjack-arms-right {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(130deg); }
  }
  @keyframes jjack-legs-left {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-20deg); }
  }
  @keyframes jjack-legs-right {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(20deg); }
  }
  @keyframes jjack-body {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
  }
  .anim-jjack .body { animation: jjack-body 0.6s ease-in-out infinite; transform-origin: center; }
  .anim-jjack .arm-left { animation: jjack-arms 0.6s ease-in-out infinite; transform-origin: 110px 80px; }
  .anim-jjack .arm-right { animation: jjack-arms-right 0.6s ease-in-out infinite; transform-origin: 110px 80px; }
  .anim-jjack .leg-left { animation: jjack-legs-left 0.6s ease-in-out infinite; transform-origin: 110px 140px; }
  .anim-jjack .leg-right { animation: jjack-legs-right 0.6s ease-in-out infinite; transform-origin: 110px 140px; }
  
  /* 플랭크 - 정적 (호흡만) */
  @keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
  }
  .anim-plank .body { animation: breathe 3s ease-in-out infinite; transform-origin: center; }
  
  /* 런지 */
  @keyframes lunge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(25px); }
  }
  .anim-lunge .body { animation: lunge 1.8s ease-in-out infinite; transform-origin: center; }
  
  /* 버피 (복합 동작) */
  @keyframes burpee {
    0%, 100% { transform: translateY(0) scaleY(1); }
    25% { transform: translateY(30px) scaleY(0.6); }
    50% { transform: translateY(50px) scaleY(0.3); }
    75% { transform: translateY(30px) scaleY(0.6); }
  }
  .anim-burpee .body { animation: burpee 2s ease-in-out infinite; transform-origin: center bottom; }
  
  /* 마운틴 클라이머 */
  @keyframes mclimber-leg-left {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-50deg); }
  }
  @keyframes mclimber-leg-right {
    0%, 100% { transform: rotate(-50deg); }
    50% { transform: rotate(0deg); }
  }
  .anim-mclimber .leg-left { animation: mclimber-leg-left 0.5s ease-in-out infinite; transform-origin: 130px 130px; }
  .anim-mclimber .leg-right { animation: mclimber-leg-right 0.5s ease-in-out infinite; transform-origin: 130px 130px; }
  
  /* 줄넘기 */
  @keyframes jrope-body {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
  }
  @keyframes jrope-rope {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  .anim-jrope .body { animation: jrope-body 0.4s ease-in-out infinite; transform-origin: center; }
  .anim-jrope .rope { animation: jrope-rope 0.4s linear infinite; transform-origin: 110px 100px; }
  
  /* 크런치 */
  @keyframes crunch {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-20deg); }
  }
  .anim-crunch .upper { animation: crunch 1.5s ease-in-out infinite; transform-origin: 110px 130px; }
  
  /* 글루트 브릿지 */
  @keyframes bridge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
  }
  .anim-bridge .hip { animation: bridge 2s ease-in-out infinite; transform-origin: center; }
  
  .disclaimer {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.6;
  }
  .disclaimer strong { color: var(--warn); }
  
  @media (max-width: 480px) {
    .result-stats { grid-template-columns: 1fr 1fr; }
    .stat-value { font-size: 22px; }
  }

