*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    color: #1a1a1a;
    background: #fafafa;
}

nav {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1.5rem;
}

nav a {
    text-decoration: none;
    color: #2563eb;
    font-weight: 500;
}

nav a:hover {
    text-decoration: underline;
}

h1, h2, h3 {
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

section {
    margin-bottom: 2rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background: #2563eb;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.btn:hover {
    background: #1d4ed8;
}

.auth-buttons {
    display: flex;
    gap: 0.75rem;
}

.exercise-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.btn-exercise {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #1a1a1a;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s;
}

span.exercise-icon {
    display: block;
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 0.25rem;
}

img.exercise-icon {
    display: block;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto 0.25rem;
}

.exercise-name img.exercise-icon {
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 0;
    margin-right: 0.25rem;
}

.btn-exercise:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.exercise-block {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff;
}

.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.exercise-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.set-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.375rem 0;
}

.set-label {
    font-size: 0.875rem;
    color: #6b7280;
    min-width: 3rem;
}

.set-field {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.set-field input[type="number"] {
    width: 4rem;
    padding: 0.25rem 0.375rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.875rem;
}

.btn-add-set {
    margin-top: 0.5rem;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.btn-danger:hover {
    background: #b91c1c;
}

.set-row input:disabled {
    background: #f3f4f6;
    color: #374151;
    border-color: #e5e7eb;
    cursor: not-allowed;
}
